| NCObject | R Documentation |
This class is a basic ancestor to all classes that represent netCDF objects, specifically groups, dimensions, variables and the user-defined types in a netCDF file. More useful classes use this class as ancestor.
The fields in this class are common among all netCDF objects. In addition, this class manages the attributes for its descendent classes.
id(read-only) Retrieve the identifier of the netCDF object.
name(read-only) Retrieve the name of the object.
attributes(read-only) Read the attributes of the object. When
there are no attributes, an empty data.frame will be returned.
new()Create a new netCDF object. This class should not be instantiated directly, create descendant objects instead.
NCObject$new(id, name, attributes = data.frame())
idNumeric identifier of the netCDF object.
nameCharacter string with the name of the netCDF object.
attributesOptional, data.frame with attributes of the object.
print_attributes()This function prints the attributes of the netCDF object to the console.
NCObject$print_attributes(width = 50L)
widthThe maximum width of each column in the data.frame when
printed to the console.
attribute()Retrieve an attribute of a NC object.
NCObject$attribute(att, field = "value")
attSingle character string of attribute to return.
fieldThe field of the attribute to return values from. This must be "value" (default) or "type".
If the field argument is "type", a character string. If field
is "value", a single value of the type of the attribute, or a vector
when the attribute has multiple values. If no attribute is named with a
value of argument att NA is returned.
write_attributes()Write the attributes of this object to a netCDF file.
NCObject$write_attributes(nc, nm)
ncThe handle to the netCDF file opened for writing.
nmThe NC variable name or "NC_GLOBAL" to write the attributes to.
Self, invisibly.
clone()The objects of this class are cloneable with this method.
NCObject$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.