Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: How to run a loop on labels


From   Alice Guerra <[email protected]>
To   [email protected]
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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index