CFAxisCharacter {ncdfCF} | R Documentation |
CF character axis object
Description
This class represent CF axes that use categorical character labels as coordinate values. Note that this is different from a CFLabel, which is associated with an axis but not an axis itself.
This is an extension to the CF Metadata Conventions. As per CF, axes are required to have numerical values, which is relaxed here.
Super classes
ncdfCF::CFObject
-> ncdfCF::CFAxis
-> CFAxisCharacter
Active bindings
friendlyClassName
(read-only) A nice description of the class.
dimnames
(read-only) The coordinates of the axis as a character vector.
Methods
Public methods
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$peek()
ncdfCF::CFAxis$print()
ncdfCF::CFAxis$shard()
ncdfCF::CFAxis$subset()
ncdfCF::CFAxis$time()
ncdfCF::CFAxis$write()
Method new()
Create a new instance of this class.
Creating a new character axis is more easily done with the makeAxis()
function.
Usage
CFAxisCharacter$new(nc_var, nc_dim, orientation, values)
Arguments
nc_var
The netCDF variable that describes this instance.
nc_dim
The netCDF dimension that describes the dimensionality.
orientation
The orientation (
X
,Y
,Z
, orT
) or""
if different or unknown.values
The character coordinates of this axis.
Method brief()
Some details of the axis.
Usage
CFAxisCharacter$brief()
Returns
A 1-row data.frame
with some details of the axis.
Method identical()
Tests if the axis passed to this method is identical to
self
.
Usage
CFAxisCharacter$identical(axis)
Arguments
axis
The
CFAxisCharacter
instance to test.
Returns
TRUE
if the two axes are identical, FALSE
if not.
Method append()
Append a vector of values at the end of the current values of the axis.
Usage
CFAxisCharacter$append(from)
Arguments
from
An instance of
CFAxisCharacter
whose values to append to the values ofself
.
Returns
A new CFAxisCharacter
instance with values from self
and the
from
axis appended.
Method indexOf()
Find indices in the axis domain. Given a vector of character
strings x
, find their indices in the coordinates of the axis.
Usage
CFAxisCharacter$indexOf(x, method = "constant", rightmost.closed = TRUE)
Arguments
x
Vector of character strings to find axis indices for.
method
Ignored.
rightmost.closed
Ignored.
Returns
Numeric vector of the same length as x
. Values of x
that are
not equal to a coordinate of the axis are returned as NA
.
Method clone()
The objects of this class are cloneable with this method.
Usage
CFAxisCharacter$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.