approval: Summarizes the approval rate of the eventual winner(s)

Description Usage Arguments Value Examples

View source: R/other_functions.R

Description

Counts what proportion of voters approved of the election winners, defining "approved" as a voter listing the candidate on their ballot

Usage

1
approval(results, image, rcvcontest, n = 1)

Arguments

results

the tabulated election results

image

the clean ballot image

rcvcontest

(optional) The election to calculate results for. If the image contains more than one unique contest, this must be supplied.

n

the number of candidates being elected (defaults to 1)

Value

a numerical vector of length 1

Examples

1
2
approval(sf_7_results, sf_bos_clean,
                   rcvcontest = "Board of Supervisors, District 7", n = 1)

ds-elections/rcv documentation built on Feb. 18, 2020, 8:34 p.m.