Calculate Euclidean distance matrix for a matrix of coordinates
dist1
takes a matrix of coordinates and returns the
Euclidean distance matrix of the coordinates. It does this
using a compiled C
program, so it is faster than the
builtin R dist
function.
dist1(coords)
coords |
An nr \times nc numeric matrix of coordinates. |
An nr \times nr matrix of Euclidean distances.
Joshua French
x <- matrix(rnorm(30), ncol = 3) dist1(x)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.