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.
Inherited methods
ncdfCF::CFObject$add_coordinates()ncdfCF::CFObject$append_attribute()ncdfCF::CFObject$attribute()ncdfCF::CFObject$delete_attribute()ncdfCF::CFObject$print_attributes()ncdfCF::CFObject$set_attribute()ncdfCF::CFObject$write_attributes()ncdfCF::CFAxis$can_append()ncdfCF::CFAxis$identical()ncdfCF::CFAxis$peek()ncdfCF::CFAxis$shard()ncdfCF::CFAxis$time()
new()Create a new instance of this class.
Creating a new discrete axis is more easily done with the
makeDiscreteAxis() function.
CFAxisDiscrete$new(nc_var, nc_dim, orientation, dim_only = FALSE)nc_varThe netCDF variable that describes this instance.
nc_dimThe netCDF dimension that describes the dimensionality.
orientationThe orientation (X, Y, Z, or T) or "" if
different or unknown.
dim_onlyFlag if this axis only has a dimension on file but no NC variable.
...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.
append()Append a vector of values at the end of the current values
of the axis. In a discrete axis the values are always a simple sequence
so the appended values extend the sequence, rather than using the
values from axis from.
CFAxisDiscrete$append(from)fromAn instance of CFAxisDiscrete whose length to add to the
length of self.
A new CFAxisDiscrete with the combined length of self and the
from 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", rightmost.closed = TRUE)xVector of numeric values to find axis indices for.
methodIgnored.
rightmost.closedIgnored.
Numeric vector of the same length as x. Values of x outside
of the range of the values in the axis are returned as NA.
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)groupThe group to create the new axis in.
rngThe range of indices from this axis to include in the returned axis.
A CFAxisDiscrete instance covering the indicated range of
indices. If the value of the argument is NULL, return the entire
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)ncThe 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)deepWhether to make a deep clone.