check_bool | R Documentation |
Check if an argument is single TRUE or FALSE. As an option it is
possible to allow NULL
value when alt_null = TRUE
.
check_bool(x, alt_null = FALSE, add_msg = NULL)
x |
Function argument that is being asserted. |
alt_null |
Logical. Should argument accept |
add_msg |
Is an additional message that can be printed over the standard function error message. You can:
|
If argument is single TRUE
or FALSE
(optionally NULL
) it
returns invisible NULL
. Otherwise the function throws an error.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.