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

st: RE: sorting order


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: sorting order
Date   Thu, 4 Nov 2004 15:06:57 -0000

Good point. In Stata 7 and 8 you can 
get there in one 

di "`: sortedby'" 

which shows nothing if Stata is unaware of
a sort order. 

Nick 
[email protected] 

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Kit Baum
> Sent: 04 November 2004 15:05
> To: [email protected]
> Subject: st: sorting order
> 
> 
> 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.
> 

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