Description Usage Arguments Value Examples
Tests if a passed-in argument takes a value from a table of candidate values and returns an error message if not.
1 | arg_in_choices(arg, choices, error_message = NULL, call_ = F)
|
arg |
Character: passed-in argument name |
choices |
Character vector: a character vector of candidate values |
error_message |
Character: user-defined error message |
call_ |
Logical: logical, indicating if the call should become part of
the error message. See |
Error message if test fails
1 2 | alignment <- 'left'
arg_in_choices(alignment, c('left', 'center', 'right'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.