[R] how to change the dataframe labels' ?

From: domenico pestalozzi <statadat_at_gmail.com>
Date: Wed 24 Jan 2007 - 11:23:56 GMT


I import a dataframe composed by 2 variables and 14000 cases. Now I need the labels of the cases sorted by the second variable V2, but if I sort the dataframe according to the second variable:

mydataframe<- mydataframe[order(mydataframe$V2),]

I notice that the labels are always the same (that is, not ordered by V2).

How to change them?
I tried :

labels(mydataframe)<-1:14000

but it doesn't work.

Thanks

domenico

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed Jan 24 22:39:46 2007

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 24 Jan 2007 - 12:30:32 GMT.

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