Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Re: Splitting numeric values


From   "Michael Blasnik" <michael.blasnik@verizon.net>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: Re: Splitting numeric values
Date   Mon, 23 Jul 2007 08:04:35 -0400

No you can't -- if you recast as an int, you will lose many more digits of accuracy -- including all of the digits you want to extract.

Michael Blasnik

----- Original Message ----- From: "Karl Keesman" <sales@survey-design.com.au>
To: <statalist@hsphsun2.harvard.edu>
Sent: Monday, July 23, 2007 12:13 PM
Subject: st: Re: Splitting numeric values



Hi,

You can recast as an integer  eg.

***************************
clear

input a

610102001001010300

end

recast int a, force

d

tostring a, replace

d

***************************

Regards

Karl
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index