| check_nonneg_double_scalar | R Documentation |
Check non-negative double scalar
check_nonneg_double_scalar(x, arg_name = deparse(substitute(x)))
x |
Numeric: Value to check. Must be a single finite number greater than or equal to zero. |
arg_name |
Character: Argument name to use in error messages. |
Called for side effects. Throws an error if checks fail.
EDG
check_nonneg_double_scalar(0)
check_nonneg_double_scalar(5)
# Throw error:
try(check_nonneg_double_scalar(-0.001))
try(check_nonneg_double_scalar(Inf))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.