I have two dataframes:
data1:
ID DateTimeUTC
A 12/4/2019 11:30:30 PM
A 12/4/2019 11:30:31 PM
B 12/5/2019 11:31:00 PM
B 12/5/2019 11:31:01 PM
C 12/5/2019 11:31:02 PM
and data2:
Message DateTimeUTC
A 12/4/2019 11:30:30 PM
A 12/4/2019 11:30:31 PM
B 12/5/2019 11:31:00 PM
B 12/5/2019 11:31:01 PM
I would like to have
ID DateTimeUTC Message DateTimeUTC
A 12/4/2019 11:30:30 PM A 12/4/2019 11:30:30 PM
A 12/4/2019 11:30:31 PM A 12/4/2019 11:30:31 PM
B 12/5/2019 11:31:00 PM B 12/4/2019 11:31:00 PM
B 12/5/2019 11:31:01 PM B 12/4/2019 11:31:01 PM
I wish to only show matching IDs and Messages. I have performed an inner join, but it is giving me duplicates, and it erases one of my column names.
library('dplyr')
inner_join(data1, data2, by = c("ID" = "Message"))
Goal: Can someone show me how to do an rbind to get the above outcome?
##pseudo_code:
rbind(data1,data2, order_by ID & Message)