Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: How to rename variables by adding a suffix


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: How to rename variables by adding a suffix
Date   Fri, 6 Aug 2004 16:44:47 +0100

There is a difference. It depends what you want
to do. 

On a different level, -for- is going to 
work well provided that you can recall the 
syntax and so long as it is supported by 
Stata. 

Looking ahead the real tradeoff is, as so often, 
between a canned solution using something like
-rensfix- or -renvars-, or doing it from first
principles with -foreach-. 

Nick 
n.j.cox@durham.ac.uk 

adiallo5@worldbank.org
 
> Or I guess better:
> for var  * :  ren  X   food_X

Ronán Conroy                            
 
> . for var grain wheat fish: rename X food_X

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



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index