allocateSeats: allocateSeats Allocates seats based on the district magnitude...

Description Usage Arguments Value

View source: R/allocateSeats.R

Description

Takes the vote totals calculated by votersVote and allocates seats based on the district magnitude (number of seats) and the electoral formula.

Usage

1
2
3
4
5
6
allocateSeats(
  voteTotalsAllocateSeats,
  altsDataFrameAllocateSeats,
  numSeatsAllocateSeats,
  electoralFormulaAllocateSeats
)

Arguments

voteTotalsAllocateSeats

A 1 x numberOfCompetitors data frame with the vote totals recieved by each competitor.

altsDataFrameAllocateSeats

a voteR dataFrame that contains the competitorID or alternativeID, and current location of competitors or alternatives being voted on.

numSeatsAllocateSeats

A scalar. The district magnitude (number of seats available).

electoralFormulaAllocateSeats

A string indicating the electoral

Value

outSeatAllocation


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