assign_seats: Assign seats

Description Usage Arguments Value

View source: R/perrito-electoral.R

Description

Assign seats

Usage

1
assign_seats(x, nseats, method, thr = 0)

Arguments

x

A matrix or data.frame. Votes for each partie are in columns, rows are jurisdictions.

nseats

A vector with the number of seats per jurisdiction.

method

The method used for seats allocation. Available methods are "dhondt", "webster", "danish", "imperiali", "hill-huntington", "dean", "mod-saint-lague", "equal-proportions", "adams", "hare", "droop", "hangenbach-bischoff", "imperial", "mod-imperial", "quotas-remainders"

Value

A matrix the same dimension of 'x' with the seats allocated to each partie to every jurisdiction.


roliveros-ramos/perrito documentation built on Nov. 5, 2019, 4:09 a.m.