Bookmark and Share

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: Looping to rename


From   Zhangqunzi <[email protected]>
To   Stats <[email protected]>
Subject   st: Looping to rename
Date   Tue, 6 Nov 2012 20:44:47 +0100

Dear all,

I want to rename my var list: p1,p3,p7..,
Into new one :p1,p2,p3... 

Currently I am running such loop:
Local i 
For var of varlist
Rename var pi

But stata tells me error: can't find macro i ... How should I solve this problem?

I can't use renvars due to memory problem. 
Thanks in advance



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index