[R] Extract NA data rows

2011-01-25 Thread typhoong
hi i have the following dataframe x y 1 345 6 NA 8 123 32 123 12 NA 6 124 7 NA and i want to extract the data rows which contains NA data, I tried subset(dataframe,y==NA) but fail. if you know the answers, please let me know thanks. typhoong

Re: [R] Extract NA data rows

2011-01-25 Thread David Scott
On 25/01/2011 8:07 p.m., typhoong wrote: hi i have the following dataframe x y 1 345 6 NA 8 123 32 123 12 NA 6 124 7 NA and i want to extract the data rows which contains NA data, I tried subset(dataframe,y==NA) but fail. if you know the

Re: [R] Extract NA data rows

2011-01-25 Thread Ivan Calandra
Hi! Try subset(dataframe, is.na(y)) or df[is.na(df$y),] HTH, Ivan Le 1/25/2011 08:07, typhoong a écrit : hi i have the following dataframe x y 1 345 6 NA 8 123 32 123 12 NA 6 124 7 NA and i want to extract the data rows which contains NA data,

Re: [R] Extract NA data rows

2011-01-25 Thread kamel gaanoun
Hi, May be try this : data[which(is.na(data[,2])),] 2011/1/25 typhoong graham...@eurus-energy.com hi i have the following dataframe x y 1 345 6 NA 8 123 32 123 12 NA 6 124 7 NA and i want to extract the data rows which contains NA

Re: [R] Extract NA data rows

2011-01-25 Thread typhoong
big thanks for all answers ! -- View this message in context: http://r.789695.n4.nabble.com/Extract-NA-data-rows-tp3235568p3237309.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list