check_range: Check if value is within specified range

View source: R/error-utils.r

check_rangeR Documentation

Check if value is within specified range

Description

Validates that a numeric value falls within the specified range

Usage

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

See Also

Other validate-utils: check_directory(), check_file(), check_input(), check_packages()


yulab.utils documentation built on Feb. 5, 2026, 9:10 a.m.