Statalist


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

st: RE: Problem with TOSTRING command


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Problem with TOSTRING command
Date   Wed, 4 Jun 2008 18:13:50 +0100

Without examples or details of your problems it is difficult to comment
in detail. 
In any case, you seem to be answering your own question. 

-tostring- (please note standard, non-shouting convention for Statalist
commands) 
won't do what you ask if you would lose information thereby. The
alternatives are to specify an appropriate -format()- or (if you must)
insist on -force-. 

Nick
n.j.cox@durham.ac.uk 

Daniel Sepulveda-Adams

I am trying to reformat variables that are in numbers format to string
format, therefore I'm using TOSTRING command to do that. Most of the
variables change when I run the do files to string format, but some of
them
do not. I realize that the problem could be because the numbers in the
variables are too big therefore here is the sentence that I created

tostring Units104, replace format(%20.0f)

Now when we run in that time, the sentences was working fine, but now I
was
try to run in others files and did not work. 

Somebody know other alternative to do this?


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