View source: R/first_preference_win_regions.R
In an ordinal voting system, a candidate's "first-preference win region" identifies first-preference shares where that candidate wins the election, given the pattern of lower preferences. Each function below take counts/shares of ballot orderings and returns a data frame with the vertices of each candidate's first-preference win region for a given voting system.
1 2 3 4 5 6 7 8 9 10 11 12 13 | first_preference_win_regions(
result,
split = "",
method = "plurality",
if_cycle = "empty",
s = 0.5
)
positional_first_preference_win_regions(result, split = "", s = 0.5)
rcv_first_preference_win_regions(result, split = "")
condorcet_first_preference_win_regions(result, split = "", if_cycle = "empty")
|
result |
The election result specified as a named list of counts or shares for each ballot type, where each name is a (possibly incomplete) ordering of candidates. Examples:
|
split |
The character by which to split elements of the named list to recover the candidate names. |
method |
The election method: one of |
if_cycle |
If
|
s |
If |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.