Displaying 1 result from an estimated 1 matches for "int_return".
Did you mean:
in_return
2010 Feb 25
0
missing values in 'ncdf', integer versus byte
...)
ncfilename <- "test.nc"
ncfile <- create.ncdf(ncfilename,list(variable_byte,variable_int))
array <- c(1:5,NA,7:10)
put.var.ncdf(ncfile,variable_byte,array,start=1,count=10)
put.var.ncdf(ncfile,variable_int,array,start=1,count=10)
close(ncfile)
nc <- open.ncdf(ncfile)
int_return <- get.var.ncdf(nc, "as.int", start=1, count=10)
byte_return <- get.var.ncdf(nc, "as.byte", start=1, count=10)
--
> int_return
[1] 1 2 3 4 5 NA 7 8 9 10
> byte_return
[1] 1 2 3 4 5 -99 7 8 9 10
Thanks,
-albert