Thanks to Kit Baum, a new package called -labelsof- is available from SSC.
To install the package, type
. ssc install labelsof
-labelsof- is a small tool to list the labeled values of a variable.
-labelsof- returns in r(values) a list of the values and in r(labels)
a list of the labels.
-labelsof- complements official -label list-.
Example:
. sysuse auto
(1978 Automobile Data)
. labelsof foreign
foreign (origin):
0 Domestic
1 Foreign
. return list
macros:
r(name) : "origin"
r(values) : "0 1"
r(labels) : "`"Domestic"' `"Foreign"'"
ben
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/