Consider two dataframes, df1 and df2.
df1 has columns id, a, b.
df2 has columns id, a, c.
I want to perform a left join such that the combined dataframe has columns id, a, b, c.
combined <- df1 %>% left_join(df2, by="id")
But in the combined dataframe, the columns are id, a.x, b, a.y, c.
I can include "a" in the join key (i.e: left_join(df1, df2, by=c("id", "a"))
) but there are too many of columns like a. I want to join only by the primary key id and drop all the duplicated columns in df2.