Re: [Rd] R-devel: rownames of a data.frame

From: Gregor Gorjanc <gregor.gorjanc_at_bfro.uni-lj.si>
Date: Wed 06 Dec 2006 - 10:08:22 GMT

Martin Maechler <maechler <at> r-project.org> writes: ...
> because colnames() and rownames() work via dimnames(), and so do
> "colnames<-" and "rownames<-" ---
> I think it would be unwise to change this, since it's well documented
> property of these functions.
>
> As you noted yourself, using names() and "names<-"
> i.e.,
> names(df1) <- "bla"
> in the example above, is the recommended way for data frames and does not
> change the rownames to character.

Thank you for this followup! It seems that I should have read the documentation more carefully. May I just suggest to add names in see also for row.names help page.

Regards, Gregor



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed Dec 06 22:28:25 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 06 Dec 2006 - 22:30:52 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.