Description Usage Arguments See Also Examples
Convert a slice read from a NetCDF file with ncvar_slice
into a x,y,z list suitable for image
, contour
, persp
, etc.
1 2 | ## S3 method for class 'ncslice4'
as.xyz(x)
|
x |
a NetCDF slice object, extracted via |
ncvar_slice
to read the slice and as.data.frame.ncslice4
to convert it into another format.
1 2 3 4 5 6 7 | nc <- nc_open(system.file("extdata", "sresa1b_ncar_ccsm3.nc", package="ncdf4helpers"))
x <- ncvar_slice(nc, "tas")
nc_close(nc)
# inspect and transform the result
str(x)
x <- as.xyz(x)
str(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.