Description Usage Arguments Value Examples
Computes the Euclidean distance between n points in m dimensions ,or two points with same dimensions.
1 | euclidean(x, y, w = 1, output = "matrix")
|
x |
Numeric vector, or a matrix with size n x m. |
y |
(optional)Numeric vector; must be the same length as x. If no input of y, please specify all other parameters to avoid confusion. |
w |
Numeric value greater than 0, account for weight. Default is 1. |
output |
Format of output, either matrix or dist object. Default is matrix. |
Euclidean distance matrix or object calculated by sqrt(sum((x - y) ^ 2)) between points
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.