Description Usage Arguments Value Examples
Computes the Minkowski distance between n points in m dimensions ,or two points with same dimensions.
1 | minkowski(x, y, p, 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. |
p |
Non-zero numeric value |
w |
Numeric value greater than 0, account for weight. Default is 1. |
output |
Format of output, either matrix or dist object. Default is matrix. |
Minkowski distance matrix or object calculated by sum(|x - y|^p * w) ^ (1/p) between points
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.