I have a dataframe where I would like to remove all rows with duplicates. For instance my dataframe looks like:
> df <- data.frame(A = c("Happy", "Happy", "Sad", "Confused", "Mad", "Mad"), B = c(1, 2, 3, 4, 5, 6))
> df
A B
1 Happy 1
2 Happy 2
3 Sad 3
4 Confused 4
5 Mad 5
6 Mad 6
I only want rows where the entries in A are unique to get:
A B
1 Sad 3
2 Confused 4