Skip to content
Prev 131247 / 398502 Next

comparison of two vectors

Daniel Stepputtis wrote:
Maybe (untested)

  distfun <- function(i,j) { (x1[i]-x2[j])^2 + (y1[i]-y2[j])^2) }
outer(i,j,distfun)

  ?