50
> [1] 125.35
>
> HTH
>
> Peter Alspach
>
>
>> -Original Message-
>> From: r-help-boun...@r-project.org
>> [mailto:r-help-boun...@r-project.org] On Behalf Of Patrick Giraudoux
>> Sent: Tuesday, 12 May 2009 8:08 p.m.
>> To:
> I have some trouble with the number of decimals in R (currently R
> 2.9.0). For instance:
>
> > options()$digits
> [1] 3
>
> let me hope that I will get three digits where useful when a number is
> printed. BUT:
>
> > 44.25+31.1+50
> [1] 125
>
> No way to get the right result 125.35
>
>
Dieter Menne wrote:
>
>
> It says digits, not decimals:
>
>> (44.25+31.1+50)/100
> [1] 1.25
>
> Dieter
>
>
> (44.25+31.1+50)*10
[1] 1254
Strictly speaking, this should print as 1250 (no flames, please, I can live
with it)
Dieter
--
View this message in context:
http://www.nabble.co
ent: Tuesday, 12 May 2009 8:08 p.m.
> To: r-help@r-project.org
> Subject: [R] decimal troubles ?
>
> Dear all,
>
> I have some trouble with the number of decimals in R
> (currently R 2.9.0). For instance:
>
> > options()$digits
> [1] 3
>
> let me ho
Patrick Giraudoux wrote:
>
> I have some trouble with the number of decimals in R (currently R
> 2.9.0). For instance:
>
> > options()$digits
> [1] 3
>
> let me hope that I will get three digits where useful when a number is
> printed. BUT:
>
> > 44.25+31.1+50
> [1] 125
>
> No way to ge
Dear all,
I have some trouble with the number of decimals in R (currently R
2.9.0). For instance:
> options()$digits
[1] 3
let me hope that I will get three digits where useful when a number is
printed. BUT:
> 44.25+31.1+50
[1] 125
No way to get the right result 125.35
Can anybody tell m
6 matches
Mail list logo