Learn R Programming

ncdfCF (version 0.2.1)

CFObject: CF base object

Description

This class is a basic ancestor to all classes that represent CF objects, specifically data variables and axes. More useful classes use this class as ancestor.

Arguments

Public fields

NCvar

The NCVariable instance that this CF object represents.

Active bindings

friendlyClassName

(read-only) A nice description of the class.

id

(read-only) The identifier of the CF object.

name

(read-only) The name of the CF object.

attributes

(read-only) A data.frame with the attributes of the CF object.

Methods


Method new()

Create a new CF object instance from a variable in a netCDF resource. This method is called upon opening a netCDF resource. It is rarely, if ever, useful to call this constructor directly from the console. Instead, use the methods from higher-level classes such as CFVariable.

Usage

CFObject$new(nc_var)

Arguments

nc_var

The NCVariable instance upon which this CF object is based.

Returns

A CFobject instance.


Method attribute()

Retrieve attributes of any CF object.

Usage

CFObject$attribute(att, field = "value")

Arguments

att

Vector of character strings of attributes to return.

field

The field of the data.frame to return values from. This must be "value" (default), "type" or "length".

Returns

A vector of values from the data.frame, named with the att value, character(0) if a name in att is not an attribute of this object.


Method print_attributes()

Print the attributes of the CF object.

Usage

CFObject$print_attributes(width = 50)

Arguments

width

The maximum width of each column in the data.frame when printed to the console.


Method clone()

The objects of this class are cloneable with this method.

Usage

CFObject$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

The fields in this class are common among all CF objects.