CFAxisDiscrete | R Documentation |
This class represent discrete CF axes, i.e. those axes whose coordinate values do not represent a physical property. The coordinate values are ordinal values equal to the index into the axis.
ncdfCF::CFObject
-> ncdfCF::CFAxis
-> CFAxisDiscrete
friendlyClassName
(read-only) A nice description of the class.
dimnames
(read-only) The coordinates of the axis as an integer vector, or labels for every axis element if they have been set.
new()
Create a new instance of this class.
CFAxisDiscrete$new(grp, nc_var, nc_dim, orientation, dim_only = FALSE)
grp
The group that contains the netCDF variable.
nc_var
The netCDF variable that describes this instance.
nc_dim
The netCDF dimension that describes the dimensionality.
orientation
The orientation (X
, Y
, Z
, or T
) or ""
if
different or unknown.
dim_only
Flag if this axis only has a dimension on file but no NC variable.
print()
Summary of the axis printed to the console.
CFAxisDiscrete$print(...)
...
Arguments passed on to other functions. Of particular interest
is width =
to indicate a maximum width of attribute columns.
self
, invisibly.
brief()
Some details of the axis.
CFAxisDiscrete$brief()
A 1-row data.frame
with some details of the axis.
indexOf()
Find indices in the axis domain. Given a vector of numerical
values x
, find their indices in the values of the axis. In effect,
this returns index values into the axis, but outside values will be
dropped.
CFAxisDiscrete$indexOf(x, method = "constant")
x
Vector of numeric values to find axis indices for.
method
Ignored.
Numeric vector of the same length as x
. Values of x
outside
of the range of the values in the axis are returned as 0
and
.Machine$integer.max
, respectively.
subset()
Return an axis spanning a smaller coordinate range. This
method returns an axis which spans the range of indices given by the
rng
argument.
CFAxisDiscrete$subset(group, rng = NULL)
group
The group to create the new axis in.
rng
The range of indices from this axis to include in the returned axis.
A CFAxisDiscrete
instance covering the indicated range of
indices. If the rng
argument includes only a single value, an
CFAxisScalar instance is returned with the value from this axis. If
the value of the argument is NULL
, return the entire axis (possibly
as a scalar axis).
write()
Write the axis to a netCDF file, including its attributes, but only if it has an associated NC variable in the file.
CFAxisDiscrete$write(nc = NULL)
nc
The handle of the netCDF file opened for writing or a group in
the netCDF file. If NULL
, write to the file or group where the axis
was read from (the file must have been opened for writing). If not
NULL
, the handle to a netCDF file or a group therein.
Self, invisibly.
clone()
The objects of this class are cloneable with this method.
CFAxisDiscrete$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.