[R] Removing "row.names"

Kurt Hornik Kurt.Hornik at ci.tuwien.ac.at
Tue Feb 6 21:46:23 CET 2001

>>>>> Marc Feldesman writes:

> I need to completely remove row.names from a dataframe.  Are there other 
> ways to remove them (and not anything else) besides:

> mydataframe<-data.frame(mydataframe, row.names=NULL)

> I realize that this doesn't really remove the row.names; it merely
> replaces the current row.names vector with the numbers 1..nrow (in
> quotes).

My understanding is that you cannot do that.  By definition, data frames
are lists all components of which have the same length, and have both
names and row.names attributes which must have the right length and no
duplicated elements.

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list