Learn R Programming

Rankcluster (version 0.98.0)

distSpearman: Spearman distance between two ranks

Description

The Spearman distance is the square of Euclidean distance between two rank vector.

Usage

distSpearman(x, y)

Value

an integer, the Spearman distance between x and y.

Arguments

x, y

two ranks of size m.

Author

Julien Jacques

See Also

Other distance: distCayley(), distHamming(), distKendall()

Examples

Run this code
x <- 1:5
y <- c(2, 3, 1, 4, 5)
distSpearman(x, y)

Run the code above in your browser using DataLab