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

st: RE: using the 'real' command


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: using the 'real' command
Date   Wed, 8 Dec 2004 18:19:36 -0000

You _need_ the () to invoke the -real()- function 
(it's not a command). 

Your code is not obviously illegal, assuming 
a prior 

#delimit ; 

and a posterior 

; 

I guess we need more context to comment helpfully.
 
Nick 
[email protected] 

[email protected]
 
> I am trying to convert a string variable to a numeric 
> variable so that I can
> specify the display format, but I get an error message saying 
> it can't recognize
> the ( ), i.e., the parenthesis. can anyone help?
> 
> gen id1=real(cl01); format id1 %02.0f

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