Functions to directly apply divisor apportionment methods instead
of calling proporz()
with a method parameter. All divisor functions call
highest_averages_method()
with a different sequence of divisors.
Usage
divisor_round(votes, n_seats, quorum = 0)
divisor_floor(votes, n_seats, quorum = 0)
divisor_harmonic(votes, n_seats, quorum = 0)
divisor_geometric(votes, n_seats, quorum = 0)
divisor_ceiling(votes, n_seats, quorum = 0)
Details
Divisor methods are known under different names:
d'hondt, jefferson, hagenbach-bischoff:
divisor_floor()
sainte-lague, webster:
divisor_round()
adams:
divisor_ceiling()
dean:
divisor_harmonic()
huntington-hill, hill-huntington:
divisor_geometric()
Examples
votes = c("Party A" = 690, "Party B" = 400,
"Party C" = 250, "Party D" = 120)
divisor_round(votes, 10)
#> Party A Party B Party C Party D
#> 4 3 2 1
divisor_floor(votes, 10)
#> Party A Party B Party C Party D
#> 5 3 2 0
divisor_ceiling(votes, 10)
#> Party A Party B Party C Party D
#> 4 3 2 1
divisor_ceiling(votes, 5)
#> Party A Party B Party C Party D
#> 2 1 1 1
divisor_geometric(votes, 10, quorum = 0.05)
#> Party A Party B Party C Party D
#> 4 3 2 1
divisor_harmonic(votes, 10)
#> Party A Party B Party C Party D
#> 4 3 2 1