distance {PLEXI} | 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)