[R] subset with NA
Robert.Schick at noaa.gov
Thu Feb 20 02:12:04 CET 2003
Easy question that I can't find an answer for. I'm trying to subset a
data frame and want to exclude the positive values, i.e. I want the NA
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
1 2 3 3 4 5 1211
subset(temp, tuna %in% "NA", select....
subset(temp, tuna == NA, select....
subset(temp, tuna == as.character(NA), select....
All yield an empty data frame.
An R-help post
looking at http://developer.r-project.org/150update.txt, which I did
but I'm confused as to how to accurately query for an NA string.
Santa Cruz Lab
110 Shaffer Road
Santa Cruz, CA 95060
More information about the R-help