Dear List,
I have two dataframes with overlapping colnames and want to merge them.
Actually, what I want is more similar to rbind, but the dataframes
differ in their columns. Here are the examples:
df1 <- data.frame(A = c(1,2), B = c("m","f"), C = c("at home", "away"))
df2 <- data.frame(A = c(2), C = c("at home"))
Here the desired result:
A B C
1 1 m at home
2 2 f away
3 2 NA at home
Thanks for any help,
Stefan