decrease_group_sizes: Creates all group sizes by reducing one group in all rows of grpsizes.
Description
Used for generating all group size combinations for one specific total size
iteratively, starting from grpsizes with one row containing original group
sizes.
Usage
decrease_group_sizes(grpsizes, grpnames)
Arguments
grpsizes
A data.table with the columns containing the group names,
and the rows containing a particular setup of group sizes.
All rows are expected to have the same sum (not checked).
grpnames
The group names (specified because the table can have other
columns as well).
Value
A data.table with the same format as grpsizes, containing all
possible group setups totaling to one less than the total in grpsizes.