[R] sort

From: Alfons Sutter <alfonssutter_at_yahoo.com>
Date: Wed, 19 Mar 2008 02:41:26 -0700 (PDT)


Is there any function in R which sorted data as

x1 <- c(1,3,2,4,5,1)
x2 <- c(2,0,2,3,5,2)
TheData <- data.frame(x1,x2)
TheData1 <- sort(TheData, by=c(x1,x2))

Thanks in advance!

        [[alternative HTML version deleted]]

R-help_at_r-project.org 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 19 Mar 2008 - 09:43:50 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 19 Mar 2008 - 10:30:23 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.

list of date sections of archive