This function is shorthand for length(dim(object)).
length(dim(object))
ndim(object)
An R object.
The dimensionality of the object. Objects without a dim attribute will produce zero.
dim
# NOT RUN { ndim(array(0L, dim=c(10,10))) # }
Run the code above in your browser using DataLab