| checkSetEqual {checkmate} | R Documentation |
Check if object is a subset of a given set
checkSetEqual(x, y, ordered = FALSE) assertSetEqual(x, y, ordered = TRUE, .var.name) testSetEqual(x, y, ordered = TRUE)
x |
[any] |
y |
[ |
ordered |
[ |
.var.name |
[character(1)] |
Depending on the function prefix:
If the check is successful, all functions return TRUE.
If the check is not successful, assertSubset throws an error message,
testSubset returns FALSE and checkSubset returns
a string with the error message.
Other set: assertChoice,
checkChoice, testChoice;
assertSubset, checkSubset,
testSubset
testSetEqual(c("a", "b"), c("a", "b"))
testSetEqual(1:3, 1:4)