Base implementation, used by quorum_any() and quorum_all().

reached_quorum_total(votes_matrix, quorum_total)

Arguments

votes_matrix

votes matrix

quorum_total

Vote threshold a party must reach for all votes cast. Used as quota of total votes if less than 1, otherwise as number of votes. Must be greater than 0.

Value

boolean vector with length equal to the number of lists/parties (votes_matrix rows) whether they reached the quorum or not

Examples

(vm = matrix(c(239, 10, 308, 398, 20, 925), nrow = 3))
#>      [,1] [,2]
#> [1,]  239  398
#> [2,]   10   20
#> [3,]  308  925
reached_quorum_total(vm, 35)
#> [1]  TRUE FALSE  TRUE