I have the following dataframes:
> dput(df)
structure(list(word = c("hello", "red", "hello"), polarity = c(0, 0, 0)), row.names = c(5L, 10L, 17L), class = "data.frame")
> dput(df2)
structure(list(x = c("hello", "red"), y = c(0.1, -0.3)), row.names = c(1607, 1743), class = "data.frame")
i.e.
word polarity
5 hello 0
10 red 0
17 hello 0
and
x y
1607 hello 0.1
1743 red -0.3
I would like to combine these dataframes in such a way the desired result is:
word polarity
5 hello 0.1
10 red -0.3
17 hello 0.1