Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: sort


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: sort
Date   Wed, 29 Jun 2005 09:54:43 +0100

The essence of Florence's problem is that two (or more) variables
be sorted together. How would this -egen- function be used
to achieve that? 

Nick 
[email protected] 

philippe van kerm
 
> This query has been answered yesterday, but for the record, let me add
> that this is what _gclsort does.  _gclsort is available from the SSC
> archive (ssc install _gclsort).
>   
> sysuse auto
> egen price2 = clsort(price)
 
NEYMOTIN, FLORENCE
 
> > is there a way to sort just ONE variable without changing the 
> > rest of the dataset? i.e. I want to 
> > sort EACH variable seperately and leave the rest of the 
> > dataset the same...

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index