I have a data frame that want to get the combination of rows that are 1 . for example in row one i have g
and in row two have d, f
. then i want a table of all combinations that variables. for example we have 1 of combation d,f
and so on.
a b c d e m f g h i
1 0 0 0 0 0 0 0 1 0 0
2 0 0 0 1 0 0 1 0 0 0
3 0 0 0 1 0 0 1 0 0 0
4 0 1 0 1 1 1 1 1 0 0
5 0 1 0 1 1 1 1 1 0 0
6 0 1 0 1 1 1 1 1 0 0
7 0 1 0 1 1 1 1 1 0 0
8 0 1 0 1 1 1 1 1 0 0
9 0 1 0 1 1 1 1 1 0 0
10 1 0 0 0 0 1 0 1 0 0 ```