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]

Re: st: How do I put a value of a local macro into a variable label


From   Christophe Kolodziejczyk <[email protected]>
To   [email protected]
Subject   Re: st: How do I put a value of a local macro into a variable label
Date   Fri, 27 Jan 2012 14:08:57 +0100

something like this

local i=1
foreach w in a b c d {

label var `w'var "Variable of wave `i++' "
 }

Christophe

2012/1/27 Andreas Daniel <[email protected]>:
> Hi,
>
> is there a way to put the values of a local macro into a variable label
> using a foreach loop, like
>
>
> local wave 1 2 3 4
>
> foreach w in a b c d {
>
> label var `w'var "Variable of wave `wave' "
>
> }
>
>
> Thank you very much for your help!!
>
>
> best regards , Andy
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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