| ndim | R Documentation |
ndim() returns the number of dimensions of an object.
lst.ndim() returns the number of dimensions of every list-element.
ndim(x)
lst.ndim(x)
x |
a vector or array (for |
For ndim(): an integer scalar.
For lst.ndim(): an integer vector, with the same length, names and dimensions as x.
# matrix example ====
x <- list(
array(1:10, 10),
array(1:10, c(2, 5)),
array(c(letters, NA), c(3,3,3))
)
lst.ndim(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.