GenRandGroups.Rd
Generates a random grouping from a given data vector, where the group sizes correspond to the numeric vector grp_n.
GenRandGroups(x, grp_n)
For group divisions in class, it is often useful to have a function available that randomizes these divisions.
a list sized length of grp_n
with the x elements assigned to their group.
# say we have 12 students and want 3 groups with sizes 4,3, and 5
GenRandGroups(x=LETTERS[1:12], grp_n=c(4,3,5))
#> [[1]]
#> [1] "E" "J" "K" "L"
#>
#> [[2]]
#> [1] "D" "F" "G"
#>
#> [[3]]
#> [1] "A" "B" "C" "H" "I"
#>