[R-sig-Geo] problem in reading NC file and plot it
tony333
tony333_6 at hotmail.com
Tue Jan 10 13:34:47 CET 2012
require(raster);require(ncdf)
# Assuming that the variable name is slp
b <- brick(slp.mon.mean.nc, varname = 'slp')
# now you can plot any of the time step using:
plot(raster(b, layer = 1))# time step one
But there might be several other ways to do what you want.
Regards,
Lars .
#############################################################
i use this method to plot slp.mon.mean.nc
give me error
Error in .local(x, ...) : could not find function ".hasSlot"
Error in plot(raster(b, layer = 1)) :
error in evaluating the argument 'x' in selecting a method for function
'plot'
and i use
image.plot(raster(b,layer=1))
the error is Error in .local(x, ...) : could not find function ".hasSlot"
thanks for help
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/problem-in-reading-NC-file-and-plot-it-tp7150538p7171863.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list