Description Usage Arguments Value Examples
Instant runoff voting.
1 | irv(votes, tiebreak = "all")
|
votes |
A list of order-of-preference vote vectors, or a list of ballot objects. |
tiebreak |
String informing tiebreak behavior.
|
An IRV object, containing:
the winning entry or entries in the case of a tie
the number of rounds required to find a winner
list of which entries were in contention at each round
table of first preference votes through each round
list of eliminated entries at each round
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | votes <- list(
dex = c("Ice Skating", "Unihoc", "Food"),
dean = c("Ice Skating", "Unihoc", "Food"),
paul = c("Whiskey Tasting", "Established"),
james = c("Ice Skating", "Unihoc", "Food")
)
irv(votes)
map <- c("e", "f", "i", "u", "w")
votes <- list(
ballot(0, 3, 1, 2, 0, map = map),
ballot(0, 3, 1, 2, 0, map = map),
ballot(2, 0, 0, 0, 1, map = map),
ballot(0, 3, 1, 2, 0, map = map)
)
irv(votes)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.