[R] Sorting a dataframe

Marc Schwartz MSchwartz at medanalytics.com
Tue Aug 12 18:54:13 CEST 2003


On Tue, 2003-08-12 at 11:38, Paul, David A wrote:
> Undoubtedly a simple question:
> 
> I've looked at order() and sort() in the help pages for
> R1.7.1.  It doesn't appear that these functions are immediately
> suited to doing the same thing as
> 
> PROC SORT DATA = BLAH;
> 	BY X Y Z;
> RUN;
> 
> in SAS.  I have also checked Frank Harrell's Hmisc library.
> Could someone point me in the right direction so I can sort 
> by the levels of Z within the levels of Y within the levels 
> of X?  Everything needs to be in ascending order.
> 
> 
> Much thanks in advance,
>   david paul



A quick search of the R-help archive would reveal this recent post:

https://www.stat.math.ethz.ch/pipermail/r-help/2003-July/034865.html

:-)


HTH,

Marc Schwartz




More information about the R-help mailing list