crossdist | R Documentation |
Computes the pairwise Euclidean distance between rows of two matrices.
crossdist(m1, m2)
m1 |
Numeric matrix. |
m2 |
Numeric matrix. |
Numeric matrix of distances.
mat1 <- matrix(1:4, ncol = 2)
mat2 <- matrix(5:8, ncol = 2)
dist_matrix <- crossdist(mat1, mat2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.