Count votes using the score (or range) method. Voters give each candidate a score, the scores are added and the candidate(s) with the highest (or lowest) totals is/are elected.
Matrix or data frame containing the votes which should be numbers between 0 and max.score. Rows correspond to the votes, columns correspond to the candidates. If it is a character string it is interpreted as a file name from which the votes are to be read. Missing values (NA) are interpreted as zeros.
mcan
Number of candidates to be elected.
max.score
Maximum score allowed. It is used to remove invalid votes. If not given, the maximum value contained in the data is taken and thus, all non-negative votes are valid.
larger.wins
Logical argument indicating whether the winners are the candidates with the highest scores (default) or the lowest scores.
fsep
If votes is a file name, this argument gives the column separator in the file.
quiet
If TRUE no output is printed.
…
Not used.
object
Object of class vote.score.
Value
Function score returns an object of class vote.score which is a list 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.
larger.wins
Input argument of the same name.
data
Input data with invalid votes removed.
invalid.votes
Number of invalid votes that were removed from the original dataset.
# NOT RUN {# Example using the IMS Council dataset modified for score votingdata(ims_score)
score.ims <- score(ims_score, max.score = 9)
summary(score.ims)
# }