Package: pref 0.4.0

pref: Preference Voting with Explanatory Graphics

Implements the Single Transferable Vote (STV) electoral system, with clear explanatory graphics. The core function stv() uses Meek's method, the purest expression of the simple principles of STV, but which requires electronic counting. It can handle votes expressing equal preferences for subsets of the candidates. A function stv.wig() implementing the Weighted Inclusive Gregory method, as used in Scottish council elections, is also provided, and with the same options, as described in the manual. The required vote data format is as an R list: a function pref.data() is provided to transform some commonly used data formats into this format. References for methodology: Hill, Wichmann and Woodall (1987) <doi:10.1093/comjnl/30.3.277>, Hill, David (2006) <https://www.votingmatters.org.uk/ISSUE22/I22P2.pdf>, Mollison, Denis (2023) <arxiv:2303.15310>, (see also the package manual pref_pkg_manual.pdf).

Authors:Denis Mollison [aut, cre, cph]

pref_0.4.0.tar.gz
pref_0.4.0.zip(r-4.5)pref_0.4.0.zip(r-4.4)pref_0.4.0.zip(r-4.3)
pref_0.4.0.tgz(r-4.4-any)pref_0.4.0.tgz(r-4.3-any)
pref_0.4.0.tar.gz(r-4.5-noble)pref_0.4.0.tar.gz(r-4.4-noble)
pref_0.4.0.tgz(r-4.4-emscripten)pref_0.4.0.tgz(r-4.3-emscripten)
pref.pdf |pref.html
pref/json (API)
NEWS

# Install 'pref' in R:
install.packages('pref', repos = c('https://denismollison.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/denismollison/pref/issues

Datasets:
  • c99 - Example of an election of an academic organisation using STV allowing equal preferences frelection om an
  • cnc17 - Example of a political STV election - Cumnock and New Cumnock 2017
  • hc12 - Unusually simple example of a political STV election - Helensburgh Central 2012
  • j02 - Example of an STV election allowing equal preferences - John Muir Trust 2002
  • nws17 - Example of a political STV election - North West and Central Sutherland 2017 Unusual in that under WIG no candidate reaches the (fixed) quota
  • p17 - Example of a political STV election - Partick 2017
  • y12 - Example of an STV election - Yale faculty election

On CRAN:

3.65 score 1 stars 3 scripts 208 downloads 4 exports 1 dependencies

Last updated 9 months agofrom:9c1664f410. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 24 2024
R-4.5-winOKOct 24 2024
R-4.5-linuxOKOct 24 2024
R-4.4-winOKOct 24 2024
R-4.4-macOKOct 24 2024
R-4.3-winOKOct 24 2024
R-4.3-macOKOct 24 2024

Exports:pref.datastvstv.plotsstv.wig

Dependencies:jpeg