How do I get unique pairs based on shared values in two grouping variables?
I have used Florian’s answer to this question to get the unique pairs separately for the one shared (grouping) variable. Can this be extended to the case where there are two grouping variables, and the pairs should be unique based on either grouping variable?