distanceBetween: Distance between two vectors

Description Usage Arguments Value Examples

View source: R/distance.R

Description

Calculate the distance between two vector of the same length using the chosen distance function.

Usage

1
distanceBetween(x, y, distance = "euc")

Arguments

x

first vector

y

second vector

distance

distance function used to calculate the distance between the vectors

Value

A positive number that is the distance between the two vectors

Examples

1
2
# Uses the default distance function: Euclidean distance
distanceBetween(c(1, 2, 3), c(3, 2, 1))

noeliarico/dists documentation built on May 27, 2020, 9:45 a.m.