distSpearman function

Spearman distance between two ranks

Spearman distance between two ranks

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

distSpearman(x, y)

Arguments

  • x, y: two ranks of size m.

Returns

an integer, the Spearman distance between x and y.

Examples

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

See Also

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

Author(s)

Julien Jacques

  • Maintainer: Quentin Grimonprez
  • License: GPL (>= 2)
  • Last published: 2022-11-12

Useful links