So I have two data frames, info and towers, with examples in the following:
Info:
ID Date
1132 01/09/2015
1156 02/09/2015
1132 04/09/2015
1101 04/09/2015
Towers:
Tower ID1 ID2
1 1132 1101
2 1520 1156
The values in the ID column of Info will always match either ID1 or ID2 in Towers. I want to join the frames based on that information, so my joined frame should be:
ID Date Tower
1132 01/09/2015 1
1156 02/09/2015 2
1132 04/09/2015 1
1101 04/09/2015 2
I know dplyr's semi_join makes something like what I need, but I understand it requires a match in both value and column name. Given that these columns have different names, I don't know if it will work properly. Is there a method I could use here?