Learn R Programming

vectools (version 0.3.0)

02_language-like_functions: Language-Like Functions

Description

Return the CLASS property or number of dimensions.

Usage

CLASS (v)

ndim (v)

Arguments

v

An ObjectArray.

Details

CLASS returns a character giving the CLASS property of the ObjectArray. This is the class or classes of the objects within the array.

<OBJECT> means that the ObjectArray can contain any objects.

The ndim function returns an integer, giving the number of dimensions.

See Also

ObjectArray

Examples

Run this code
# NOT RUN {
v <- ObjectArray (c (2, 5), CLASS="MyClass")

CLASS (v)
class (v)

ndim (v)
# }

Run the code above in your browser using DataLab