CFAxisTime | R Documentation |
This class represents a time axis. The functionality is provided
by the CFTime
class in the CFtime
package.
ncdfCF::CFObject
-> ncdfCF::CFAxis
-> CFAxisTime
friendlyClassName
(read-only) A nice description of the class.
dimnames
(read-only) The coordinates of the axis as a character vector.
new()
Create a new instance of this class.
CFAxisTime$new(grp, nc_var, nc_dim, values)
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.
values
The CFTime
instance that manages this axis.
print()
Summary of the time axis printed to the console.
CFAxisTime$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.
CFAxisTime$brief()
A 1-row data.frame
with some details of the axis.
time()
Retrieve the CFTime
instance that manages the values of
this axis.
CFAxisTime$time()
An instance of CFTime
.
indexOf()
Retrieve the indices of supplied values on the time axis.
CFAxisTime$indexOf(x, method = "constant", rightmost.closed = FALSE)
x
A vector of timestamps whose indices into the time axis to extract.
method
Extract index values without ("constant", the default) or with ("linear") fractional parts.
rightmost.closed
Whether or not to include the upper limit.
Default is FALSE
.
An integer vector giving the indices in the time axis of valid
values in x
, or integer(0)
if none of the values are valid.
slice()
Retrieve the indices of the time axis falling between two extreme values.
CFAxisTime$slice(x, rightmost.closed = FALSE)
x
A vector of two timestamps in between of which all indices into the time axis to extract.
rightmost.closed
Whether or not to include the upper limit.
Default is FALSE
.
An integer vector giving the indices in the time axis between
values in x
, or integer(0)
if none of the values are valid.
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.
CFAxisTime$subset(group, rng = NULL)
group
The group to create the new axis in.
rng
The range of values from this axis to include in the returned axis.
A CFAxisTime
instance covering the indicated range of indices.
If the rng
argument includes only a single value, an CFAxisScalar
instance is returned with its value being the character timestamp of
the value in 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. If the calendar name is "gregorian", it will be set to the functionally identical calendar "standard" as the former is deprecated.
CFAxisTime$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.
CFAxisTime$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.