validate_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" and "na" strings (regardless of case). Coerce the non logical values to their logical equivalent. If keepMissing is FALSE (default), missing values will be coerced to FALSE.
validate_boolean(x, name = lang2str(x), keepMissing = FALSE)
x |
(character | numeric | integer | logical) A vector. |
name |
(character) The name of the vector (used in error messages). Optional. |
vectorize |
(logical) Whether to vectorize the function when x has length > 1 (TRUE; Default) |
keepNA |
(logical) Whether to keep NA values (TRUE) or coerced them to false (FALSE; Default) |
A logical vector
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.