ndims | R Documentation |
Provides number of array dimensions.
ndims(A)
A |
object of which to determine the number of dimensions |
Simply invokes length(size(A))
.
Returns the number of dimensions in the array A
.
The number of dimensions is always greater than or equal to 2.
Initial implementation returned length
.
P. Roebuck proebuck1701@gmail.com
size
ndims(2:9) # 2
ndims(magic(4)) # 2
ndims(array(1:8, c(2,2,2))) # 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.