[Rd] row.names != rownames for data.frame?

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue May 2 09:51:22 CEST 2006


On Mon, 1 May 2006, Seth Falcon wrote:

> With a recent R 2.4 I notice the following:
>
> df <- data.frame(x=1:2)
>> row.names(df)
> [1] "1" "2"
>> rownames(df)
> [1] 1 2
>
> This seems related to recent changes in the internal storage format of
> the row names data for data frames.
>
> The man page for rownames says:
>
>     For a data frame, 'rownames' and 'colnames' are equivalent to
>     'row.names' and 'names' respectively.
>
> A number of Bioconductor packages seem to be relying on this.

Interesting: nothing on CRAN did.  Those are `equivalent' but not 
identical, but let's make them identical again.


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list