I have two dataframes, they have an overlapping set of columns but some unique columns too.
They also contain some of the same observations.
To give a concrete example:
df1 <- data.frame(Name = c("a", "b", "c", "d"),
age = c(1:4),
party = c(3:6)
)
df2 <- data.frame(Name = c("a", "e", "c", "f"),
other = c(10:13),
party = c(3:6)
)
Both dfs contain the observations for a
and c
How would I merge the dfs to create a new df that contains all the columns, but does not repeat observations?