I have two tables; table1 and table2, where table1 is much bigger than table2, but table2 is not fully contained in table1. I also have two ID columns - ID1 and ID2 in each table. I want to obtain the rows in table1 and table 2 in which the two ID columns coincide. If a pairing of ID's is in one table and not the other then the row should not be returned.
I tried t1[which(t1$ID1 == t2$ID1 & t1$ID2 == t2$ID2
It said that the longer object length is not a multiple of shorter object length. Any ideas?