[R] RNetCDF: retrieving variable names and units
mdsumner at gmail.com
Wed Jan 12 23:26:16 CET 2011
There are a number of functions in the package to inquire about the
file contents. See library(help = RNetCDF).
nc <- open.nc("file.nc")
You can then read from the file with something like this:
obj0 <- var.inq.nc(nc, 0)
dat <- var.get.nc(nc, obj0$name, start = ...)
Going with ncdf or ncdf4 package is probably better ( I just happen to
be more familiar with RNetCDF.)
On Thu, Jan 13, 2011 at 9:00 AM, Jannis <bt_jannis at yahoo.de> wrote:
> Dear List,
> does anybody has experience with the RNetCDF package? I manage to open a connection and copy data from a ncdf file but would need a way to automatically retrieve variable names (ideally all of them from one file) and units from the file.
> Any ideas?
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Institute for Marine and Antarctic Studies, University of Tasmania
e-mail: mdsumner at gmail.com
More information about the R-help