Distance: Function to calculate distance between two vectors

View source: R/utility_functions.R

DistanceR Documentation

Function to calculate distance between two vectors

Description

Function to calculate distance between two vectors

Usage

Distance(x, y, method = "cosine")

Arguments

x

numeric vector

y

numeric vector

method

distance calculation method: cosine (default), dot.prod, euclidian, manhattan, chebyshev, coassociation

Value

the distance value

Examples

x = c(1,2,3)
y = c(6,4,6)
Distance(x,y)


mnda documentation built on Feb. 16, 2023, 5:32 p.m.

Related to Distance in mnda...