which.of.one.set.is.not.in.another {veccompare} | R Documentation |
Which of One Set is not in Another
Description
This function is a wrapper for setdiff
. It makes it easier to remember which vector is being subtracted from the other, by displaying an explicit message.
Usage
which.of.one.set.is.not.in.another(set_1, set_2, suppress_messages = FALSE)
Arguments
set_1 |
A vector to be subtracted from. |
set_2 |
A vector to subtract from |
suppress_messages |
A logical (TRUE/FALSE) indicator whether to suppress messages. |
Value
A vector of the values of set_1
that are not present in set_2
. Put differently, a vector resulting from subtracting set_2
from set_1
.
Examples
veccompare::which.of.one.set.is.not.in.another(
veccompare::example.vectors.list$vector_a,
veccompare::example.vectors.list$vector_b
)
veccompare::which.of.one.set.is.not.in.another(
veccompare::example.vectors.list$vector_b,
veccompare::example.vectors.list$vector_a
)
[Package veccompare version 0.1.0 Index]