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

Re: st: Re: nested foreach to rename variables


From   Buzz Burhans <wsb2@cornell.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Re: nested foreach to rename variables
Date   Wed, 16 Oct 2002 08:13:24 -0400

Thanks very much to Scott and Nick. Scott's much simpler approach, below, works like a charm. since I have to repeat this process many times over different datasets, it will be much easier than doing it by hand; thanks so much

Buzz Burhans
Dept. of Animal Science
Cornell University


At 10:38 PM 10/15/02 -0500, you wrote:

> I would appreciate any pointers on how to get this loop to work.

How about simpler construction:

for var v3-v14  \ num 18 15 12 9 7 6 5 4 3 2 1 0: rename X predayY


Scott



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