R/rnd_allot.R
rnd_allot.Rd
Used when equal sized groups are desired, if the cohort size is odd then it will randomly assign the odd one out to one of the groups. Currently only 2 groups.
rnd_allot(x)
x | a Vector to assign |
---|
An array with x, k assignment groups
#> # A tibble: 100 x 2 #> id group #> <int> <chr> #> 1 1 a #> 2 2 b #> 3 3 b #> 4 4 a #> 5 5 a #> 6 6 b #> 7 7 b #> 8 8 b #> 9 9 a #> 10 10 a #> # … with 90 more rows