powered by
Gets the number of dimensions of an object as returned by dims().
dims()
The default methods returns the length of dims().
ndims(x, ...)# S3 method for default ndims(x, ...)# S3 method for matrix ndims(x, ...)# S3 method for data.frame ndims(x, ...)
# S3 method for default ndims(x, ...)
# S3 method for matrix ndims(x, ...)
# S3 method for data.frame ndims(x, ...)
An object.
Other arguments passed to methods.
A integer scalar of the number of dimensions.
For matrices and data frames, ndims() is always 2L.
ndims()
Other dimensions: dims(), npdims(), pdims()
npdims()
pdims()
# NOT RUN { ndims(character(0)) ndims(1:3) ndims(matrix(1)) ndims(data.frame()) # }
Run the code above in your browser using DataLab