The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
The goal of electoral package is provide simple functions to compute allocating seats methods and party system scores
Implemented allocating seats methods are:
For highest averages group: D’Hondt, Webster, Danish, Imperiali, Hill-Huntington, Dean, Modified Sainte-Lague, Equal proportions and Adams.
For largest remainders group: Hare, Droop, Hangenbach-Bischoff, Imperial, Modified Imperial, Quotas&Remainders.
Developed party system scores are:
Competitiveness, concentration, effective number of parties (ENP), party nationalization score (PNS), party system nationalization score (PSNS) and volatility. Effective number of parties implemented methods are Laakso-Taagepera and Golosov. Available party nationalization score and party system nationalization score methods are Jones-Mainwaring and Golosov.
You can install electoral directly from CRAN:
install.packages("electoral")
Or install it from GitHub with:
if (!require("devtools")) {
install.packages("devtools")
library("devtools")
}::install_github("albuja/electoral") devtools
This is a basic example which shows you how to allocate seats by two common methods (D’Hondt and Hare):
library(electoral)
seats(parties = c("A", "B", "C"),
votes = c(100, 150, 60),
n_seats = 5,
method = "dhondt")
seats(parties = c("A", "B", "C"),
votes = c(100, 150, 60),
n_seats = 5,
method = "hare")
This is a basic example which shows you how to compute effective number of parties using Laakso-Taagepera method:
library(electoral)
enp(votes = c(100, 150, 60))
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.