rangeLimit: Substitute NA for Data Outside a Range

rangeLimitR Documentation

Substitute NA for Data Outside a Range

Description

Substitute NA for data outside a range, e.g. to remove wild spikes in data.

Usage

rangeLimit(x, min, max)

Arguments

x

vector of values

min

minimum acceptable value. If not supplied, and if max is also not supplied, a min of the 0.5 percentile will be used.

max

maximum acceptable value. If not supplied, and if min is also not supplied, a min of the 0.995 percentile will be used.

Author(s)

Dan Kelley

Examples


ten.to.twenty <- rangeLimit(1:100, 10, 20)

oce documentation built on Sept. 11, 2024, 7:09 p.m.