Package: SafeVote 1.0.1

Clark Thomborson

SafeVote: Election Vote Counting with Safety Features

Fork of 'vote_2.3-2', Raftery et al. (2021) <doi:10.32614/RJ-2021-086>, with additional support for stochastic experimentation.

Authors:Clark Thomborson [cre, aut]

SafeVote_1.0.1.tar.gz
SafeVote_1.0.1.zip(r-4.5)SafeVote_1.0.1.zip(r-4.4)SafeVote_1.0.1.zip(r-4.3)
SafeVote_1.0.1.tgz(r-4.4-any)SafeVote_1.0.1.tgz(r-4.3-any)
SafeVote_1.0.1.tar.gz(r-4.5-noble)SafeVote_1.0.1.tar.gz(r-4.4-noble)
SafeVote_1.0.1.tgz(r-4.4-emscripten)SafeVote_1.0.1.tgz(r-4.3-emscripten)
SafeVote.pdf |SafeVote.html
SafeVote/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/cthombor/safevote/issues

Datasets:

On CRAN:

2.70 score 5 scripts 374 downloads 15 exports 63 dependencies

Last updated 1 months agofrom:78a21c52be. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 04 2024
R-4.5-winOKNov 04 2024
R-4.5-linuxOKNov 04 2024
R-4.4-winOKNov 04 2024
R-4.4-macOKNov 04 2024
R-4.3-winOKNov 04 2024
R-4.3-macOKNov 04 2024

Exports:approvalcheck.rankingcombineRankingscondorcetinvalid.votesis.SafeRankExptnew_SafeRankExptpluralityreadHilscorestvtestAdditionstestDeletionstestFractionview

Dependencies:base64encbslibcachemclicolorspacedata.tabledigestdotCall64dplyrevaluatefansifarverfastmapfieldsfontawesomeforcatsformattablefsgenericsggplot2gluegtablehighrhtmltoolshtmlwidgetsisobandjquerylibjsonliteknitrlabelinglatticelifecyclemagrittrmapsMASSMatrixmemoisemgcvmimemunsellnlmepillarpkgconfigR6rappdirsRColorBrewerRcpprlangrmarkdownsassscalesspamstringistringrtibbletidyselecttinytexutf8vctrsviridisLitewithrxfunyaml

Readme and manuals

Help Manual

Help pageTopics
.print method for summary object.print.summary.SafeVote
summarises vote-totals for subsequent printing.summary.SafeVote
Tideman a3_hila3_hil
Tideman a4_hila4_hil
Tideman a53_hila53_hil
Count votes using the approval methodapproval
as.SafeRankExpt()as.SafeRankExpt
undocumented internal methodassemble.args.for.check.score
undocumented internal methodassemble.args.for.check.stv
Undocumented internal methodbackwards.tiebreak
parameter-checking method for nseats (internal)check.nseats
check the validity of a partial rankingcheck.ranking
undocumented internal methodcheck.votes
undocumented internal methodcheck.votes.approval
undocumented internal methodcheck.votes.condorcet
undocumented internal methodcheck.votes.plurality
undocumented internal methodcheck.votes.score
undocumented internal methodcheck.votes.stv
undocumented internal methodcheck.votes.tworound.runoff
the least upper bound on a pair of rankingscombineRankings
internal method to analyse the partial results of an stv() ballot count, to discover a complete ranking of all candidates. The ranking may depend on the value of nseats, because this affects how votes are transferred.completeRankingTable
Count votes using the Condorcet voting method.condorcet
Amend ballots with equal or incomplete preferencescorrect.ranking
Dublin Westdublin_west
prints the basic results of an electionelection.info
extract margins from the results of a ballot countextractMargins
Extract a ranking vector by name from the results of a ballot countextractRank
Food Electionfood_election
Undocumented internal methodforwards.tiebreak
The image function visualizes the joint distribution of two preferences (if 'all.pref=FALSE') given 'xpref' and 'ypref', as well as the marginal distribution of all preferences (if 'all.pref=TRUE'). The joint distribution can be shown as proportions (if 'proportion=TRUE') or raw vote counts (if 'proportion=FALSE').image.SafeVote.condorcet
visualisation of joint and marginal distributions in STV preferencesimage.SafeVote.stv
IMS Approvalims_approval
IMS Electionims_election
IMS Pluralityims_plurality
IMS Scoreims_score
IMS STVims_stv
Extracts the invalid.votes member (if any) from the result of a countinvalid.votes
is.SafeRankExpt()is.SafeRankExpt
undocumented internal methodis.valid.vote
Find a loser and their margin of victoryloserMargin
Constructor for the results of a SafeRank experimentnew_SafeRankExpt
Undocumented internal methodordered.preferences
Undocumented internal methodordered.tiebreak
plot() method for the result of an experiment with varying numbers of ballotsplot.SafeRankExpt
plot() method for the result of an stv() ballot-countplot.SafeVote.stv
Count votes using the plurality methodplurality
Coerce input 'data' into a matrixprepare.votes
Print method for summary.SafeRankExptprint.summary.SafeRankExpt
print method for summary objectprint.summary.SafeVote.approval
print method for summary.SafeVote.condorcetprint.summary.SafeVote.condorcet
print method for summary of plurality objectprint.summary.SafeVote.plurality
print method for summary.score objectprint.summary.SafeVote.score
print() method for a summary() of a SafeVote resultprint.summary.SafeVote.stv
add a row to a SafeRankExpt objectrbind_SafeRankExpt
read a set of ballots in .HIL formatreadHil
Remove a candidate, amending ballot papers as requiredremove.candidate
Count votes using the score (or range) method.score
Undocumented internal method, renamed from 'solve.tiebreak' to avoid confusion with generic solve()solveTiebreak
Count preferential ballots using an STV methodstv
summary method for SafeRankExptsummary.SafeRankExpt
summary method for approval resultssummary.SafeVote.approval
Summary method for condorcet() resultssummary.SafeVote.condorcet
summary method for plurality objectsummary.SafeVote.plurality
summary method for score objectsummary.SafeVote.score
summary() method for a SafeVote resultsummary.SafeVote.stv
internal method, computes column-sumssumOfVotes
Test the sensitivity of a result to tactical voting.testAdditions
Assess the safety of a preliminary result for an electiontestDeletions
Bootstrapping experiment, with fractional counts of a ballot box.testFraction
Undocumented internal method from original codetranslate.ties
UK Labour Party Leader 2010uk_labour_2010
generic view() for classes defined in this packageview
view method for approval objectview.SafeVote.approval
view method for SafeVote.condorcetview.SafeVote.condorcet
view method for plurality objectview.SafeVote.plurality
view method for score objectview.SafeVote.score
view method for the result of an stv() ballot-countview.SafeVote.stv
Find a winner and their margin of victorywinnerMargin
Yale Faculty Senate 2016yale_ballots