[ top | up ]

Array Labels

Syntax

dimnames(x)
dimnames(x) <- nlist

Description

dimnames can be used to obtain the list of extent labels of the array given as its argument. The second form above can be used to set these labels.

See Also

rownames, colnames.

Examples

# simple versions of rownames and colnames # could be defined as follows rownames <- function(x) dimnames(x)[1] colnames <- function(x) dimnames(x)[2]