In my data frame, I have a lot of logical variables and I want to split the data frame into multiple subsets conditional on each logical variable is TRUE. For example, let's suppose this is my df:
V1 V2 V3 V4
1 TRUE TRUE FALSE 2
2 TRUE FALSE TRUE 5
3 FALSE TRUE FALSE 4
So I want to have three subsets:
[1]
V1 V2 V3 V4
1 TRUE TRUE FALSE 2
2 TRUE FALSE TRUE 5
[2]
V1 V2 V3 V4
1 TRUE TRUE FALSE 2
2 FALSE TRUE FALSE 4
[3]
V1 V2 V3 V4
1 TRUE FALSE TRUE 5
Thanks for any help!