if (FALSE) {
## Example 1: Without rounding
apportioned_vec_1 <- apportion_lr(4, c(1, 2, 3, 4, 5),
c(0.25, 0, 0.25, 0.25, 0.25))
## Example 2: With rounding
apportioned_vec_2 <- apportion_lr(5, c(1, 2, 3, 4, 5),
c(0.21, 0, 0.29, 0.25, 0.25))
}
Run the code above in your browser using DataLab