Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: obtaining entire contents of a value label


From   Phil Schumm <[email protected]>
To   [email protected]
Subject   st: obtaining entire contents of a value label
Date   Wed, 1 Dec 2004 12:21:11 -0600

Does anyone know if it's possible to obtain the entire contents of a value label, say with something like a macro extended function? What I'd like to do is to step through the entire mapping programmatically, and thus actually, even just obtaining the list of integers mapped to labels (i.e., a sort of -levels- command for value labels) would also work, since I could then use the label macro extended function to obtain the label for each integer.

I've looked at the other commands that operate on value labels, but these (e.g., -labelbook- or -numlabel-) appear to use -uselabel-, which itself uses -label save- to create a file containing the mapping(s) and then parses this file. I can do this too, but in cases where I just want a single mapping, it seems like a lot of work to create a file and then read it.

If I am overlooking something obvious here, I apologize.


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




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index