Learn R Programming

ncdfCF (version 0.4.0)

CFAxisNumeric: Numeric CF axis object

Description

This class represents a numeric axis. Its values are numeric. This class is used for axes with numeric values but without further knowledge of their nature. More specific classes descend from this class.

Arguments

Super classes

ncdfCF::CFObject -> ncdfCF::CFAxis -> CFAxisNumeric

Public fields

values

The values of the axis, usually a numeric vector.

Active bindings

friendlyClassName

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

dimnames

(read-only) The coordinates of the axis as a numeric vector, or labels for every axis element if they have been set.

Methods

Inherited methods


Method new()

Create a new instance of this class.

Usage

CFAxisNumeric$new(grp, nc_var, nc_dim, orientation, values)

Arguments

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.

orientation

The orientation (X, Y, Z, or T) or "" if different or unknown.

values

The dimension values of this axis.


Method print()

Summary of the time axis printed to the console.

Usage

CFAxisNumeric$print(...)

Arguments

...

Arguments passed on to other functions. Of particular interest is width = to indicate a maximum width of attribute columns.

Returns

self, invisibly.


Method brief()

Some details of the axis.

Usage

CFAxisNumeric$brief()

Returns

A 1-row data.frame with some details of the axis.


Method range()

Retrieve the range of coordinate values in the axis.

Usage

CFAxisNumeric$range()

Returns

A numeric vector with two elements with the minimum and maximum values in the axis, respectively.


Method indexOf()

Retrieve the indices of supplied values on the axis. If the axis has bounds then the supplied values must fall within the bounds to be considered valid.

Usage

CFAxisNumeric$indexOf(x, method = "constant")

Arguments

x

A numeric vector of values whose indices into the axis to extract.

method

Extract index values without ("constant", the default) or with ("linear") fractional parts.

Returns

An integer vector giving the indices in x of valid values provided, or integer(0) if none of the x values are valid.


Method sub_axis()

Return an axis spanning a smaller dimension range. This method returns an axis which spans the range of indices given by the rng argument.

Usage

CFAxisNumeric$sub_axis(group, rng = NULL)

Arguments

group

The group to create the new axis in.

rng

The range of values from this axis to include in the returned axis.

Returns

A CFAxisNumeric instance covering the indicated range of indices. If the rng argument includes only a single value, an CFAxisScalar instance is returned with the value from this axis. If the value of the argument is NULL, return the entire axis (possibly as a scalar axis).


Method clone()

The objects of this class are cloneable with this method.

Usage

CFAxisNumeric$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.