[R] pretty not pretty

Ott Toomet otoomet at econ.dk
Tue Oct 29 09:49:29 CET 2002


Hi,

I have a following vector:

> smallch
 [1]  0.0652840  0.1181300  0.0319370  0.0155700  0.0464110  0.0107850
 [7]  0.0158970  0.0375900  0.0603090  0.0310300  0.0105920  0.0540580
[13] -0.0177740  0.0039393

Pretty (R 1.5.1) has problems with zero:

> pretty(smallch)
[1] -2.000000e-02 -3.469447e-18  2.000000e-02  4.000000e-02  6.000000e-02
[6]  8.000000e-02  1.000000e-01  1.200000e-01

You notice -3.46e-18 instead of 0.  Is this feature changed in 1.6.0,
or are there any simple ways to get around of it?

Ott



> version
         _                
platform i686-pc-linux-gnu
arch     i686             
os       linux-gnu        
system   i686, linux-gnu  
status                    
major    1                
minor    5.1              
year     2002             
month    06               
day      17               
language R                

-- 
Ott Toomet
otoomet at econ.au.dk
---------------------------------------------------------

 (o_         (*_         (O_         (o< -!      (o<)<
//\         //\         //\         //\         //\
V_/_        V_/_        V_/_        V_/_        V_/_

standard    drunken     shocked     noisy      penguin
penguin     penguin     penguin     penguin    eating fish

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list