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" <[email protected]>
To   <[email protected]>
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 
[email protected] 

[email protected]
 
> 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index