

   dimnames {base}                              R Documentation

   DDiimmnnaammeess ooff aann OObbjjeecctt

   DDeessccrriippttiioonn::

        Retrieve or set the dimnames of an object.

   UUssaaggee::

        dimnames(x)
        dimnames(x) <- nlist

   DDeettaaiillss::

        The functions `dimnames' and `dimnames<-' are generic.

        For an `array' (and hence in particular, for a
        `matrix'), they retrieve or set the `dimnames'
        attribute (see attributes) of the object.

        Both have methods for data frames.  The dimnames of a
        data frame are its `row.names' attribute and its
        `names'.

   SSeeee AAllssoo::

        `rownames', `colnames'; `array', `matrix',
        `data.frame'.

   EExxaammpplleess::

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

