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

st: sorting order


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: sorting order
Date   Thu, 4 Nov 2004 10:04:30 -0500

Barbara asked
And second, is there any command (e.g. assert) in order to check the sort sequence and only in case of being unsorted sorts the data?

Nick Cox' reply indicated that unneeded sorts would not be performed. But this part of her question remains, and it might be useful to know how to do this:

. sort foreign rep78

. local sorted: sortedby

. di "`sorted'"
foreign rep78

whelp extended_fcn for the gory details.

Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html

*
* 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