distKendall: Kendall distance between two ranks

Description Usage Arguments Value Author(s) References Examples

View source: R/RankDistance.R

Description

The Kendall distance between two ranks is the number of pairs that are in different order in the two ranks.

Usage

1
distKendall(x, y, type = "ordering")

Arguments

x, y

two ranks of size m.

type

type of the rank representation ("ordering" ou "ranking").

Value

an integer, the Kendall distance between x and y.

Author(s)

Julien Jacques

References

A New Measure of Rank Correlation, M. G. Kendall

Examples

1
2
3
x <- 1:5
y <- c(2, 3, 1, 4, 5)
distKendall(x, y, type = "ordering")

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] 2

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