I have the following dataframe:
df=data.frame(word1 = c("Hello", "ah", "why"), word2 = c("dress", "ah", "ahi"),
word3 = c("english", "ah", "ahi"), x = c(1L,6L, 1L))
> df
word1 word2 word3 x
1 Hello dress english 1
2 ah ah ah 6
3 why ahi ahi 1
I would like to delete the rows that have at least two columns word1, word2, word3 equal with each other.
For instance, the desired result in our example is:
> df
word1 word2 word3 x
1 Hello dress english 1