Learn R Programming

rankUncertainty (version 1.0.2.0)

isCompatible: Test whether a ranking is compatible with a set of intervals

Description

A ranking is compatible with a set of intervals if we can pick a point from each interval such that the ranking of those points is the ranking in question.

Usage

isCompatible(intervals, ranking)

Arguments

intervals

data frame (see generateIntervals for the required format)

ranking

permutation of 1:nrow(intervals)

Value

TRUE if the ranking is compatible and FALSE otherwise

Details

See section 4.1 of Rising (2021).

References

Rising, Justin (2021). Uncertainty in Ranking. arXiv:2107.03459.

Examples

Run this code
# NOT RUN {
left <- 0:2 * 0.5 + 1
right <- left + 0.75
intervals <- data.frame(left = left, right = right)
isCompatible(intervals, 1:3)
isCompatible(intervals, c(3, 2, 1))
# }

Run the code above in your browser using DataLab