Description Usage Arguments Value Examples
Compare two sets.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
set1 |
The first set to compare. |
set2 |
The second set to compare. |
compNames |
Whether to compare the names of the sets, or the sets themselves (logical scalar). |
x |
A |
... |
Additional arguments passed to the print function (not used). |
indent |
The indent argument to pass to the |
color |
The color argument to pass to the |
printSets |
Whether to print the original sets (logical scalar). |
printInt |
Whether to print the intersection of the sets (logical scalar). |
printUnion |
Whether to print the union of the sets (logical scalar). |
printDiffs |
Whether to print the differences (logical scalar). |
A two-element list of the set differences.
The input, invisibly.
1 2 3 4 5 6 7 8 9 10 11 12 | set_comp(1:10, 6:15)
set_comp(mtcars[, -1], mtcars[, -2])
set_comp(c(a = 1, b = 2, c = 3), c(a = 1, b = 2, d = 4))
set_comp(c(a = 1, b = 2, c = 3), c(a = 1, b = 2, d = 4), compNames = FALSE)
set_comp(c(a = 1, b = 2, c = 3), c(a = 1, b = 2, d = 4), compNames = TRUE)
comp <- set_comp(c(a = 1, b = 2, c = 3), c(a = 1, b = 2, d = 4))
set_comp(1:10, 6:15)
print(set_comp(1:10, 6:15))
print(set_comp(1:10, 6:15), indent = 2, color = "#FFFF00")
print(set_comp(1:10, 6:15), printSets = TRUE, printInt = FALSE,
printUnion = TRUE, printDiffs = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.