Dear list I have a quick question which is probably very simple. I have a data frame, and want to sort the data by putting one column in to ascending order i.e becomes A B A B 1 0.5 3 0.4 2 0.9 1 0.5 3 0.4 4 0.7 4 0.7 2 0.9 I can't seem to find anything in the help about sorting data frames. Many thanks Laura -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Fri, 13 Sep 2002 Bayesianbay at aol.com wrote: %Dear list % %I have a quick question which is probably very simple. % %I have a data frame, and want to sort the data by putting one column in to %ascending order % %i.e becomes %A B A B %1 0.5 3 0.4 %2 0.9 1 0.5 %3 0.4 4 0.7 %4 0.7 2 0.9 % %I can't seem to find anything in the help about sorting data frames. foo[order(foo[,"B"]),] ? % %Many thanks %Laura %-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- %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 %_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ % *********************************************************************** Jens Nieschulze -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Fri, 13 Sep 2002 Bayesianbay at aol.com wrote:> Dear list > > I have a quick question which is probably very simple. > > I have a data frame, and want to sort the data by putting one column in to > ascending order > > > I can't seem to find anything in the help about sorting data frames. >You want order() -thomas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._