Learn R Programming

datacheck (version 1.2.2)

is_within_range: Tests if a numeric value is between a minimal and maximum value. Serves as convenience function.

Description

Tests if a numeric value is between a minimal and maximum value. Serves as convenience function.

Usage

is_within_range(val, min, max)

Arguments

val
The value to be checked
min
The minimal value (inclusive)
max
The maximum value (inclusive)

Value

boolean TRUE if detects anything

See Also

Other rule_checks: has.punct; has_punct; is.oneOf; is.onlyLowers; is.properName; is.withinRange; is_one_of; is_only_lowers; is_proper_name

Examples

Run this code
is_within_range(1, 0, 2) == TRUE

is_within_range(-1, 0, 2) == FALSE 

Run the code above in your browser using DataLab