Dear Maoyong,
I am not sure what you are asking about, but if you are asking to perform
the same operation on all variables, then do the following
foreach v of varlist _all {
command referring to `v'
}
Best,
Renzo
----------------------------------------------------------------------------
----
*From "Maoyong Fan" <[email protected]>
To "statalist" <[email protected]>
Subject st: How to get the variable name
Date Thu, 17 Jun 2004 22:58:12 -0800
----------------------------------------------------------------------------
----
Dear Friends,
I just wonder how can I get the list of varibale name automatically
instead of looking at describe list. If I can get the list of the variable
name and store them into a local variable, I could use "foreach var in local
var" to do data management on each variable. Because I have do deal with
more than 100 stata data files and do some data management for each data
file. Using loop will same a lot of time than do that manually.
Warm regards,
Maoyong Fan
*
* 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/