I need to find all possible combinations of the following variables, each containing a X number of observations
Variable Obs
- Black 1
- Pink 2
- Yellow 6
- Red 15
- Green 17
e.g. (black, pink), (black, pink, yellow), (black, pink, yellow, red), (red, green).... Order is not important, so I must delete all the combinations that contain the same elements (black, pink) and (pink, black).
Also, at the end I would need to calculate the number of total observations per each combination.
What is the fastest method, which is also less prone to errors?
I read about Tuples but I am not able to write the code myself.