usePluralityRule: usePluralityRule Applies plurality rule to a set of...

Description Usage Arguments Value

View source: R/usePluralityRule.R

Description

Takes in a set of voter preferences, applies plurality rule to them and returns the choice set.

Usage

1
2
3
4
5
6
usePluralityRule(
  voterPreferences,
  breakVoterTies = "random",
  forceUniqueChoice = "TRUE",
  howToSelectUniqueChoice = "random"
)

Arguments

voterPreferences

A matrix of voter preferences that is numVoters x numAlts.

breakVoterTies

Determines how a voter with two equal top choices cast their vote. Can be "random", "first" or "last".

forceUniqueChoice

If there is more than one alternative in the choice set should only one be returned as the gorup choice. If set to TRUE then choose a method with the parameter howToSelectUniqueChoice.

howToSelectUniqueChoice

If there is more than one alternative in the choice set, and forceUniqueChoice == "TRUE", this determines which alternative is selected as the gorup choice. Can be "random", "first" or "last".

Value

A list where the first element is the group's choice set and the second element is the vote totals.


robiRagan/voteR documentation built on Feb. 27, 2020, 6:48 p.m.