count number of missing values in netcdf file - R -


is there quick way know how many missing values in netcdf file? possibly using r.

currently have

hum<-nc_open("rhum.sig995.2008.nc") rhum<-ncvar_get(hum, "rhum") 

then manually missing value typing 'hum' , copy operation

sum(abs(rhum - 9.96920996838687e+36) < -9.96920996838687e+36) 

is there more direct way, if have work hundreds of files? avoid copying , pasting missing value, , not sure kind of precision number should handled.

my suggestion use excellent raster package:

install.packages(raster) library(raster)  r <- raster("rhum.sig995.2008.nc", var="rhum")  nanum <- summary(r)[6] 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -