I have two huge matrices with equal dimensions. I want to calculate Euclidean distance between them. I know this is the function:
euclidean_distance <- fu
This is a job for the base function outer:
outer
outer(mat1,mat2,Vectorize(euclidean_distance))
x y z x 9220.40 9260.736 8866.034 y 12806.35 12820.086 12121.927 z 11630.86 11665.869 11155.823