| NCGroup | R Documentation |
This class represents a netCDF group, the object that holds elements like dimensions and variables of a netCDF file.
Direct access to groups is usually not necessary. The principal objects of interest, CF data variables and axes, are accessible via CFGroup. Changing the properties of a netCDF group other than its name may very well invalidate the CF objects or even the netCDF file.
ncdfCF::NCObject -> NCGroup
parentParent group of this group, the owning CFDataset for the
root group.
subgroupsList of child NCGroup instances of this group.
NCvarsList of netCDF variables that are located in this group.
NCdimsList of netCDF dimensions that are located in this group.
NCudtsList of netCDF user-defined types that are located in this group.
friendlyClassName(read-only) A nice description of the class.
resource(read-only) The RNetCDF object to the underlying netCDF resource.
handle(read-only) Get the handle to the netCDF resource for the group
can_write(read-only) Is the resource writable?
nameSet or retrieve the name of the group. Note that the name is always relative to the location in the hierarchy that the group is in and it should thus not be qualified by backslashes. The name has to be a valid CF name. The name of the root group cannot be changed.
fullname(read-only) The fully qualified absolute path of the group.
root(read-only) Retrieve the root group.
CFSet or retrieve the CFGroup that is associated with this NC group.
new()Create a new instance of this class.
NCGroup$new(id, name, attributes = data.frame(), parent, resource)
idThe identifier of the group. If NA, the new group will be
created in the netCDF resource, unless argument parent == NULL, i.e.
the root group which already exists.
nameThe name of the group.
attributesOptional, a data.frame with group attributes.
parentThe parent group of this group. If NULL then argument
resource must be a valid instance of NCResource.
resourceOptional. Reference to the NCResource instance that provides access to the netCDF resource.
An instance of this class.
print()Summary of the group printed to the console.
NCGroup$print(stand_alone = TRUE, ...)
stand_aloneLogical to indicate if the group should be printed as
an object separate from other objects (TRUE, default), or print as part
of an enclosing object (FALSE).
...Passed on to other methods.
find_by_name()Find an object by its name. Given the name of an object, possibly preceded by an absolute or relative group path, return the object to the caller. Usually this method is called programmatically.
NCGroup$find_by_name(name)
nameThe name of an object, with an optional absolute or relative group path from the calling group. The object must be an NC group, dimension or variable.
The object with the provided name. If the object is not found,
returns NULL.
find_dim_by_id()Find an NC dimension object by its id. Given the id of a dimension, return the NCDimension object to the caller. The dimension has to be found in the current group or any of its parents.
NCGroup$find_dim_by_id(id)
idThe id of the dimension.
The NCDimension object with an identifier equal to the id
argument. If the object is not found, returns NULL.
has_name()Has a given name been defined in this group already?
NCGroup$has_name(name)
nameCharacter string. The name will be searched for, regardless of case.
TRUE if name is present in the group, FALSE otherwise.
set_name()Change the name of the NC group. The new name must be valid and should not duplicate a sibling group.
NCGroup$set_name(new_name)
new_nameThe new name for the NC group.
Self, invisibly.
unused()Find NC variables that are not referenced by CF objects. For debugging purposes only.
NCGroup$unused()
List of NCVariable.
create_group()Create a new group as a sub-group of the current group. This writes the new group to the netCDF resource, but only if it is open for writing.
NCGroup$create_group(CFgroup)
CFgroupThe CFGroup associated with this NC group.
The newly created group as a NCGroup instance, invisibly.
append()Append an object to this group.
NCGroup$append(obj)
objThe object to append. This must be an NCVariable or
NCDimension instance. Any other type of object will generate a
warning.
Self, invisible.
fullnames()This method lists the fully qualified name of this group, optionally including names in subgroups.
NCGroup$fullnames(recursive = TRUE)
recursiveShould subgroups be scanned for names too (default is
TRUE)?
A character vector with group names.
dimensions()List all the dimensions that are visible from this group, possibly including those that are defined in parent groups (by names not defined by any of their child groups in direct lineage to the current group).
NCGroup$dimensions(scope = "all")
scopeCharacter string that indicates if only dimensions in the
current group should be reported (local) or visible dimensions in
parent groups as well (all, default).
A vector of NCDimension objects.
clone()The objects of this class are cloneable with this method.
NCGroup$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.