Learn R Programming

ncdfCF (version 0.4.0)

CFAxisDiscrete: CF discrete axis object

Description

This class represent discrete CF axes, i.e. those axes whose coordinate values do not represent a physical property. The coordinate values are ordinal values equal to the index into the axis.

Arguments

Super classes

ncdfCF::CFObject -> ncdfCF::CFAxis -> CFAxisDiscrete

Active bindings

friendlyClassName

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

dimnames

(read-only) The coordinates of the axis as an integer 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

CFAxisDiscrete$new(grp, nc_var, nc_dim, orientation)

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.


Method brief()

Some details of the axis.

Usage

CFAxisDiscrete$brief()

Returns

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


Method indexOf()

Find indices in the axis domain. Given a vector of numerical values x, find their indices in the values of the axis. In effect, this returns index values into the axis, but outside values will be dropped.

Usage

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

Arguments

x

Vector of numeric values to find axis indices for.

method

Ignored.

Returns

Numeric vector of the same length as x. Values of x outside of the range of the values in the axis are returned as 0 and .Machine$integer.max, respectively.


Method clone()

The objects of this class are cloneable with this method.

Usage

CFAxisDiscrete$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.