[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: RE: Getting at value labels
> I wrote the short ado-file below a while back, prompted by a
> request for help in overlaying twoway plots for several
> groups on the same
> axes and using the value labels in the legend. It seems
> from this thread
> that other people have encountered the same issues.
Should be useful for many. Note that it will fail if -over()-
names a string variable.
> (In case anyone wonders, i avoided using -separate- in the code below
> because of difficulties ensuring the variables it creates are
separate myvar, by(whatever) gen(`temp')
local sepvars "`r(varlist)'"
works in practice in Stata 8, at least. Whether that's a back door
which StataCorp will lock in future versions I can't say.
This exploits two (apparent) facts.
1. Even in Stata 8, temporary names are no longer than
8 characters. So a statement somewhere in the
documentation that you cannot add suffixes
to temporary names is no longer correct.
2. Conversely, when a program ends all variables
whose names begin with __ (underscore underscore)
* For searches and help try: