countVotes: countVotes

View source: R/elec_functions.R

countVotesR Documentation

countVotes

Description

Given a elec.data object, count the votes as reported and determine winner(s) and loser(s).

Usage

countVotes(Z)

Arguments

Z

the elec.data object.

Value

Updated 'Z' matrix with the total votes as components inside it.

Author(s)

Luke W. Miratrix

Examples


  Z = make.cartoon()
  ## Take away 20 percent of C1's votes.
  Z$V$C1 = Z$V$C1 * 0.8
  ## Count again to find winner.
  Z = countVotes(Z)
  Z


elec documentation built on April 27, 2022, 1:05 a.m.