# note that the coalition {1} appears twice
# 123 > 12 ~ 13 ~ 1 ~ {} > 23 ~ 1 ~ 2
# E = {123} > {12, 13, 1, {}} > {23, 1, 2}
pr <- suppressWarnings(as.PowerRelation(
"123 > (12 ~ 13 ~ 1 ~ {}) > (23 ~ 1 ~ 2)"
))
# lexcel scores for all elements
# `1` = c(1, 3, 1)
# `2` = c(1, 1, 2)
# `3` = c(1, 1, 1)
lexcelScores(pr)
# lexcel scores for a subset of all elements
lexcelScores(pr, c(1, 3))
lexcelScores(pr, 2)
# 1 > 2 > 3
lexcelRanking(pr)
# 3 > 1 > 2
dualLexcelRanking(pr)
Run the code above in your browser using DataLab