Description Usage Arguments Details Value Examples
Get dimension axes for the given variable.
1 | nc.get.dim.axes(f, v, dim.names)
|
f |
The file (an object of class |
v |
The name of a variable |
dim.names |
Optionally, dimension names (to avoid looking them up repeatedly) |
This function returns the dimension axes for a given variable as a named character vector; the names are the names of the corresponding dimensions. If no variable is supplied, the function will return data for all dimensions found in the file.
Axes are X, Y, Z (depth, plev, etc), T (time), and S (space, for reduced grids).
This routine will attempt to infer axes for dimensions if no 'axis' attribute is found on a dimension variable, using the nc.get.dim.axes.from.names function.
A named character vector mapping dimension names to axes.
1 2 3 4 5 6 7 8 9 10 | ## Get dimension axes from file.
## Not run:
f <- nc_open("pr.nc")
## Get dim axes for a specified variable
dim.axes <- nc.get.dim.axes(f, "pr")
## Get all dim axes in file
dim.axes <- nc.get.dim.axes(f)
nc_close(f)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.