Apologies for lack of a reproducible example as I'm not too sure how to code this.
Let's say I have four groups: red, yellow, green, and blue.
I have fifteen marbles to distribute to each group, with a constraint that each group must have at least two marbles. How can I get all possible combinations that can be allotted to each group? My desired end result is a data frame along the following lines, where the number represents the number of marbles allocated to that group:
combo_id red yellow green blue
1 3 3 5 4
2 3 5 4 3
3 5 2 5 3
And so on until all combinations have been enumerated.