sl.dim | R Documentation |
Simple function to extend the functionality of dim
to work also with vectors (returning a single integer in that case).
sl.dim(x)
x |
an array or vector with arbitrary ( |
A vector of length N
with elements giving the sizes of the dimensions of x
.
Helge Goessling
sl.dim(array(1:24,dim=c(4,3,2)))
## Should return:
## [1] 4 3 2
sl.dim(1:24)
## Should return:
## [1] 24
## Note that the second example does not work if dim() is used instead of sl.dim().
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.