In addition, a fairly strung-out discussion is given
in "On numbers and strings" Stata Journal 2(3):314--329
(2002). That needs updating on the detail that -tostring-
is now part of official Stata.
The main story there is to think of methods as coming
in pairs:
-encode- and -decode- for strings vs numeric variables
with value labels;
-tostring- and -destring- for when the present variable
type is essentially a mistake (perhaps yours, perhaps
Stata's)
-real()- and -string()- as the brute force conversion
functions.
Nick
[email protected]
Daniel Mueller
> check -destring- of -encode-
>
> Typing -findit string numeric- gives you a range of options
> including some
> FAQs
[email protected]
> > i need some help with recoding a 'string'
> > variable to a 'nummeric' varible.
*
* 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/