Re: [R] max.col weirdness

2009-05-28 Thread Ben Bolker
Daryl Morris wrote: > > Hi, > Sorry, I was too hasty. I see that the tolerance is in the > documentation (and that "random" is the default tie-breaker). > > Would it be possible to allow tolerance to be a parameter? > > thanks, Daryl > > Could you just use apply(x,1,which.max) ? > x <

Re: [R] max.col weirdness

2009-05-28 Thread Bert Gunter
, omitting infinity) entry in the row. Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Daryl Morris Sent: Thursday, May 28, 2009 1:47 PM To: r-help@r-project.org Subject: [R] max.col weirdn

Re: [R] max.col weirdness

2009-05-28 Thread Daryl Morris
Hi, Sorry, I was too hasty. I see that the tolerance is in the documentation (and that "random" is the default tie-breaker). Would it be possible to allow tolerance to be a parameter? thanks, Daryl Daryl Morris wrote: Hi, I think there's some rounding issue with returning the max column.

[R] max.col weirdness

2009-05-28 Thread Daryl Morris
Hi, I think there's some rounding issue with returning the max column. (running 2.9.0 on an Apple, but my buddy found it on his PC) > x <- matrix(c(1234.568,1234.569,1234.567),1) > max.col(x) [1] 2 > x <- matrix(c(12345.568,12345.569,12345.567),1) > max.col(x) [1] 3 > x <- matrix(c(112345.568,