# (123 ~ 12 ~ 3 ~ 1) > (2 ~ 23) > 13
pr <- PowerRelation(list(
list(c(1,2,3), c(1,2), 3, 1),
list(c(2,3), 2),
list(c(1,3))
))
copelandScores(pr)
# `1` = c(2, -1)
# `2` = c(2, -2)
# `3` = c(1, -2)
# only calculate results for two elements
copelandScores(pr, c(1,3))
# `1` = c(2, -1)
# `3` = c(1, -2)
# or just one element
copelandScores(pr, 2)
# `2` = c(2, -2)
# 1 > 2 > 3
copelandRanking(pr)
Run the code above in your browser using DataLab