| CFAxisNumeric | R Documentation |
This class represents a numeric axis. Its values are numeric. This class is used for axes with numeric values but without further knowledge of their nature. More specific classes descend from this class.
ncdfCF::CFObject -> ncdfCF::CFAxis -> CFAxisNumeric
friendlyClassName(read-only) A nice description of the class.
dimnames(read-only) The coordinates of the axis as a vector. These are by default the values of the axis, but it could also be a set of auxiliary coordinates, if they have been set.
ncdfCF::CFObject$append_attribute()ncdfCF::CFObject$attribute()ncdfCF::CFObject$delete_attribute()ncdfCF::CFObject$dim()ncdfCF::CFObject$print_attributes()ncdfCF::CFObject$set_attribute()ncdfCF::CFObject$update_coordinates_attribute()ncdfCF::CFObject$write_attributes()ncdfCF::CFAxis$can_append()ncdfCF::CFAxis$configure_terms()ncdfCF::CFAxis$copy_terms()ncdfCF::CFAxis$detach()ncdfCF::CFAxis$peek()ncdfCF::CFAxis$shard()ncdfCF::CFAxis$write()new()Create a new instance of this class.
Creating a new axis is more easily done with the makeAxis() function.
CFAxisNumeric$new( var, values, start = 1L, count = NA, orientation = "", attributes = data.frame() )
varThe name of the axis when creating a new axis. When reading an axis from file, the NCVariable object that describes this instance.
valuesOptional. The values of the axis in a vector. The values
have to be numeric with the maximum value no larger than the minimum
value + 360, and monotonic. Ignored when argument var is a
NCVariable object.
startOptional. Integer index where to start reading axis data
from file. The index may be NA to start reading data from the start.
countOptional. Number of elements to read from file. This may be
NA to read to the end of the data.
orientationOptional. The orientation of the axis: "X", "Y", "Z" "T", or "" (default) when not known or relevant.
attributesOptional. A data.frame with the attributes of the
axis. When an empty data.frame (default) and argument var is an
NCVariable instance, attributes of the axis will be taken from the
netCDF resource.
print()Summary of the axis printed to the console.
CFAxisNumeric$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.
CFAxisNumeric$brief()
A 1-row data.frame with some details of the axis.
range()Retrieve the range of coordinate values in the axis.
CFAxisNumeric$range()
A numeric vector with two elements with the minimum and maximum values in the axis, respectively.
indexOf()Retrieve the indices of supplied coordinates on the axis. If the axis has boundary values then the supplied coordinates must fall within the boundaries of an axis coordinate to be considered valid.
CFAxisNumeric$indexOf(x, method = "constant", rightmost.closed = TRUE)
xA numeric vector of coordinates whose indices into the axis to extract.
methodExtract index values without ("constant", the default) or with ("linear") fractional parts.
rightmost.closedWhether or not to include the upper limit. This
parameter is ignored for this class, it always is TRUE.
A vector giving the indices in x of valid coordinates provided.
Values of x outside of the range of the coordinates in the axis are
returned as NA. If the axis has boundary values, then values of x
that do not fall on or between the boundaries of an axis coordinate are
returned as NA.
slice()Given a range of domain coordinate values, returns the indices into the axis that fall within the supplied range. If the axis has bounds, any coordinate whose boundary values fall entirely or partially within the supplied range will be included in the result.
CFAxisNumeric$slice(rng)
rngA numeric vector whose extreme values indicate the indices of coordinates to return.
An integer vector of length 2 with the lower and higher indices
into the axis that fall within the range of coordinates in argument
rng. Returns NULL if no (boundary) values of the axis fall within
the range of coordinates.
copy()Create a copy of this axis. The copy is completely separate
from self, meaning that both self and all of its components are made
from new instances.
CFAxisNumeric$copy(name = "")
nameThe name for the new axis. If an empty string is passed, will use the name of this axis.
The newly created axis.
copy_with_values()Create a copy of this axis but using the supplied values. The attributes are copied to the new axis. Boundary values and auxiliary coordinates are not copied.
After this operation the attributes of the newly created axes may not be accurate, except for the "actual_range" attribute. The calling code should set, modify or delete attributes as appropriate.
CFAxisNumeric$copy_with_values(name = "", values)
nameThe name for the new axis. If an empty string is passed, will use the name of this axis.
valuesThe values to the used with the copy of this axis.
The newly created axis.
identical()Tests if the axis passed to this method is identical to
self.
CFAxisNumeric$identical(axis)
axisThe CFAxisNumeric or sub-class instance to test.
TRUE if the two axes are identical, FALSE if not.
append()Append a vector of values at the end of the current values
of the axis. Boundary values are appended as well but if either this
axis or the from axis does not have boundary values, neither will the
resulting axis.
CFAxisNumeric$append(from)
fromAn instance of CFAxisNumeric whose values to append to the
values of this axis.
A new CFAxisNumeric instance with values from this axis and the
from axis appended.
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.
CFAxisNumeric$subset(name = "", rng = NULL)
nameThe name for the new axis. If an empty string is passed (default), will use the name of this axis.
rngThe range of indices whose values from this axis to include in
the returned axis. If the value of the argument is NULL, return a
copy of the axis.
A new CFAxisNumeric instance covering the indicated range of
indices. If the value of the argument rng is NULL, return a copy of
this axis as the new axis.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.