How to join and overwrite data appears to be a common request, but I have yet to find an elegant solution that applies to an entire dataset.
(Note: to simplify the d
library("dplyr") d12 <- anti_join(d1, d2, by = "id") %>% bind_rows(d2)
This solution takes the rows from d1 that aren't in d2, then adds the d2 rows on to them.
d1
d2
This won't work for the 'Additional scenario', which looks much much messier to resolve, and maybe should be a separate question.