Description Usage Arguments Value Author(s) Examples
Provides alternative function to base::union()
, base::intersect()
, and
base::setdiff()
.
set_union()
: Returns the union of the sets in ...
.
set_intersect()
: Returns the intersect of the sets in ...
.
set_difference()
: Returns the difference of the sets in ...
.
1 2 3 4 5 
... 
A list or a commaseparated list of vectors in the same class. If
vector contains duplicates they will be discarded. If the list doesn't have
names the sets will be named as 
pairs 
Returns the pairwise unions of the sets? Defaults to 
A vector showing the desired operation of the sets. If pairs = TRUE
, returns a list showing the pairwise operation of the sets.
Tiago Olivoto tiagoolivoto@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  library(metan)
(A < letters[1:4])
(B < letters[2:5])
(C < letters[3:7])
set_union(A, B)
set_intersect(A, B, C)
set_difference(B, C)
# Operations with data frames
# Add a row id for better understanding
sets < data_ge %>% add_row_id()
set_1 < sets[1:5,]
set_2 < sets[2:6,]
set_3 < sets[3:7,]
set_intersect(set_1, set_2, set_3)
set_difference(set_2, set_3)
set_union(set_1, set_2, set_3)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.