I am trying to make a df that contains a row for every possible combination of multiple groups. For an example, we can stick to letters so I can show the issue in a reproducable way.
Let's say Group 1 consists of every combination of TWO selected letters a-e and Group 2 is simply just the letters f-i. Here's code to create each group:
group_1 <- data.frame(t(combn(letters[1:5], 2)))
group_2 = data.frame(t(combn(letters[6:9], 1)))
My best thought would be to use expand.grid somehow but maybe there's a better way. In the end, I believe there should be a df with 40 rows and three columns of all possible combos as the combination of 5 choose two (10) for group 1 * 4 for group 2 = 40.