Oleksandr,
You don't need the double quotes.
foreach var of varlist a-d {
rename `var' `var'_i
}
Friedrich Huebler
--- Oleksandr Shepotylo <[email protected]> wrote:
> I would like to add index i to some variable names. What is wrong
> with my code:
>
> variables: id a b c d
>
> foreach var of varlist a-d {
> rename "`var'" "`var'""_i"
> }
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
*
* 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/