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   Buzz Burhans <[email protected]>
To   [email protected]
Subject   Re: st: How to rename variables by adding a suffix
Date   Fri, 06 Aug 2004 10:00:47 -0400


-renvars- by Jeron Weesie will do this. findit renvars will find it for installation, as I don't think it is on ssc


At 09:04 AM 8/6/2004 -0400, you wrote:

Dear Statalisters,

I have a simple question. How do I add a suffix to all variables in my dataset. So suppose I want the variables WHEAT, MAIZE, CEREAL to be renamed to FOOD_WHEAT, FOOD_MAIZE, and FOOD_CEREAL. I can't use the command * renpfix * because it only allows you to change one suffix for another, such as to change GRAINWHEAT to FOOD_WHEAT by typing the command

renpfix grain food_

I could do this manually, but when I want to add the suffix food to, say, 80 variables that becomes tedious. Any ideas?


Tewodaj Mogues
Dept. of Agricultural and Applied Economics
University of Wisconsin - Madison
427 Lorch St. #317, Taylor Hall
Madison, WI 53706

* For searches and help try:
Buzz Burhans
[email protected]

*   For searches and help try:

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