I’m looking to write something where I don’t have to hard code how many groups I’m searching through, and find the unique members of each group. For example:
Now obviously here I could do a for loop and say something like
for val in unique(group1[!,:member])
if !(val in group2[!,:member]) && !(val in group3[!,:member])
print(val)
end
end
but how would I do this if I didn’t know how many groups there were, and just wanted to return the unique members of each group that aren’t in any others.
What if I wanted to make it a threshold, so that instead of an absolute set difference, I say, “if any value shows up in greater than 75% of the groups, then it’s non unique, other than that it’s unique.”
So in this case, larry and bob would be considered unique since they show up in 2/3 of the groups , below the 75% threshold