powered by
Gets the dimensions of an object.
dims(x, ...)# S3 method for default dims(x, ...)# S3 method for factor dims(x, ...)
# S3 method for default dims(x, ...)
# S3 method for factor dims(x, ...)
An integer vector of the dimensions.
An object.
Other arguments passed to methods.
Unlike base::dim(), dims returns the length of an atomic vector.
base::dim()
Other dimensions: ndims(), npdims(), pdims()
ndims()
npdims()
pdims()
dims(numeric(0)) dims(1:3) dims(factor("a")) dims(matrix(1:4, nrow = 2L)) dims(array(1:9, dim = c(3L,1L,3L))) dims(ToothGrowth) dims(Titanic)
Run the code above in your browser using DataLab