I want to know where all the NAs are in a matrix. The data frame looks like
this:
vmc[1:5,]
date year month day snow.new prcp tmin snow.dep tmax
1 01NOV1954 195411 1 NA NA -14.4 NA 12.222
2 02NOV1954 195411 2 NA NA -13.9 NA
Benjamin M. Osborne allegedly said on 2/25/2005 10:33 AM:
I want to know where all the NAs are in a matrix. The data frame looks like
this:
vmc[1:5,]
date year month day snow.new prcp tmin snow.dep tmax
1 01NOV1954 195411 1 NA NA -14.4 NA 12.222
2
See ?is.na
Uwe Ligges
Benjamin M. Osborne wrote:
I want to know where all the NAs are in a matrix. The data frame looks like
this:
vmc[1:5,]
date year month day snow.new prcp tmin snow.dep tmax
1 01NOV1954 195411 1 NA NA -14.4 NA 12.222
2 02NOV1954
Have you considered is.na?
My favorite tool for answering questions like this is
www.r-project.org - search - R site search. When I asked there for
subsetting by NA just now, I got 101 hits, the third of which
mentioned is.na. Also, the posting guide