Description Usage Arguments Value Note Author(s) See Also Examples
Replicates some of the functionality of MATLAB's size function.
1 |
x |
An R object accepted by |
dim |
An integer specifying the size of the dimension to return. |
If x is anything other than a vector the result from size will be identical to dim (i.e. a vector of mode integer).
If is.vector(x) == TRUE then size will return a vector equal to c(1,length(x)) (i.e. 1 row and n columns).
is.vector returns FALSE if x is a factor. This seems a little odd, but for now, if you provide a factor then size will return NULL with a warning.
Daniel Pritchard
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.