I have two data frames that have some columns with the same names and others with different names. The data frames look something like this:
df1
ID hel
We could use my package safejoin, do a left join and deal with the conflicts using dplyr::coalesce
# # devtools::install_github("moodymudskipper/safejoin")
library(safejoin)
library(dplyr)
safe_left_join(df1, df2, by = "ID", conflict = coalesce)
# # A tibble: 5 x 7
# ID hello world hockey soccer football baseball
#
# 1 1 2 3 7 4 43 6
# 2 2 5 1 2 5 24 32
# 3 3 10 8 8 23 2 23
# 4 4 4 17 5 12 5 15
# 5 5 9 7 3 43 12 2