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]
Re: st: renaming variables
From
Abhimanyu Arora <[email protected]>
To
[email protected]
Subject
Re: st: renaming variables
Date
Fri, 21 May 2010 10:48:08 +0200
I think I interchanged i and j in my earlier email but still no success...
On Fri, May 21, 2010 at 10:44 AM, Abhimanyu Arora
<[email protected]> wrote:
> Dear statalist
> I would like to rename my variables var53....var108 such that var53,
> var56, var59 ......var107 etc...are renamed as year1990,
> year1991......year2008 repectively. I tried to use renvars(by Jeroen
> Weesie) and a forvalues loop, but am not able to succeed.
> Is there any other way?
> Thanks and regards
> Abhimanyu
>
> PS-my incorrect way follows
>
>
> forvalues j =53(3)107{
> forvalues i =1990/2008{
> renvars postsub(`i',`j') /*the arguments should be strings, I guess, though*/
> }
> }
> *
> * 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/
>
*
* 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/