Check which parties (votes matrix rows) reached the quorum specifications and thresholds
given by quorum_any() or quorum_all().
Arguments
- quorum
Quorum parameter list created by
quorum_any()orquorum_all(). It is also possible to pass a pre-calculated logical vector (withoutNA) indicating which parties meet the quorum. The vector is name-matched tovotes_matrix.- votes_matrix
A matrix of unweighted votes. Required when the quorum uses
votes_any_districtorvotes_total, and whenquorumis a logical vector.- weighted_votes_matrix
A matrix of weighted votes (voters). Required when the quorum uses
any_district_votersortotal_voters.
Examples
votes_matrix = matrix(c(5020, 550, 800, 100, 1040, 550, 0, 10), ncol = 2)
dimnames(votes_matrix) <- list(c("A", "B", "C", "D"), c("Z1", "Z2"))
seats = c(Z1 = 50, Z2 = 20)
quorum1 = quorum_all(votes_any_district = 0.1)
eval_quorum(quorum1, votes_matrix)
#> A B C D
#> TRUE TRUE TRUE FALSE
quorum2 = quorum_all(votes_any_district = 0.1, total_voters = 20)
votes_matrix_w = weight_votes_matrix(votes_matrix, seats)
eval_quorum(quorum2, votes_matrix, votes_matrix_w)
#> A B C D
#> TRUE TRUE FALSE FALSE
