-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
featurea feature request or enhancementa feature request or enhancementtables 🧮joins and set operationsjoins and set operations
Description
I often have the need to find elements (rows) that two vectors (data frames) don't have in common. Finding these elements using setops is straightforward, but I wonder if it would be ok to add the symmetric difference (aka. union \ intersection) function to save a few key strokes. Below is my proposed solution. I can make the PR if we agree it makes sense to add this.
symdiff <- function(x, y) {
setdiff(union(x, y), intersect(x, y))
}
seasmith, chumbleycode and sda030
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancementtables 🧮joins and set operationsjoins and set operations