This help topic is for R version 0.60. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/dim.html
dim {base}R Documentation

Array Extents

Usage

dim(x)
dim(x) <- values

Value

This function retrieves the vector of extents of the array given as its argument. The second form above is used to shape a vector as an array by specifying its extents.

See Also

ncol, nrow and dimnames.

Examples

# simple versions of nrow and ncol could be defined as follows
nrow0 <- function(x) dim(x)[1]
ncol0 <- function(x) dim(x)[2]

[Package base version 0.60 ]