Election Social Choice FunctionsSource:
Compute election outcomes on ranked ballots with a variety of social choice functions.
social_choice( ballots, sc_function = c("plurality", "irv", "stv"), n_winners = 1, ... )
A `prefio::preferences` object containing the ballots cast in the election.
One of "plurality", "irv" or "stv", corresponding to the social choice function you wish to evaluate.
Refers to the number of seats available when `sc_function` is "stv".
The output depends on the chosen `sc_function`:
A character vector with the candidate(s) who received the most votes.
A named `list` with two objects. First, "elimination_order" is a vector with each eliminated candidate in the order of elimination. Second, "winners" is the vector containing the winning candidate(s).
Not yet implemented.