shape {dst}R Documentation

Obtain dimensions of an array or length of a vector with a single command

Description

shape returns the dimension of given array or returns the length of a given vector. The function is taken from the project APL in R (https://rpubs.com/deleeuw/158476).

Usage

shape(a)

Arguments

a

An array or a vector.

Value

The dimension of the array a or the length of the vector a.

Author(s)

Claude Boivin

References

Examples

shape(array(c(1:6), c(2,3)))
shape(c("a", "b"))

[Package dst version 1.7.0 Index]