Re: [R] problem with "which"

From: Berwin A Turlach <>
Date: Thu, 24 Apr 2008 12:09:03 +0800

G'day Melanie,

On Wed, 23 Apr 2008 17:46:56 -1000
Melanie Abecassis <> wrote:

> This doesn't seem to happen with integers.
> Am I missing something ??

Yes, FAQ 7.31:

> Is there a better function for non-integers ?

> which(sapply(tt, function(x) isTRUE(all.equal(x,1.7))))
[1] 8

seems to work.

HTH. Cheers,

        Berwin mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 24 Apr 2008 - 04:11:27 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 Apr 2008 - 04:30:31 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive