manhattan_norm: Normalised Manhattan distance

Description Usage Arguments Value Examples

Description

Manhattan distance normalised by the length of the vectors. This is the sum of the absolute difference between two vectors divided by the length of the vectors. i.e a <- c(1,2,3); b <- c(3,2,1) ; manhattan(a, b)/3

Usage

1

Arguments

x

numeric vector

y

numeric vector

Value

numeric distance metric

Examples

1
2
3
4
a <- c(1,2,3,4,2,13,2)
b <- c(1,2,4,5,3,23,0)

manhattan_norm(a, b)

Swarchal/phenoDist documentation built on May 9, 2019, 3:25 p.m.