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

Seth Falcon sfalcon at fhcrc.org
Mon May 1 19:17:07 CEST 2006


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.


--

+ seth




R.version
               _                                                               
platform       powerpc-apple-darwin8.6.0                                       
arch           powerpc                                                         
os             darwin8.6.0                                                     
system         powerpc, darwin8.6.0                                            
status         Under development (unstable)                                    
major          2                                                               
minor          4.0                                                             
year           2006                                                            
month          05                                                              
day            01                                                              
svn rev        37951                                                           
language       R                                                               
version.string R version 2.4.0 Under development (unstable) (2006-05-01 r37951)



More information about the R-devel mailing list