is_one_of | R Documentation |
Checks if the passed entity is one of the ones in the options vector.
is_one_of(value, options, allow_null = FALSE)
value |
the value to check |
options |
a vector of options. Value must be one of these for the check not to fail |
allow_null |
if TRUE, allow the value NULL. If FALSE (default) do not allow NULL. |
## Not run:
# For assertion
assertthat::assert_that(qscheck::is_one_of(value, c("foo", "bar")))
# For check
if (qscheck::is_one_of(value, c("foo", "bar"))) {}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.