Helps setting up the name of an operation.
Arguments
- start, middle
Character used as a start symbol or to divide
sets1
andsets2
.- sets1, sets2
Character of sets
- collapse_symbol
Name of the symbol that joins the sets on
sets1
andsets2
.
Examples
naming(sets1 = c("a", "b"))
#> [1] "a∪b"
naming(sets1 = "a", middle = "union", sets2 = "b")
#> [1] "a∪b"
naming(sets1 = "a", middle = "intersection", sets2 = c("b", "c"))
#> [1] "a∩(b∪c)"
naming(sets1 = "a", middle = "intersection", sets2 = c("b", "c"))
#> [1] "a∩(b∪c)"
naming(
start = "complement", sets1 = "a", middle = "intersection",
sets2 = c("b", "c"), collapse_symbol = "intersection"
)
#> [1] "∁a∩b∩c"