Extract from a vector values that are in a certain range

in.range(x, r, rule = "se")

Arguments

x

vector of values that will be checked

r

range in which to check values of x

rule

how boundaries should be treated for inclusion ("s" strict " e" or equal)

Value

a vector with only the values that are in the range given by r

Examples

if (FALSE) {
in.range(1:10, 2:4)
}