Considering the sample dataframe as:
df <- data.frame(a=c(rep(1,4),4,7,8), b=c(rep(4,4),6,8,3),
c=c(rep("hey",4),"hi","hello","salam"),
d=c("q","r","g","y","d","e","y"), e=c(2,6,43,56,6,23,4))
I want to remove the rows that are the same for columns a
, b
, c
. The desired output would be three rows as
a b c d e
1 1 4 hey q 2
5 4 6 hi d 6
6 7 8 hello e 23
7 8 3 salam y 4