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

Description Usage Arguments Details Value References Examples

View source: R/isCompatible.R

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

1
isCompatible(intervals, ranking)

Arguments

intervals

data frame (see generateIntervals for the required format)

ranking

permutation of 1:nrow(intervals)

Details

See section 4.1 of Rising (2021).

Value

TRUE if the ranking is compatible and FALSE otherwise

References

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

Examples

1
2
3
4
5
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))

rankUncertainty documentation built on Nov. 16, 2021, 1:07 a.m.