row.names
attribute of a data frame.
row.names(x) row.names(x) <- value
x
.
This is coerced to a vector of character strings if it was not one already.
x
are changed to
value
.
The object
x
is also coerced to be a data frame
if it is not one already.
The
value
may be a character vector, or anything that
can be coerced to a character vector. However, it should not
be a
bdCharacter
or other
bdVector
;
you can convert these to an ordinary vector using
bd.coerce
Instead of using
names
to replace row names from a matrix,
use
rowIds
or
dimnames
.
When creating a data frame using
data.frame
,
it is possible to supply
row.names
which are not character, and are not coerced to character.
ff <- fuel.frame row.names(fuel.frame) row.names(ff) <- 1:60 # row names are now numbers, not car names