## Use 'apply' instead of a nested loop on two matrices

I have two matrices:
first.matrix = matrix(c(1,1,2,3,3,2,4,1), nrow=2)
second.matrix = matrix(c(2,2,3,3,1,1,4,1), nrow=2)
and I want to find the correlation between the rows in 'first.matrix' and the rows in second.matrix. In Java, I would write ...

more
»