get_divisors: Get district and party divisors from biproporz result

View source: R/biproportional-divisors.R

get_divisorsR Documentation

Get district and party divisors from biproporz result

Description

Show the district and party divisors used to assign seats. This method provides easier access to divisors stored in attributes(...)$divisors.

Usage

get_divisors(biproporz_result)

Arguments

biproporz_result

a matrix created by biproporz() or a data.frame created by pukelsheim()

Value

The district and party divisors (named "districts" and "parties") in a list, each as a vector

Examples

seats_matrix = biproporz(uri2020$votes_matrix, uri2020$seats_vector)
get_divisors(seats_matrix)

seats_df = pukelsheim(pivot_to_df(uri2020$votes_matrix),
                      data.frame(names(uri2020$seats_vector), uri2020$seats_vector))
get_divisors(seats_df)

# summary() also prints the divisors for a biproporz matrix
summary(seats_matrix)


polettif/proporz documentation built on June 13, 2025, 7:12 a.m.