Split a wave's total across strata
sight_split_wave.RdDivides total units across strata in proportion to each stratum's size
times its weight, so with equal weights every stratum is sampled at the
same fraction and each wave is a small stratified sample of the whole area.
Fractions are settled by largest remainder, so the parts add up to total
exactly. With available, no stratum is given more than it has left; what
it cannot take goes to the others by the same rule.
Examples
strata <- data.frame(stratum_id = c(11, 12, 13), N = c(400, 250, 150))
sight_split_wave(strata, total = 60)
#> # A tibble: 3 × 2
#> stratum_id n
#> <int> <int>
#> 1 11 30
#> 2 12 19
#> 3 13 11
sight_split_wave(strata, total = 60, weights = c("13" = 2))
#> # A tibble: 3 × 2
#> stratum_id n
#> <int> <int>
#> 1 11 25
#> 2 12 16
#> 3 13 19