in_range and its infix-equivalent %inr% return TRUE for all values in
the numeric vector f that are within the range of values in r.
Arguments
- f
a numeric vector.
- r
numeric vector used to specify a range, only the minimum and maximum
of r are used.
Value
a logical vector of the same length as f.
Examples
in_range(1:10, c(3, 7))
#> [1] FALSE FALSE TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE
1:10 %inr% c(3, 7)
#> [1] FALSE FALSE TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE