Skip to contents

Deprecated in favour of functionality from the `prefio` package. ranked_ballots is used to easily construct a set of ranked ballots.

Usage

ranked_ballots(x, candidates = NULL, ...)

Arguments

x

A character vector representing a single ballot, or a list of character vectors representing multiple ballots.

candidates

A character vector of names corresponding to the candidates running in the election.

\dots

Additional parameters to pass to ranked_ballots.

Value

A ranked_ballots object representing the ballot(s).

Examples

ranked_ballots(LETTERS[1:5])
#> Warning: `ranked_ballots` is deprecated in favour of `prefio::preferences`.
#> [[1]]
#> [1] "A" "B" "C" "D" "E"
#> 
#> attr(,"class")
#> [1] "ranked_ballots"
#> attr(,"candidates")
#> [1] "A" "B" "C" "D" "E"
ranked_ballots(list(LETTERS[1:5], LETTERS[6:1]))
#> Warning: `ranked_ballots` is deprecated in favour of `prefio::preferences`.
#> [[1]]
#> [1] "A" "B" "C" "D" "E"
#> 
#> [[2]]
#> [1] "F" "E" "D" "C" "B" "A"
#> 
#> attr(,"class")
#> [1] "ranked_ballots"
#> attr(,"candidates")
#> [1] "A" "B" "C" "D" "E" "F"