
Check if a numeric vector is between a specified minimum and maximum value
Source:R/is_comparisons.R
is_between.RdThis function checks if a numeric vector is between a specified minimum and maximum value. It can also optionally check if all elements of the vector must be between the thresholds or if only one element is sufficient
Value
A logical value indicating whether all elements of the numeric vector x are between the specified minimum and maximum values
Examples
if(interactive()){
is_between(c(2,3,4), 1, 4) # TRUE
is_between(c(2,3,4), 2, 4) # TRUE
is_between(c(2,3,1), 2, 4) # FALSE
}