Re: [R] rounding problem

2009-04-28 Thread Uwe Ligges
-help-boun...@r- project.org] On Behalf Of Prof Brian Ripley Sent: Monday, March 02, 2009 12:38 AM To: tedzzx Cc: r-help@r-project.org Subject: Re: [R] rounding problem I nominate the following for the fortunes package: R is Open Source and so you can modify it to emulate the bugs in other

Re: [R] rounding problem

2009-04-27 Thread Emmanuel Charpentier
> Sent: Monday, March 02, 2009 12:38 AM > > To: tedzzx > > Cc: r-help@r-project.org > > Subject: Re: [R] rounding problem > > > > I nominate the following for the fortunes package: > > > R is Open Source and so you can modify it to emulate the bugs in &g

Re: [R] rounding problem + sprintf

2009-04-24 Thread Wacek Kusnierczyk
Prof Brian Ripley wrote: > I think your subject line should read 'Excel bug'. From the R help > for round() > > Note that for rounding off a 5, the IEC 60559 standard is expected > to be used, '_go to the even digit_'. > > In case you did not recognize it, IEC 60559 is an international >

Re: [R] rounding problem

2009-03-02 Thread Greg Snow
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Prof Brian Ripley > Sent: Monday, March 02, 2009 12:38 AM > To: tedzzx > Cc: r-help@r-project.org > Subject: Re: [R] rounding problem > I nomina

Re: [R] rounding problem

2009-03-02 Thread Wacek Kusnierczyk
Prof Brian Ripley wrote: > I think your subject line should read 'Excel bug'. From the R help > for round() > > Note that for rounding off a 5, the IEC 60559 standard is expected > to be used, '_go to the even digit_'. > > In case you did not recognize it, IEC 60559 is an international >

Re: [R] rounding problem

2009-03-02 Thread Bernardo Rangel Tura
On Sun, 2009-03-01 at 17:51 -0800, tedzzx wrote: > Yes, round(1.5)=2. but round(2.5)=2. I want round(2.5)=3 just like the what > the excel do. Can we change the setting or do some trick so that the > computer will work like what we usually do with respect to rounding. > My system is R 2.8.1, winX

Re: [R] rounding problem

2009-03-01 Thread Prof Brian Ripley
I think your subject line should read 'Excel bug'. From the R help for round() Note that for rounding off a 5, the IEC 60559 standard is expected to be used, '_go to the even digit_'. In case you did not recognize it, IEC 60559 is an international standard: Excel is not. R is Open

Re: [R] rounding problem

2009-03-01 Thread tedzzx
Yes, round(1.5)=2. but round(2.5)=2. I want round(2.5)=3 just like the what the excel do. Can we change the setting or do some trick so that the computer will work like what we usually do with respect to rounding. My system is R 2.8.1, winXP, Intel core 2 dual . Thanks. Daniel Nordlund-2 wrot

Re: [R] rounding problem

2009-03-01 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of tedzzx > Sent: Saturday, February 28, 2009 4:58 AM > To: r-help@r-project.org > Subject: [R] rounding problem > > > Hi all, > > According to the help page on round(), round(1.5

Re: [R] rounding problem

2009-03-01 Thread Dimitris Rizopoulos
it the on-line help file of ?round, you can also find the functions: ceiling() floor() trunc() I hope it helps. Best, Dimitris tedzzx wrote: Hi all, According to the help page on round(), round(1.5) could be either 1 or 2. But I want to the answere to be 2 for sure just what we usually do.

Re: [R] rounding problem

2009-02-27 Thread Peterko
all.equal is what i need, many thanks to help me baptiste auguie-2 wrote: > > Hi, > > you probably want to use ?all.equal instead of "==" > > I couldn't run your example, though > > Hope this helps, > > baptiste > > On 27 Feb 2009, at 10:32, Peterko wrote: > >> >> hi i am creating some var

Re: [R] rounding problem

2009-02-27 Thread baptiste auguie
Hi, you probably want to use ?all.equal instead of "==" I couldn't run your example, though Hope this helps, baptiste On 27 Feb 2009, at 10:32, Peterko wrote: hi i am creating some variables from same data, but somewhere is different rouding. look: P = abs(fft(d.zlato)/480)^2 hladane= s