is_in_range {DEXiR}R Documentation

is_in_range

Description

Check whether or not x lies the specified range.

Usage

is_in_range(x, lb, hb, lassoc = c("up", "down"), hassoc = c("down", "up"))

Arguments

x

Any object type, but using a non-numeric argument always returns FALSE.

lb

numeric(1). Lower bound of the interval.

hb

numeric(1). Ipper bound of the interval.

lassoc

"up" or "down", indicating whether lb is included in the ⁠[lb:hb]⁠ interval ("up") or not ("down"). The default is "up".

hassoc

"up" or "down", indicating whether hb is included in the ⁠[lb:hb]⁠ interval ("down") or not ("up"). The default is "down".

Value

logical(1), indicating whether or not x lies in the interval ⁠[lb:hb]⁠ according to function arguments.

Examples

is_in_range(3, 2, 5)
is_in_range(7, 2, 5)
is_in_range(3, 3, 5)
is_in_range(3, 3, 5, lassoc = "down")


[Package DEXiR version 1.0.2 Index]