View source: R/compute_distance.R
compute_distance | R Documentation |
Compute Euclidian distance matrix.
compute_distance(x1, x2 = NULL)
x1 |
Matrix containing coordinates for the first set of locations. |
x2 |
Matrix containing coordinates for the second set of locations. |
A matrix with Euclidean distances between two sets of coordinates
x1
and x2
. If the second set of coordinates x2
is not
specified then a matrix pairwise distances for the first set of coordinates
x1
are returned.
Eric W. Fox
x1 <- matrix(1:6, ncol =2, byrow = TRUE)
x2 <- matrix(7:12, ncol = 2, byrow = TRUE)
compute_distance(x1)
compute_distance(x1,x2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.