This class is a basic ancestor to all classes that represent CF axes. More useful classes use this class as ancestor.
ncdfCF::CFObject -> CFAxis
groupThe NCGroup that this axis is located in.
NCdimThe NCDimension that stores the netCDF dimension details.
This is NULL for CFAxisScalar instances.
orientationA character "X", "Y", "Z" or "T" to indicate the orientation of the axis, or an empty string if not known or different.
boundsThe boundary values of this axis, if set. Create a basic CF axis object
Create a new CF axis instance from a dimension and a variable in a netCDF
resource. This method is called upon opening a netCDF resource by the
initialize() method of a descendant class suitable for the type of
axis.
friendlyClassName(read-only) A nice description of the class.
dimidThe netCDF dimension id of this axis.
lengthThe declared length of this axis.
Inherited methods
new()CFAxis$new(grp, nc_var, nc_dim, orientation)grpThe NCGroup that this axis is located in.
nc_varThe NCVariable instance upon which this CF axis is based.
nc_dimThe NCDimension instance upon which this CF axis is based.
orientationThe orientation of the axis: "X", "Y", "Z" "T", or "" when not known or relevant.
A basic CFAxis object.
print()Summary of the axis
Prints a summary of the axis to the console. This method is typically
called by the print() method of descendant classes.
CFAxis$print()
brief()Some details of the axis
CFAxis$brief()A 1-row data.frame with some details of the axis.
shard()Very concise information on the axis
The information returned by this function is very concise and most useful when combined with similar information from other axes.
CFAxis$shard()Character string with very basic axis information.
time()Return the CFtime instance that represents time
This method is only useful for CFAxisTime instances. This stub is here
to make the call to this method succeed with no result for the other axis
descendants.
CFAxis$time()NULL
sub_axis()Return an axis spanning a smaller dimension range
This method is "virtual" in the sense that it does not do anything other
than return NULL. This stub is here to make the call to this method
succeed with no result for the other axis descendants that do not
implement this method.
CFAxis$sub_axis(group, rng = NULL)groupThe group to create the new axis in.
rngThe range of values from this axis to include in the returned
axis. If the value of the argument is NULL, return the entire axis
(possibly as a scalar axis).
NULL
indexOf()Given a vector of numerical, timestamp or categorical values
x, find their indices in the values of the axis. With
method = "constant" this returns the index of the value lower than the
supplied values in x. With method = "linear" the return value
includes any fractional part.
If bounds are set on the numerical or time axis, the indices are taken
from those bounds. Returned indices may fall in between bounds if the
latter are not contiguous, with the exception of the extreme values in
x.
CFAxis$indexOf(x, method = "constant")xVector of numeric, timestamp or categorial values to find axis indices for. The timestamps can be either character, POSIXct or Date vectors. The type of the vector has to correspond to the type of the axis.
methodSingle character value of "constant" or "linear".
Numeric vector of the same length as x. If method = "constant",
return the index value for each match. If method = "linear", return
the index value with any fractional value. Values of x outside of the
range of the values in the axis are returned as 0 and .Machine$integer.max,
respectively.
clone()The objects of this class are cloneable with this method.
CFAxis$clone(deep = FALSE)deepWhether to make a deep clone.
CF axis object
The fields in this class are common among all CF axis objects.