# strict complete orderings of four films on Netflix
netflix <- read.soc(system.file("extdata", "netflix.soc",
package = "PlackettLuce"))
head(netflix)
attr(netflix, "items")
head(as.aggregated_rankings(netflix))
# strict incomplete orderings of 6 random cities from 36 in total
cities <- read.soi(system.file("extdata", "cities.soi",
package = "PlackettLuce"))
# complete orderings with ties of 30 skaters
skaters <- read.toc(system.file("extdata", "skaters.toc",
package = "PlackettLuce"))
# incomplete orderings with ties: most important qualities for success
# from 20 in total
qualities <- read.toi(system.file("extdata", "education_qualities.toi",
package = "PlackettLuce"))
# alternatively read from a url
# - can take a little while depending on speed of internet connection
if (FALSE) {
# incomplete orderings with ties: most important qualities for success
# from 20 in total
preflib <- "https://www.preflib.org/static/data/"
qualities2 <- read.toi(file.path(preflib, "education/00032-00000007.toi"))
all.equal(qualities, qualities2)
}
Run the code above in your browser using DataLab