I am trying to join two data frames together. I would like to join the DFs by the shared variables Device number & Date and fill in some differing variables with NA. This is because although the dates in the two data frames are similar one data frame has dates that begin earlier than the other. Ideally, I would just like to fill in these 'missing' dates and fill in the new rows with NA. After this I plan to find the difference in another shared variable which is Time. I have got this far:
Join <- inner_join(IDTimeSorotiDogGPS1, OrderedD051XX, by = c("deviceNr"))
I have also tried:
Join <- inner_join(IDTimeSorotiDogGPS1, OrderedD051XX, by = c("deviceNr", "Date"))
However, when joining using both deviceNr and Date, it changed the values of some of the variables in the second data frame, most notably it changed the time values.
Any help would be much appreciated! TIA