Member-only story
Get Started Using Anti-joins in R
What is an anti-join & how do I use it?
Introduction
Assuming you already have some background with the other more common types of joins, inner, left, right, and outer; adding semi and anti can prove incredibly useful saving you what could have alternatively taken multiple steps.
In a previous post, I outlined the benefits of semi-joins and how to use them. Here I’ll be following that up with a very similar explanation of anti-joins.
If you want to brush up on semi-joins first you can find that here.
Filtering Joins
Anti-joins & semi-joins are quite a bit different than the other four that I just highlighted; the number one difference being they are actually classified as what’s known as filtering joins.
Syntactically it feels very similar to any other join, but the intention is not to enhance a dataset with additional columns or rows, the intent is to use these joins to perform filtering.
A filtering join is not classified by the addition of new columns of information, rather it facilitates one being able to keep or reduce records in a given dataset.