powered by
allocation(parties, votes, seats, method, hurdle = 0)
# Allocation example: votes <- sample(1:10000, 5) allocation(letters[1:5], votes, seats=8, method=1) allocation(letters[1:5], votes, seats=c(3,5,8), method=2:1, hurdle=0.5)
Run the code above in your browser using DataLab