dims {Zelig} | R Documentation |
Retrieve the dimensions of a vector, array, or data frame.
dims(x)
x |
An R object. For example, a vector, matrix, array, or data frame. |
The function dims
performs exactly the same as dim
, and
additionally returns the length
of vectors (treating them as
one-dimensional arrays).
Olivia Lau <olau@fas.harvard.edu>
dim
, length
a <- 1:12 dims(a) a <- matrix(1, nrow = 4, ncol = 9) dims(a)