Prints the result of comparing the values of two vectors with each other
(which values are in the first vector but not in the second one and which
values are in the second vector but not in the first one) on the screen.
Arguments
- x
first vector
- y
second vector
- subject
name of objects to be compared that will appear in the
message. Default: "Values"
.
- xname
optional name of the first vector that will be used in the
message
- yname
optional name of the second vector that will be used in the
message
Examples
compareSets(1:10, 3:13)
#> Values in 1:10 that are not in 3:13: 1, 2
#> Values in 3:13 that are not in 1:10: 11, 12, 13
compareSets(1:10, 3:13, "numbers", "set 1", "set 2")
#> numbers in set 1 that are not in set 2: 1, 2
#> numbers in set 2 that are not in set 1: 11, 12, 13