[R] discrepancy matrix

Wu Gong
Fri, 16 Jul 2010 16:01:58 -0000

I guess your data frame is a little different from the reference, so your
as.logical doesn't work.

attach(Q)

FUN <- function(X, Y) {abs(X - Y)}

round(outer(rank(date)[colour=="b"],rank(date)[colour=="g"],FUN)
+
outer(rank(number)[colour=="b"],rank(number)[colour=="g"],FUN))

detach(Q)

-----
A R learner.
--
View this message in context:
http://r.789695.n4.nabble.com/discrepancy-matrix-tp2291126p2291585.html
Sent from the R help mailing list archive at Nabble.com.