View source: R/utility_functions.R
distance | R Documentation |
Function to calculate distance between two vectors
distance(x, y, method = "cosine")
x |
numeric vector |
y |
numeric vector |
method |
distance calculation method: cosine (default), dot.prod, euclidian, manhattan, chebyshev, coassociation |
the distance value
x = c(1,2,3)
y = c(6,4,6)
distance(x,y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.