| check_optional_bounded_double_scalar | R Documentation |
Check optional double scalar within bounds
check_optional_bounded_double_scalar(
x,
lower = -Inf,
upper = Inf,
lower_open = FALSE,
upper_open = FALSE,
arg_name = deparse(substitute(x))
)
x |
Optional Numeric: Value to check. Must be |
lower |
Numeric scalar: Lower bound. |
upper |
Numeric scalar: Upper bound. |
lower_open |
Logical scalar: If |
upper_open |
Logical scalar: If |
arg_name |
Character: Argument name to use in error messages. |
Called for side effects. Throws an error if checks fail.
EDG
check_optional_bounded_double_scalar(NULL)
check_optional_bounded_double_scalar(0.7, lower = 0, upper = 2)
# Throw error:
try(check_optional_bounded_double_scalar(5, lower = 0, upper = 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.