Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: foreach to renumber vars
From
"B. Timothy Walsh" <[email protected]>
To
[email protected]
Subject
st: foreach to renumber vars
Date
Tue, 07 Sep 2010 12:34:32 -0400
I would like to rename/renumber variables of the format x2 - x100 to y0 -
y98. In other words, I'd like to subtract 2 from the "subscript".
I'm afraid I am still not skilled enough to figure out how to do this with
foreach and a macro.
I would appreciate suggestions. Many thanks in advance!
Tim Walsh
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/