dims {Zelig}R Documentation

Return Dimensions of Vectors, Arrays, and Data Frames

Description

Retrieve the dimensions of a vector, array, or data frame.

Usage

dims(x)

Arguments

x An R object. For example, a vector, matrix, array, or data frame.

Value

The function dims performs exactly the same as dim, and additionally returns the length of vectors (treating them as one-dimensional arrays).

Author(s)

Olivia Lau <olau@fas.harvard.edu>

See Also

dim, length

Examples

a <- 1:12
dims(a)

a <- matrix(1, nrow = 4, ncol = 9)
dims(a)

[Package Zelig version 2.6-3 Index]