Re: [R] subset data frame by variable with missing value

2012-11-30 Thread arun
Cc: Sent: Friday, November 30, 2012 10:27 AM Subject: [R] subset data frame by variable with missing value Hello, I have a variable in a data frame that contains NA values. I just want to subset so that I get the obs where that variable is missing. In SAS I would do: data missing;   set test;  

Re: [R] subset data frame by variable with missing value

2012-11-30 Thread ramoss
I found the answer; Its mymissing <- subset(mydata,is.na(myvar)) -- View this message in context: http://r.789695.n4.nabble.com/subset-data-frame-by-variable-with-missing-value-tp4651439p4651440.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] subset data frame by variable with missing value

2012-11-30 Thread Milan Bouchet-Valat
Le vendredi 30 novembre 2012 à 07:27 -0800, ramoss a écrit : > Hello, > > I have a variable in a data frame that contains NA values. I just want to > subset so that I get the obs where that variable is missing. > In SAS I would do: > > data missing; > set test; > if myvalue=' '; > run; > > H

Re: [R] subset data frame by variable with missing value

2012-11-30 Thread PIKAL Petr
lp-bounces@r- > project.org] On Behalf Of ramoss > Sent: Friday, November 30, 2012 4:27 PM > To: r-help@r-project.org > Subject: [R] subset data frame by variable with missing value > > Hello, > > I have a variable in a data frame that contains NA values. I just want > to

Re: [R] subset data frame by variable with missing value

2012-11-30 Thread Marc Schwartz
On Nov 30, 2012, at 9:27 AM, ramoss wrote: > Hello, > > I have a variable in a data frame that contains NA values. I just want to > subset so that I get the obs where that variable is missing. > In SAS I would do: > > data missing; > set test; > if myvalue=' '; > run; > > How can I perform t

[R] subset data frame by variable with missing value

2012-11-30 Thread ramoss
Hello, I have a variable in a data frame that contains NA values. I just want to subset so that I get the obs where that variable is missing. In SAS I would do: data missing; set test; if myvalue=' '; run; How can I perform this simple task in R? Thanks in advance for your help. -- View