# NOT RUN {
# can take a little while depending on speed of internet connection
# }
# NOT RUN {
# url for preflib data in the "Election Data" category
preflib <- "http://www.preflib.org/data/election/"
# strict complete orderings of four films on Netflix
netflix <- read.soc(file.path(preflib, "netflix/ED-00004-00000101.soc"))
head(netflix)
attr(netflix, "items")
head(as.rankings(netflix))
# strict incomplete orderings of 6 random cities from 36 in total
cities <- read.soi(file.path(preflib, "cities/ED-00034-00000001.soi"))
# strict incomplete orderings of drivers in the 1961 F1 races
# 8 races with 17 to 34 drivers in each
f1 <- read.soi(file.path(preflib, "f1/ED-00010-00000001.soi"))
# complete orderings with ties of 30 skaters
skaters <- read.toc(file.path(preflib, "skate/ED-00006-00000001.toc"))
# incomplete orderings with ties of 10 sushi items from 100 total
# orderings were derived from numeric ratings
sushi <- read.toi(file.path(preflib, "sushi/ED-00014-00000003.toi"))
# }
Run the code above in your browser using DataCamp Workspace