[Rd] grep with fixed=TRUE and ignore.case=TRUE

From: Petr Savicky <savicky_at_cs.cas.cz>
Date: Mon, 07 May 2007 16:20:13 +0200

Dear R developers,

I suggest to modify the behaviour of "grep" function with fixed=TRUE option.

Currently, fixed=TRUE implies ignore.case=FALSE (overrides ignore.case=TRUE, if set by the user).

I suggest to keep ignore.case as set by the user even if fixed=TRUE. Since the default of ignore.case is FALSE, this would not change the behaviour of grep, if the user does not set ignore.case explicitly.

In my opinion, fixed=TRUE is most useful for suppressing meta-character expansion. On the other hand, for a simple word search, ignoring case is sometimes useful.

If for some reason, it is better to keep the current behavior of grep, then I suggest to extend the documentation as follows:

   fixed: logical. If 'TRUE', 'pattern' is a string to be matched as

          is. Overrides all conflicting arguments.

   fixed: logical. If 'TRUE', 'pattern' is a string to be matched as

          is. Overrides all conflicting arguments including ignore.case.

All the best, Petr Savicky.

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon 07 May 2007 - 14:24:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 May 2007 - 07:33:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.