| check_double_scalar | R Documentation |
Check double scalar
check_double_scalar(x, arg_name = deparse(substitute(x)))
x |
Numeric: Value to check. Must be a single non-NA number (integer inputs are accepted). |
arg_name |
Character: Argument name to use in error messages. |
Called for side effects. Throws an error if checks fail.
EDG
check_double_scalar(3.14)
check_double_scalar(1L)
# Throw error:
try(check_double_scalar(NA_real_))
try(check_double_scalar(c(1.0, 2.0)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.