Statalist


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

Re: st: Getting label name of a variable


From   Johannes Geyer <[email protected]>
To   [email protected]
Subject   Re: st: Getting label name of a variable
Date   Tue, 2 Sep 2008 10:27:07 +0200

Ashim wrote:

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

Have a look at the extended macro functions!
help extended_fcn

You could type:

*************
clear
sysuse auto
local x: variable label make
di "`x'"
*************


Best,
Johannes


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