I have one dataframe (X) that looks like
ID1 ID2
1 2
2 3
3 4
And another (Y) that looks like
ID GROUP
1 5
2 5
3 6
4 6
I am trying to compare and compute the ID's in dataframe X that are in the same row, are they in the same group listed in dataframe Y?
For example:
ID1 ID2 SAME.GROUP
1 2 YES
2 3 NO
3 4 YES
I have done this before matching one column but can't figure out how to do both. Thanks in advance