ndims | R Documentation |
Gets the number of dimensions of an object as returned by dims()
.
The default methods returns the length of dims()
.
ndims(x, ...) ## Default S3 method: ndims(x, ...) ## S3 method for class 'matrix' ndims(x, ...) ## S3 method for class 'data.frame' ndims(x, ...)
x |
An object. |
... |
Other arguments passed to methods. |
For matrices ndims()
is always 2L.
For data frames ndims()
is always 2L.
A integer scalar of the number of dimensions.
Other dimensions:
dims()
,
npdims()
,
pdims()
ndims(character(0)) ndims(1:3) ndims(matrix(1)) ndims(data.frame()) ndims(array(1:9, dim = c(3,1,3)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.