dis_eval | R Documentation |
Function returns the euclidean distance metric between any two points
dis_eval(v1, v2)
v1 |
The first n-dimensional vector |
v2 |
The second n-dimensional vector |
The length of the vectors need to be the same else an error would be returned.
The returned value is always a scalar
Chitran Ghosal
p1 <- c(1, 4, 6)
p2 <- c(2, 5, 7)
p3 <- c(1, 2)
p4 <- c(4, 6)
dis_eval(p1, p2)
dis_eval(p1, p3)
dis_eval(p1, p4)
dis_eval(p2, p3)
dis_eval(p2, p4)
dis_eval(p3, p4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.