Check if a number belong to a given interval.

value %between% interval

Arguments

value

a numerical value.

interval

a numerical vector: (lower,upper).

Value

a logical value.

Examples

1 %between% c(0,2)
#> [1] TRUE
2 %between% c(0,2)
#> [1] TRUE
3 %between% c(0,2)
#> [1] FALSE