Re: [R] which() function not finding certain numbers

2012-08-15 Thread Tom Bird
Yes, the round(seq( )) sollution does it. Many thanks to the sender of this (and other similar) solutions. TB On Thu, Aug 16, 2012 at 3:45 AM, Petr Savicky wrote: > On Wed, Aug 15, 2012 at 10:37:17PM +1000, Tom Bird wrote: > > Hi, > > > > I am using 32-bit R v 2.15.1, on Mac OsX v 10.6.8 with

Re: [R] which() function not finding certain numbers

2012-08-15 Thread arun
HI, Try this:  S<-as.numeric(formatC(seq(0,4,0.01),digits=3))  which(S==2.02) #[1] 203  which(S==2.03) #[1] 204  which(S==3.03) #[1] 304  which(S==3.3) #[1] 331  which(S==3.) #[1] 301 A.K. - Original Message - From: Tom Bird To: r-help@r-project.org Cc: Sent: Wednesday, August 15, 201

Re: [R] which() function not finding certain numbers

2012-08-15 Thread Petr Savicky
On Wed, Aug 15, 2012 at 10:37:17PM +1000, Tom Bird wrote: > Hi, > > I am using 32-bit R v 2.15.1, on Mac OsX v 10.6.8 with R GUI 1.52 Leopard > build 32-bit (6188). I have also replicated this error on R 2.13.2 on a > windows 7 machine. > > In some sequences of numbers, I am unable to use the w

Re: [R] which() function not finding certain numbers

2012-08-15 Thread Jeff Newmiller
FAQ 7.31 ?is.equal --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Resea

Re: [R] which() function not finding certain numbers

2012-08-15 Thread John Kane
It looks like an example of FAQ 7.31 Why doesn't R think these numbers are equal? John Kane Kingston ON Canada > -Original Message- > From: tomasb...@gmail.com > Sent: Wed, 15 Aug 2012 22:37:17 +1000 > To: r-help@r-project.org > Subject: [R] which() function not finding certain number