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

Re: st: Aorder question

From   Richard Williams <[email protected]>
To   [email protected]
Subject   Re: st: Aorder question
Date   Wed, 20 Jul 2005 12:21:25 -0500

At 09:32 AM 7/20/2005 -0700, you wrote:
When I have a file with many variables, I keep them listed in the order they
are in the data collection instrument. However, if I can't remember where a
variable is I like to use aorder to put the variables in an alphabetical
list. How can I undo the aorder command to return to the original order
other than reopening the original dataset?
Alan Acock
[email protected]
Also, you might just want to do

ds, alpha

to list the vars alphabetically. Or, you could do

quietly ds
order `r(varlist)'

If you are going to give some commands between aorder and order, you may want to save r(varlist) as a local variable so it doesn't get erased by other commands, e.g.

quietly ds
local myvars `r(varlist)'
order `myvars'

On the other hand, just reopening the data set may be as quick and simple as anything!

Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal):
WWW (department):

* For searches and help try:

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