| check_logical_scalar | R Documentation |
Check logical scalar
check_logical_scalar(x, arg_name = deparse(substitute(x)))
x |
Logical: Value to check. Must be a single non-NA |
arg_name |
Character: Argument name to use in error messages. |
Called for side effects. Throws an error if checks fail.
EDG
check_logical_scalar(TRUE)
check_logical_scalar(FALSE)
# Throw error:
try(check_logical_scalar(NA))
try(check_logical_scalar(1L))
try(check_logical_scalar(c(TRUE, FALSE)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.