Substitute NA for data outside a range, e.g. to remove wild spikes in data.
rangeLimit(x, min, max)
vector of values
minimum acceptable value. If not supplied, and if max
is
also not supplied, a min
of the 0.5 percentile will be used.
maximum acceptable value. If not supplied, and if min
is
also not supplied, a min
of the 0.995 percentile will be used.
ten.to.twenty <- rangeLimit(1:100, 10, 20)