Description Usage Arguments Details Examples
R's base setdiff function does a one-way set difference, e.g. setdiff(x, y) = x - y. More often than not, I'm wondering what values are different between x and y – both ways. Hence, symmetric difference. Full disclosure: I copied the core of this function from the following StackOverflow post, with some basic tidying for interactive analysis.
1 |
x |
one of the two vectors (soon-to-be sets) of interest |
y |
one of the two vectors (soon-to-be sets) of interest |
pretty |
boolean denoting whether we should also output the one- and two-sided set differences. More appropriate for interactive analyses. |
Source: https://stackoverflow.com/questions/19797954/function-to-find-symmetric-difference-opposite-of-intersection-in-r
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.