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

Re: st: Simple question about sorted datasets


From   Phil Schumm <[email protected]>
To   [email protected]
Subject   Re: st: Simple question about sorted datasets
Date   Thu, 30 Sep 2004 17:03:17 -0500

At 9:43 PM +0100 9/30/04, Mark Schaffer wrote:
I want a program to be able to find out if the dataset in memory is
sorted.  If possible, I also want it to be able to find out what the sort
variables are.  But I don't want the dataset to get sorted in the process.

You may do this is with the extended macro function sortedby:

loc macname: sortedby

This will place the name of the variable(s) by which the dataset in memory is sorted (if any) in the local macro macname ([U] 21.3 Macros, [P] macro).


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