[R] grep negation

Marcus Leinweber leinwebe at eva.mpg.de
Thu Jun 23 14:59:31 CEST 2005


hi,

using the example in the grep help:
txt <- c("arm","foot","lefroo", "bafoobar")
i <- grep("foo",txt); i
[1] 2 4

but how can i get the negation (1,3) when looking for 'foo'?

thanks,
m.




More information about the R-help mailing list