Jump to content

Find unique combinations and count


Emiel Parmentier

Recommended Posts

I've got a bit of a difficult situation and don't really know how to tackle it so i'll try my best to explain clearly.

For my sample data I have a yes/no value for each of X conditions (the amount of conditions is variable). So my data can look like this:

 

 

 

Samples

Condition 1

Condition 2

Condition 3

 

 

 

 

Sample_1

True

True

False

 

 

Sample_2

True

True

True

 

 

Sample_3

True

False

False

 

 

 

But the next dataset might contain 5 condtions, that's unpredictable.

Now what I actually need is to count the amount of samples that are true for each unique combination of conditions.

So here for example: C1xC2xC3 would be 1. C2xC3 would be 1 as well, C1xC2 would be 2 and C1xC3 would be 1.

Can anyone help me out or point me in the right direction

 

Many thanks

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...