manhattan: Manhattan distance between two vectors

Description Usage Arguments Value Examples

Description

A Manhattan or cityblock distance is the sum of the absolute difference between all co-ordinates.

Usage

1
manhattan(x, y)

Arguments

x

numeric vector

y

numeric vector

Value

numeric distance metric

Examples

1
2
3
a <- c(1,2,3,4,5,1,2,2)
b <- c(1,3,5,3,5,2,4,1)
manhattan(a, b)

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