row.names                package:base                R Documentation

Get and Set Row Names for Data Frames

Description:

     All data frames have a row names attribute, a character vector of
     length the number of rows with no duplicates nor missing values.

     For convenience, these are generic functions for which users can
     write other methods, and there are default methods for arrays. 
     The description here is for the 'data.frame' method.

Usage:

     row.names(x)
     row.names(x) <- value

Arguments:

       x: object of class '"data.frame"', or any other class for which
          a method has been defined.

   value: a vector with the same length as the number of rows of 'x',
          to be coerced to character.  Duplicated or missing values are
          not allowed.

Value:

     'row.names' returns a character vector.

     'row.names<-' returns a data frame with the row names changed.

Note:

     'row.names' is similar to 'rownames' for arrays, and it has a
     method that calls 'rownames' for an array argument.

References:

     Chambers, J. M. (1992) _Data for models._ Chapter 3 of
     _Statistical Models in S_ eds J. M. Chambers and T. J. Hastie,
     Wadsworth & Brooks/Cole.

See Also:

     'data.frame', 'rownames'.

