jefferson0: Return apportioned vector according to Thomas Jefferson's...

Description Usage Arguments Value References Further details Examples

Description

Return apportioned vector according to Thomas Jefferson's Method - allowing for zeros

Usage

1
jefferson0(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-jeffersons-method-of-apportionment

Further details

Method suggested in 1792 by Thomas Jefferson

Examples

1
2
3
z <- c(1,4,5,14,16,3)
names(z) <- letters[1:6]
jefferson0(z, 10, k=0.1)

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