dean0: Return apportioned vector according to Dean's Method - allows...

Description Usage Arguments Value References Further details Examples

Description

Return apportioned vector according to Dean's Method - allows for zeros

Usage

1
dean0(x, n = 100, k = 1)

Arguments

x

A named vector.

n

Number of apportioned units to sum to

k

The incrementing interval used to search for divisors

Value

A named vector of length x containing apportioned integers summing to n.

References

http://www.maa.org/publications/periodicals/convergence/apportioning-representatives-in-the-united-states-congress-deans-method-of-apportionment

Further details

Method suggested in 1920s by James Dean, professsor of astronomy and mathematics at Dartmouth and University of Vermont.

Examples

1
2
3
majs <- c(100, 154, 0, 22, 5)
names(majs) <- c("English", "History", "Swahili", "French", "Aeronautics")
dean0(majs,10)

jalapic/apportR documentation built on May 18, 2019, 11:17 a.m.