distSpearman: Spearman distance between two ranks

Description Usage Arguments Value Author(s) Examples

View source: R/RankDistance.R

Description

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

Usage

1

Arguments

x, y

two ranks of size m.

Value

an integer, the Spearman distance between x and y.

Author(s)

Julien Jacques

Examples

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

Example output

WARNING : Since Rancluster 0.92, the ranks have to be given to the package in the ranking notation (see convertRank function), with the following convention :
- missing positions are replaced by 0
- tied are replaced by the lowest position they share
[1] 6

Rankcluster documentation built on Aug. 26, 2019, 3 p.m.