I have two datasets, df1 and df2, having the same number of columns and the same header. I want to remove all rows in df1 that are also present in df2. In SQL, I'd use the function except. df1 except df2.
What is the equivalent of except in R?
df1:
cust_id |
---|
1 |
2 |
3 |
df2
cust_id |
---|
1 |
2 |
df1 except df2 would result in:
cust_id |
---|
3 |