Package: SafeVote 1.0.2

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.2.tar.gz
SafeVote_1.0.2.zip(r-4.7)SafeVote_1.0.2.zip(r-4.6)SafeVote_1.0.2.zip(r-4.5)
SafeVote_1.0.2.tgz(r-4.6-any)SafeVote_1.0.2.tgz(r-4.5-any)
SafeVote_1.0.2.tar.gz(r-4.7-any)SafeVote_1.0.2.tar.gz(r-4.6-any)
SafeVote_1.0.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
SafeVote/json (API)

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

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

Datasets:

On CRAN:

Conda:

2.70 score 6 scripts 246 downloads 15 exports 57 dependencies

Last updated from:e943b28176. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK171
source / vignettesOK174
linux-release-x86_64OK162
macos-release-arm64OK171
macos-oldrel-arm64OK228
windows-develOK132
windows-releaseOK117
windows-oldrelOK108
wasm-releaseOK119

Exports:approvalcheck.rankingcombineRankingscondorcetinvalid.votesis.SafeRankExptnew_SafeRankExptpluralityreadHilscorestvtestAdditionstestDeletionstestFractionview.SafeVote

Dependencies:base64encbslibcachemclicpp11data.tabledigestdotCall64dplyrevaluatefarverfastmapfieldsfontawesomeforcatsformattablefsgenericsggplot2gluegtablehighrhtmltoolshtmlwidgetsisobandjquerylibjsonliteknitrlabelinglifecyclemagrittrmapsmemoisemimepillarpkgconfigR6rappdirsRColorBrewerRcpprlangrmarkdownS7sassscalesspamstringistringrtibbletidyselecttinytexutf8vctrsviridisLitewithrxfunyaml

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
Results of Auckland Local Elections 2022auckland2022
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
Dublin West vote countdublin_west_vote_count
Dublin West vote count, identifying the top 3 candidatesdublin_west_vote_count_3seats
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
Results of Gisborne Local Elections 2022gisborne2022
Analysis of results from the Gisborne 2022 election.gisborne2022analysis
Results of Hamilton Local Elections 2022hamilton2022
Analysis of results from the Hamilton 2022 election.hamilton2022analysis
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 object, using dplyr::bind_rows()rbind_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.SafeVote
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
Analysis of results from the Wellington 2022 election.wellington2022analysis
Find a winner and their margin of victorywinnerMargin
Yale Faculty Senate 2016yale_ballots