Hi, Given a matrix set.seed(500) matrix(round(runif(100,0,1)), ncol=5, dimnames=list(Subject=1:20, Group=c('A','B','C','D','E'))) Is there an easy way to identify which combinations of groups exist, i.e. subject2 is a member of group 'A+B+D+E' however no one is a member of 'A+B+C+D'. I want to analyze if particular combinations of groups have worse outcomes than others. I admit I'm not really sure how to do this, if anyone has any pointers I'll be happy to hear them. Thanks, Tom