| check_scalar_logical | R Documentation |
Check Scalar Logical
check_scalar_logical(x, arg_name)
x |
Logical: Value to check. |
arg_name |
Character: Argument name to use in error messages. |
Called for side effects.
EDG
check_scalar_logical(TRUE, "my_arg") # Passes
check_scalar_logical(FALSE, "my_arg") # Passes
# Throw error:
try(check_scalar_logical(c(TRUE, FALSE), "my_arg"))
try(check_scalar_logical(NA, "my_arg"))
try(check_scalar_logical("TRUE", "my_arg"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.