threshold: Threshold values of a numeric vector

View source: R/preprocess-utils.R

thresholdR Documentation

Threshold values of a numeric vector

Description

Threshold the values of a numeric vector according to user-specified limits. Values exceeding the threshold are reset to the threshold and jittered by an amount specified by the user to reduce overplotting.

Usage

threshold(x, lim = c(-Inf, Inf), amount = 0)

Arguments

x

numeric vector

lim

numeric vector of length 2 indicating the values at which to threshold x

amount

scalar indicating how much to jitter the points at the threshold.

See Also

jitter

Examples

x <- rnorm(10)
threshold(x, c(-0.5,0.5))

cancer-genomics/trellis documentation built on Aug. 20, 2024, 5:48 p.m.