Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Alice Guerra <alice.guerra88@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: How to run a loop on labels |
Date | Wed, 3 Jul 2013 16:23:48 +0200 |
Dear Statalists, I have a list of variables' names and corresponding labels: x1 label: Total duration in 1 y1 label: Total people in 1 z1 label: Total costs in 1 x2 label: Total duration in 2 y2 label: Total people in 2 z2 label: Total costs in 2 1 corresponds to Administrative Office, and 2 to Economic Department. How can I substitute the 1 with Administrative Office in all the labels of variables that end with 1? And, that is the same, how can I substitute the 2 with Economic Department in all the labels of variables that end with 2? Is it possible to run a loop for labels? * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/