[R] Sorting problem
Jens Nieschulze
jniesch at gwdg.de
Fri Sep 13 17:34:14 CEST 2002
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list