Re: [R] deleting rows containing a letter

2011-05-11 Thread chris20
Excellant! Thanks both for your replies. I've never used grep, I do use negative indexing but usually: -which(. %in% -- View this message in context: http://r.789695.n4.nabble.com/deleting-rows-containing-a-letter-tp3514473p3514829.html Sent from the R help mailing list archive at Nabb

Re: [R] deleting rows containing a letter

2011-05-11 Thread David Winsemius
On May 11, 2011, at 10:01 AM, David Winsemius wrote: On May 11, 2011, at 7:55 AM, chris20 wrote: Hi I have dataframe with different plot numbers in and different subplots as letters at the end of the plot number i.e. 1a, 1b 2-1a etc. I want to delete all rows that end in a specific letter

Re: [R] deleting rows containing a letter

2011-05-11 Thread David Winsemius
On May 11, 2011, at 7:55 AM, chris20 wrote: Hi I have dataframe with different plot numbers in and different subplots as letters at the end of the plot number i.e. 1a, 1b 2-1a etc. I want to delete all rows that end in a specific letter eg... treat<-c("1a","1b","1c","2a","2b","2c","2-1a","2

[R] deleting rows containing a letter

2011-05-11 Thread chris20
Hi I have dataframe with different plot numbers in and different subplots as letters at the end of the plot number i.e. 1a, 1b 2-1a etc. I want to delete all rows that end in a specific letter eg... treat<-c("1a","1b","1c","2a","2b","2c","2-1a","2-1b","2-1c") a1<-1:9 b1<-9:1 d1<-data.frame(treat,a