Check if value is within specified range
check_range(x, min = NULL, max = NULL, inclusive = TRUE, arg_name = "value")
Arguments
- x
Numeric value to check
- min
Minimum allowed value (optional)
- max
Maximum allowed value (optional)
- inclusive
Whether bounds are inclusive (default: TRUE)
- arg_name
Name of the argument for error messages
Value
Invisible TRUE if valid, throws error otherwise