approval: Approval and Plurality Vote Count

Description Usage Arguments Value Author(s) References See Also Examples

Description

Count votes using the approval and plurality method. Each voter can select candidates using 1 for a selection and 0 otherwise. In the approval method, any number of candidates can be selected by a voter, while in the plurality method only one candidate can be chosen by a voter. Thus, plurality voting is a special case of approval voting. The winner(s) in either method is/are the most-approved candidate(s).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
approval(votes, mcan = 1, fsep = "\t", ...)

## S3 method for class 'vote.approval'
summary(object, ...)

## S3 method for class 'vote.approval'
view(object, ...)

plurality(votes, mcan = 1, fsep = "\t", ...)

## S3 method for class 'vote.plurality'
summary(object, ...)

## S3 method for class 'vote.plurality'
view(object, ...)

Arguments

votes

Matrix or data frame of zeros and ones containing the votes. Rows correspond to the votes, columns correspond to the candidates. If it is a character string it is interpreted as the name of the tab-separated file from which the votes are to be read. Missing values (NA) are interpreted as zeros.

mcan

Number of candidates to be elected.

fsep

If votes is a file name, this argument gives the column separator in the file.

...

Not used.

object

Object of class vote.approval or vote.plurality.

Value

Functions approval and plurality return an object of class vote.approval and vote.plurality, respectively, both of which are lists with the following objects:

elected

Vector of names of the elected candidates in the order in which they were elected.

totals

Vector of total votes in the same order as candidates (columns) in the input data.

data

Input data with invalid votes removed.

invalid.votes

Matrix of invalid votes that were removed from the original dataset.

Author(s)

Hana Sevcikova, Adrian Raftery

References

https://en.wikipedia.org/wiki/Approval_voting

https://en.wikipedia.org/wiki/Plurality_voting_method

See Also

count.votes

Examples

1
2
3
4
5
6
7
8
# Example using the IMS Council dataset modified for approval voting
data(ims_approval)
approval(ims_approval)

# Example using the IMS Council dataset modified for plurality voting
data(ims_plurality)
pl.ims <- plurality(ims_plurality)
invalid.votes(pl.ims)

vote documentation built on May 2, 2019, 1:09 p.m.