[R] Priniting numerics

Berend Hasselman bhh at xs4all.nl
Sat Nov 27 12:40:48 CET 2010



Ron_M wrote:
> 
> I am not sure if I understood the help page. It says "fixed notation will
> be preferred unless it is more than ‘scipen’ digits wider". If I
> understood correctly it says, the corresponding number needs to be less
> wider than 'scipen' digit, to print it numerically. Let say:
>  
>> options(scipen = 5)
>> 10^10
> [1] 1e+10
>> options(scipen = 6)
>> 10^10
> [1] 10000000000
> 
> I both cases (10^10) is wider than scipen digit. Still why I am getting
> different representations? I am missing something?
> 

In your case scientific notation requires 5 characters; fixed notation
requires 11 characters.
Difference is 6 which is larger than scipen=5: fixed notation is more than
scipen digits wider.
When you set scipen=6, fixed notation is NOT scipen digits wider.
(unless is equivalent to "except if").

Berend
-- 
View this message in context: http://r.789695.n4.nabble.com/Priniting-numerics-tp3061355p3061449.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list