powered by
Check whether or not x lies the specified range.
x
is_in_range(x, lb, hb, lassoc = c("up", "down"), hassoc = c("down", "up"))
logical(1), indicating whether or not x lies in the interval [lb:hb]
logical(1)
[lb:hb]
according to function arguments.
Any object type, but using a non-numeric argument always returns FALSE.
FALSE
numeric(1). Lower bound of the interval.
numeric(1)
numeric(1). Ipper bound of the interval.
"up" or "down", indicating whether lb is included in the [lb:hb] interval ("up") or not ("down"). The default is "up".
"up"
"down"
lb
"up" or "down", indicating whether hb is included in the [lb:hb] interval ("down") or not ("up"). The default is "down".
hb
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")
Run the code above in your browser using DataLab