| CFLabel | R Documentation |
This class represent CF labels, i.e. a variable of character type that provides a textual label for a discrete or general numeric axis. See also CFAxisCharacter, which is an axis with character labels.
ncdfCF::CFObject -> ncdfCF::CFData -> CFLabel
friendlyClassName(read-only) A nice description of the class.
valuesSet or retrieve the labels of this object. In general you
should use the coordinates field rather than this one. Upon setting
values, if there is a linked netCDF resource, this object will be
detached from it.
coordinates(read-only) Retrieve the labels of this object. Upon retrieval, label values are read from the netCDF resource, if there is one, upon first access and cached thereafter.
length(read-only) The number of labels in the set.
dimidThe netCDF dimension id of this label set. Setting this value to anything other than the correct value will lead to disaster.
ncdfCF::CFObject$append_attribute()ncdfCF::CFObject$attach_to_group()ncdfCF::CFObject$attribute()ncdfCF::CFObject$attributes_identical()ncdfCF::CFObject$delete_attribute()ncdfCF::CFObject$print_attributes()ncdfCF::CFObject$set_attribute()ncdfCF::CFObject$write_attributes()ncdfCF::CFData$detach()ncdfCF::CFData$dim()new()Create a new instance of this class.
CFLabel$new(var, group, values = NA, start = NA, count = NA)
varThe NCVariable instance upon which this CF object is based when read from a netCDF resource, or the name for the object new CF object to be created.
groupThe CFGroup that this instance will live in.
valuesOptional. The labels of the CF object. Ignored when
argument var is a NCVariable object.
startOptional. Integer index value indicating where to start
reading data from the file. The value may be NA (default) to read all
data, otherwise it must not be larger than the number of labels.
Ignored when argument var is not an NCVariable instance.
countOptional. Integer value indicating the number of labels to
read from file. The value may be NA to read to the end of the labels,
otherwise its value must agree with the corresponding start value and
the number of labels on file. Ignored when argument var is not an
NCVariable instance.
A CFLabel instance.
print()Prints a summary of the labels to the console.
CFLabel$print(...)
...Arguments passed on to other functions. Of particular interest
is width = to indicate a maximum width of attribute columns.
identical()Tests if the object passed to this method is identical to
self.
CFLabel$identical(lbl)
lblThe CFLabel instance to test.
TRUE if the two label sets are identical, FALSE if not.
copy()Create a copy of this label set. The copy is completely
separate from self, meaning that both self and all of its
components are made from new instances.
CFLabel$copy(name = "", group)
nameThe name for the new label set. If an empty string is passed, will use the name of this label set.
groupThe CFGroup where the copy of this axis will live.
The newly created label set.
slice()Given a range of domain coordinate values, returns the indices into the axis that fall within the supplied range.
CFLabel$slice(rng)
rngA character vector whose extreme (alphabetic) 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 values of the axis fall within the range of
coordinates.
subset()Retrieve a subset of the labels.
CFLabel$subset(name, group, rng)
nameThe name for the new label set, optional.
groupThe CFGroup where the copy of this label set will live.
rngThe range of indices whose values from this axis to include in the returned axis.
A CFLabel instance, or NULL if the rng values are invalid.
write()Write the labels to a netCDF file, including its attributes.
CFLabel$write()
Self, invisibly.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.