I have this dataset:
dataset_ex <- data.frame(album = c("Brim","Brim","Brum","Brum"),
track = c("Tad","Toe","Toe","Ram"),
stringsAsFactors = FALSE)
album track
1 Brim Tad
2 Brim Toe
3 Brum Toe
4 Brum Ram
And one song track is redundant (since it appeared in two albums). In this case, the song Toe
. And I want to eliminate one observation with that song, so I tried:
dataset_ex %>% filter(track != "Toe" && album != "Brum")
But it returns all the observations. My expected result is:
album track
1 Brim Tad
2 Brim Toe
3 Brum Ram
Any help will be greatly appreciated.