Apportions a vector of values given a specified frequency distribution of those values such that the length of the output is robust to rounding and other instabilities.
apportion_lr(vector.length, values, proportions, shuffled = FALSE)Length for the output vector.
Values for the output vector.
Proportion distribution with one number for each value. This must sum to 1.
If TRUE, randomly shuffle the order of the vector.