Skip to content
Prev 85566 / 398513 Next

cor/group by???

bin999 at lycos.com writes:
You're passing a function to by() whose result does not depend
on the argument x ...

This might be clearer:

c(by(cmexpr, cmexpr$LLID, with, cor(CEXPR, MEXPR, use="pair")))

or

sapply(split(cmexpr, cmexpr$LLID), with, cor(CEXPR, MEXPR, use="pair"))