[R] Subsets without NA
Uwe Ligges
ligges at statistik.uni-dortmund.de
Tue Jan 8 12:58:27 CET 2002
"Grum, Mikkel" wrote:
>
> Is there a way of removing all rows with missing values from a data frame?
> I usually use
> subset(x, var1!="NA")
> and repeat for each variable. It would be nice to be able to do it in one
> fell swoop. Also, surprisingly, it doesn't always work. Sometimes I'm left
> with an empty set even though not all rows have missing values for the
> variable.
See ?na.exclude how to deal with NAs.
Uwe
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list