This function is shorthand for length(dim(object)).
Arguments
- object
An R object.
Value
The dimensionality of the object. Objects without a dim
attribute will produce zero.
Author
Jon Clayden <code@clayden.org>
Examples
ndim(array(0L, dim=c(10,10)))
#> [1] 2