[R] grep negation

From: Marcus Leinweber <leinwebe_at_eva.mpg.de>
Date: Thu 23 Jun 2005 - 22:59:31 EST


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.



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jun 23 23:02:40 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:58 EST