if (FALSE) { # interactive()
# beans data where each observer compares 3 varieties randomly distributed
# from a list of 11 and additionally compares these 3 varieties
# with their local variety
if (require("PlackettLuce")){
data("beans", package = "PlackettLuce")
# first build rankings with only tricot items
# and return an object of class 'rankings'
R = rankTricot(data = beans,
items = c(1:3),
input = c(4:5))
head(R)
############################################################
# pass the comparison with local item as an additional rankings, then
# each of the 3 varieties are compared separately with the local item
# and return an object of class grouped_rankings
G = rankTricot(data = beans,
items = c(1:3),
input = c(4:5),
group = TRUE,
additional.rank = beans[c(6:8)])
head(G)
}
}
Run the code above in your browser using DataLab