dimension: The dimension of a vector or matrix or a data frame
Description
Returns the dimension (i.e., number of columns) of x,
which is a matrix or a vector or a data frame.
This is different than the dim function in base R,
in the sense that,
dimension gives only the number of columns of the argument x,
while dim gives the number of rows and
columns of x.
dimension also works for a scalar or a vector,
while dim yields NULL for such arguments.
Usage
dimension(x)
Value
Dimension (i.e., number of columns) of x
Arguments
x
A vector or a matrix or a data frame
whose dimension is to be determined.