select.range: Select values from a vector depending on a range in a second vector.
Description
select.range accepts two vectors of paired observations and
returns a vector of observations from data. The observations
returned are those for which the paired values in groupvec are
within the range specified by min and max.
NOTE: The in-range condition is greater than or equal tomin
and less thanmax. This allows contiguous ranges to be
specified without returning the same value in two sets.
Usage
select.range(data, groupvec, min, max)
Arguments
groupvec
A vector of observations to be used for grouping.
min
The minimum value of the range.
max
The maximum value of the range.
data
A numeric vector of observations.
Value
The subset of observations from data is returned invisibly.