| check_float_neg1_1 | R Documentation |
Check float -1 <= x <= 1
check_float_neg1_1(x, allow_null = TRUE, arg_name = deparse(substitute(x)))
x |
Numeric vector. |
allow_null |
Logical: If TRUE, NULL values are allowed and return early. |
arg_name |
Character: Name of the variable for error messages. |
Called for side effects. Throws an error if checks fail.
EDG
check_float_neg1_1(c(-1, 0, 1))
# Throws error:
try(check_float_neg1_1(c(-1.5, 0, 1.5)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.