[R] regex -> negate a word

Wacek Kusnierczyk Waclaw.Marcin.Kusnierczyk at idi.ntnu.no
Mon Jan 19 09:54:16 CET 2009


Rolf Turner wrote:
>
> On 19/01/2009, at 10:44 AM, Gabor Grothendieck wrote:
>
>> Well, that's why it was only provided when you insisted.  This is
>> not what regexp's are good at.
>>
>> On Sun, Jan 18, 2009 at 4:35 PM, Rau, Roland <Rau at demogr.mpg.de> wrote:
>>> Thanks! (I have to admit, though, that I expected something simple)
>
> It may not be what regexp's are good at, but the grep command in
> unix/linux
> does what is required *very* simply via the ``-v'' flag.  I conjecture
> that
> it would not be difficult to add an argument with similar impact to the
> grep() function in R.

something like grep(..., inverse=TRUE), perhaps.

vQ




More information about the R-help mailing list