assert_boolean | R Documentation |
Check that each element of x is either TRUE or FALSE. Works with vectors containing logical values, and/or 0s and 1s, and/or "true", "t", "false", "f" strings (regardless of case).
assert_boolean(x, name = lang2str(x), is2nd = FALSE, stopOnFail = TRUE)
x |
(character | numeric | integer | logical) A vector. |
name |
(character) The name of the vector (used in error messages). Optional. |
stopOnFail |
(logical) Whether the function stops as soon as one of the check fails, or gathers all error messages first. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.