From rfrancois at mango-solutions.com  Thu Nov  9 11:14:27 2006
From: rfrancois at mango-solutions.com (Romain Francois)
Date: Thu, 09 Nov 2006 10:14:27 +0000
Subject: [Rd] invert argument in grep
Message-ID: <4552FF83.6010001@mango-solutions.com>

Hello,

What about an `invert` argument in grep, to return elements that are 
*not* matching a regular expression :

R> grep("pink", colors(), invert = TRUE, value = TRUE)

would essentially return the same as :

R> colors() [ - grep("pink", colors()) ]


I'm attaching the files that I modified (against today's tarball) for 
that purpose.

Cheers,

Romain

-- 
*mangosolutions*
/data analysis that delivers/

Tel   +44 1249 467 467
Fax   +44 1249 467 468

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: grep.R
Url: https://stat.ethz.ch/pipermail/r-devel/attachments/20061109/288f5e81/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: grep.Rd
Url: https://stat.ethz.ch/pipermail/r-devel/attachments/20061109/288f5e81/attachment-0001.pl 


[Rd] invert argument in grep
Romain Francois