Skip to content
Prev 326084 / 398503 Next

multivariate version of aggregate

Hello,

Or use ?sapply.

sapply(split(dat[1:2], dat[3]), function(x) cor(x[1], x[2]))


Hope this helps,

Rui Barradas

Em 27-06-2013 20:22, David Carlson escreveu: