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

st: RE: RE: Converting string into numeric and vice versa


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: Converting string into numeric and vice versa
Date   Thu, 20 Nov 2003 17:03:53 -0000

-real()- and -string()- are brute force methods
useful whenever you know that conversion will 
be unproblematic. 

-destring- and -tostring- offer options for 
helping out with difficulties. 

Nick 
[email protected] 

de la Garza, Adrian

> string(n) converts n into a string.
> 
> For help, type:
> - help string
> 
> Alternatively, you can convert hh_id in your main file to 
> number format.
> Check the command -destring-.

ekothari
 
> > I am trying to merge two files using hh_id.
> > 
> > In the main file, hh_id is string
> > 
> > In the other one, hh_id is long
> > 
> > 
> > How do I convert the latter into former?

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