Remove common observations from two lists

You can use anti_join() in dplyr.

It returns all rows from x where there are not matching values in y , keeping just columns from x .

https://dplyr.tidyverse.org/reference/join.html

Also, please provide a reproducible example next time.

1 Like