leveltensor: The level (number of indices) of a tensor

level.tensorR Documentation

The level (number of indices) of a tensor

Description

The level of a tensor is the number of dimensions or subscripts used.

Usage

level.tensor(X,...)

Arguments

X

the tensor to be used

...

not used

Details

The level of the tensor is the length of its dim attribute. Objects without a dim attribute get level 1 if they are of length > 1 and are marked as scalars by 0 level otherwise.

Value

the number of levels

Author(s)

K. Gerald van den Boogaart

See Also

to.tensor

Examples

A <- to.tensor(1:24,c(a=1,b=2,c=3,d=4))
level.tensor(A)
level.tensor(matrix(1))
level.tensor(1:10)
level.tensor(1)

tensorA documentation built on June 25, 2024, 1:16 a.m.

Related to leveltensor in tensorA...