# seats_largest_remainders: Allocating Seats - Largest Remainders In electoral: Allocating Seats Methods and Party System Scores

## Description

Largest remainders methods require the numbers of votes for each party to be divided by a quota representing the number of votes required for a seat (i.e. usually the total number of votes cast divided by the number of seats, or some similar formula). The result for each party will usually consist of an integer part plus a fractional remainder. Each party is first allocated a number of seats equal to their integer. This will generally leave some seats unallocated: the parties are then ranked on the basis of the fractional remainders, and the parties with the largest remainders are each allocated one additional seat until all the seats have been allocated. This gives the method its name. The quota formula for each largest remainder method is:

Droop: (sum(votes))/(n_seats + 1) + 1

Quotas & remainders:

2. quota: (sum(votes))/n_seats (only over selected parties)

In case of ties, the implemented algorithm not allocate the involved seats, and prints how many seats had been allocated and how many are in tie.

Developed by Jorge Albuja Delgado ([email protected]).

## Usage

 `1` ```seats_lr(parties, votes, n_seats, method) ```

## Arguments

 `parties` vector of names of parties, must be uniques `votes` vector of votes, same length as parties. `n_seats` number of seats to be allocated (integer equal or greater 1). `method` string according seat allocating method: "hare", "droop", "hangenbach-bischoff", "imperial", "mod-imperial" or "quotas-remainders".

## Value

A vector of the number seats allocated for each party in 'parties', with the same length as parties and votes.

## Examples

 ```1 2 3 4 5 6 7 8 9``` ```seats_lr(parties = c("A", "B", "C"), votes = c(100, 150, 60), n_seats = 5, method = "hare") seats_lr(parties = c("V", "W", "X", "Y", "Z"), votes = c(100, 150, 60, 80, 160), n_seats = 15, method = "droop") ```

electoral documentation built on Sept. 29, 2017, 1:05 a.m.