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: RE: Rename all?


From   "Fogel, Ariel" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: Rename all?
Date   Wed, 7 Nov 2012 18:18:42 +0000

Why not simply use a loop?

forvalues i =1/10{
rename prc`i' shrout`i'
}

Ariel

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Zhangqunzi
Sent: Wednesday, November 07, 2012 1:13 PM
To: Stats
Subject: st: Rename all?

Dear all,

I am trying to rename a current varlist prc1...10 into shrout1....10.

I tried 
rename prc* shrout* 

But it doesn't work, what command should I use then?

Thanks a lot 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/

*
*   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