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