This function checks that x
is a subset of y
Usage
assert_subset(x, y, msg = NULL, call = rlang::caller_env(), arg_name = NULL)
Arguments
- x
A vector to check
- y
the acceptable values that x can take
- msg
The error message thrown if the assertion fails (string)
- call
Only relevant when pooling assertions into multi-assertion helper functions. See cli_abort for details.
- arg_name
Advanced use only. Name of the argument passed (default: NULL, will automatically extract arg_name).