Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Getting label name of a variable


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: Getting label name of a variable
Date   Tue, 2 Sep 2008 10:35:38 +0200

*************
sysuse auto, clear

foreach var of varlist *{
di "`:var l `var''"
}

loc trunklabel: var l trunk
di "`trunklabel'"
************

HTH
Martin

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Ashim Kapoor
Sent: Tuesday, September 02, 2008 10:18 AM
To: [email protected]
Subject: st: Getting label name of a variable

Hello everyone,

Supposer I have a var " var1 "  having  a label " years" . Can I get
the label of " var1 " and store it in a local macro ?

Thank you,
Ashim.
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index