Skip to content
Prev 258495 / 398502 Next

threshold matrix

On 30/04/11 02:44, Alaios wrote:
(1) M2 <- 0 +(M >= thresh)

is one line (and is sexier! :-) ).

(2) which(A !=B, arr.ind = TRUE)

or (possibly more sensibly)

     which (abs(A-B) > sqrt(.Machine$double.eps), arr.ind = TRUE)

should solve your ``One more question''.

     cheers,

         Rolf Turner