is_interval: Check if the two values constitute an interval (low, high)

View source: R/interval.R

is_intervalR Documentation

Check if the two values constitute an interval (low, high)

Description

This routine returns False if high < low.

Usage

is_interval(low, high, allow_degenerate = TRUE)

Arguments

low

the lowest end of the interval

high

the highest end of the interval

allow_degenerate

If TRUE, the case low == high is allowed. Defaults to TRUE

Examples

## Not run: 
# For assertion
assertthat::assert_that(qscheck::is_interval(low, high))
# For check
if (qscheck::is_interval(low, high)) {}

## End(Not run)


AstraZeneca/qscheck documentation built on Nov. 1, 2023, 4:45 a.m.