Re: [R] Help with which()

From: Erik Iverson <iverson_at_biostat.wisc.edu>
Date: Thu, 24 Jul 2008 11:40:31 -0500

Ben Bolker wrote:
> Erik Iverson <iverson <at> biostat.wisc.edu> writes:
>

>> See
>>
>>

> http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
>> naw3 <at> duke.edu wrote:

>
>>> I'm using which to find the position of a value in my data table

> [snip]
>> For example, when I do:
>>> where1<-which(Operons==3573.1,arr.ind=TRUE)
>>>
>>> it returns the position of that number and of 3573.15.
>>>

>
> This doesn't seem like the same issue as the FAQ.
> If there are really two elements in the array, one of
> which is 3573.1 and the other of which is 3573.15, they
> should not be treated as equal. Something else is going on.
> Could the original poster please send a small reproducible
> example?
>

Yes, the more I look at it, the more I agree. I just reacted when I saw x == 3573.1 ...

It would be nice to see a reproducible example!



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 24 Jul 2008 - 16:58:56 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 24 Jul 2008 - 17:32:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive