Re: [R] R2.11.1 seq.int difference between by and length.out

2012-04-10 Thread R. Michael Weylandt
So it's a machine/OS issue: if you really want to trace it down, take a look here: http://svn.r-project.org/R/trunk/src/main/seq.c seq.int() in R goes to do_seq() in C, but at this point it's probably best to identify it as floating-point gremlins and to work around. Michael On Tue, Apr 10, 2012

Re: [R] R2.11.1 seq.int difference between by and length.out

2012-04-10 Thread Alexander
Thank you Michael It is indeed the OS identical(seq.int(0,1,length.out = 11), seq.int(0,1, by = 0.1)) # FALSE Michael Weylandt wrote > > What difference is it you are worried about:? > > identical(seq.int(0,1,length.out = 11), seq.int(0,1, by = 0.1)) # TRUE > > Though that may be OS dependen

Re: [R] R2.11.1 seq.int difference between by and length.out

2012-04-10 Thread R. Michael Weylandt
What difference is it you are worried about:? identical(seq.int(0,1,length.out = 11), seq.int(0,1, by = 0.1)) # TRUE Though that may be OS dependent. M On Tue, Apr 10, 2012 at 10:51 AM, Alexander wrote: > > Berend Hasselman wrote >> >> On 10-04-2012, at 15:54, Alexander wrote: >> >>> I am work

Re: [R] R2.11.1 seq.int difference between by and length.out

2012-04-10 Thread Alexander
Berend Hasselman wrote > > On 10-04-2012, at 15:54, Alexander wrote: > >> I am working under R2.11.1 Windows and I was wondering why there is a >> difference between >> >> seq.int(0,1,by=0.1)[4]-0.3 >> seq.int(0,1,length.out=11)[4]-0.3 >> >> there is also the fact that >> >> seq(0,1,by=0.1)[

Re: [R] R2.11.1 seq.int difference between by and length.out

2012-04-10 Thread Berend Hasselman
On 10-04-2012, at 15:54, Alexander wrote: > I am working under R2.11.1 Windows and I was wondering why there is a > difference between > > seq.int(0,1,by=0.1)[4]-0.3 > seq.int(0,1,length.out=11)[4]-0.3 > > there is also the fact that > > seq(0,1,by=0.1)[4]-0.3 > seq(0,1,length.out=11)[4]-0.3

[R] R2.11.1 seq.int difference between by and length.out

2012-04-10 Thread Alexander
I am working under R2.11.1 Windows and I was wondering why there is a difference between seq.int(0,1,by=0.1)[4]-0.3 seq.int(0,1,length.out=11)[4]-0.3 there is also the fact that seq(0,1,by=0.1)[4]-0.3 seq(0,1,length.out=11)[4]-0.3 but I think this can be explained by floating precision... A