are values within limits (e.g. xlim, ylim)?

inLimits(x, limits)

Arguments

x

vector of values

limits

two-element vector of (lower and upper) limits

Value

vetor of logical. Each element corresponds to an element in x and is TRUE if the element is within the limits or FALSE if the element is out of the limits.