Skip to content
Prev 167472 / 398502 Next

regex -> negate a word

On Mon, 19 Jan 2009, Rolf Turner wrote:

            
Indeed.  I have often wondered why grep() returned indices, when a 
logical vector would seem more natural in R (and !grep(...) would have 
been all that was needed).

Looking at the code I see it does in fact compute a logical vector, 
just not return it.  So adding 'invert' (the long-form of -v is 
--invert) is a job of a very few lines and I have done so for 2.9.0.