[R] grep question

Bob Green bgreen at dyson.brisnet.org.au
Thu Aug 31 23:05:40 CEST 2006

I am hoping for some advice as to how to modify the following syntax, so 
that instead of saving all records which refer to Farrah, I select all 
instances that do not include Farrah, or the word Coolum.

test <- read.csv("c:\\newdat.csv", as.is=TRUE, header=T)
sure <- test[grep('Farrah', paste(test$V3.HD, test$V3.LP, test$V3.TD)),]

Any assistance is appreciated,


Bob  Green

More information about the R-help mailing list