is_between: Is value between two others?

View source: R/others.R

is_betweenR Documentation

Is value between two others?

Description

This function checks if a given value is inside an interval specified by two boundary values.

Usage

is_between(value, low.thres, high.thres, include.high.value = FALSE)

Arguments

value

numeric

low.thres

numeric. Lower boundary of the interval.

high.thres

numeric. Upper boundary of the interval.

include.high.value

logical. Whether the upper bound is included in the interval or not. Default value: FALSE.

Value

a logical specifying if the value is inside the interval [low.thres,high.thres) (default behaviour) or inside the interval [low.thres,high.thres] if include.high.value is TRUE.

Examples

is_between(3,2,4)
is_between(4,2,4)
is_between(4,2,4,include.high.value=TRUE)


usefun documentation built on Sept. 15, 2024, 1:06 a.m.