Re: [R] 0.3 is not 0.3, bug in seq() function?

2010-10-28 Thread Rubén Roa
Enrico, The same happens with other numbers/sequences. seq(0.1,0.9,0.1)[7]==0.7 [1] FALSE seq(0.1,1.3,0.1)[12]==1.2 [1] FALSE Rounding seems to fix it, round(seq(0.1,0.5,0.1),1)[3]==0.3 round(seq(0.1,0.9,0.1),1)[7]==0.7 round(seq(0.1,1.3,0.1),1)[12]==1.2 They all return TRUE.

Re: [R] 0.3 is not 0.3, bug in seq() function?

2010-10-28 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 28/10/10 12:23, Enrico R. Crema wrote: Dear List, I've been running a numerical simulation and I found this odd error in my code where the which command could not identify which rows of a column of data.frame were corresponding to the value

Re: [R] 0.3 is not 0.3, bug in seq() function?

2010-10-28 Thread Enrico R. Crema
Well...thanks to everybody for suggestions and reading...I guess I have to study more! Enrico On 28 Oct 2010, at 11:48, Rainer M Krug wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 28/10/10 12:23, Enrico R. Crema wrote: Dear List, I've been running a numerical simulation and I

Re: [R] 0.3 is not 0.3, bug in seq() function?

2010-10-28 Thread S Ellison
Enrico R. Crema enryu_cr...@yahoo.it 28/10/2010 12:08:55 Well...thanks to everybody for suggestions and reading...I guess I have to study more! ... On 28/10/10 12:23, Enrico R. Crema wrote: I can't provide you a link for more details, The canonical link is R FAQ 7.31 in the

Re: [R] 0.3 is not 0.3, bug in seq() function?

2010-10-28 Thread Ivan Calandra
Hi, It is a know issue, reported in the FAQ 7.31. Ivan Le 10/28/2010 13:08, Enrico R. Crema a écrit : Well...thanks to everybody for suggestions and reading...I guess I have to study more! Enrico On 28 Oct 2010, at 11:48, Rainer M Krug wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1