Learn R Programming

Rankcluster (version 0.98.0)

distCayley: Cayley distance between two ranks

Description

The Cayley distance between two ranks x and y is the minimum number of transpositions required to transform the ranking x into y.

Usage

distCayley(x, y)

Value

the Cayley distance between x and y.

Arguments

x, y

two ranks of size m.

Author

Julien Jacques

See Also

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

Examples

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

Run the code above in your browser using DataLab