Roger Newson on using -rename- under the aegis of -for-:
>
> One simple possibility is to use the -rename- command; see
> the manual under -[R] rename-. Annelies might type
>
> for X in numlist 1(1)10) \ Y in any morocco somalia britain
> holland usa
> belgium china ecuador venezuela uzbekistan:rename
> _Iorigin_X _Iori_Y
>
> This uses the -for- command to do a lot of repeats; see
> -help for- or the
> manuals under -[R] for-.
It may be of interest to compare this with the -renvars-
syntax recommended in my earlier posting.
renvars _Iorigin_* \ morocco somalia britain holland usa
belgium china ecuador venezuela uzbekistan
renvars morocco-uzbek, pref(_I_ori_)
Swings and roundabouts, as we say hereabouts.
Nick
[email protected]
*
* 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/