Re: [R] decimal troubles ?

2009-05-12 Thread Patrick Giraudoux
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:

Re: [R] decimal troubles ?

2009-05-12 Thread Richard . Cotton
> 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 > >

Re: [R] decimal troubles ?

2009-05-12 Thread Dieter Menne
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

Re: [R] decimal troubles ?

2009-05-12 Thread Peter Alspach
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

Re: [R] decimal troubles ?

2009-05-12 Thread Dieter Menne
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

[R] decimal troubles ?

2009-05-12 Thread Patrick Giraudoux
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