I have a data frame like so...
df = tibble(id = c(64512, 64513, 64514, 64515),
customer=c("a", "a", "b", "b"))
and want to join two further data frames by id like these...
uvp_new = tibble(id=c(64512, 64513, 64514), uvp=c(12, 14, 16))
uvp_old = tibble(id=c(64512, 64515), uvp=c(10, 18))
with the following logic: whenever there is an entry for a uvp in uvp_new, i want to take this one (ignoring uvp_old), if there is no entry for uvp in uvp_new, i want to take the entry for uvp from uvp_old.
Any help appreciated