threshold: Threshold numeric values

Description Usage Arguments See Also Examples

View source: R/functions.R

Description

Threshold numeric values according to user-specific limits. The thresholded values can also be jittered near the limits.

Usage

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

Arguments

x

numeric matrix or vector

lim

limit at which to threshold entries in x

amount

see jitter

See Also

jitter

Examples

1
2
3
x <- rnorm(1000, 0, 3)
y <- threshold(x, c(-5,5))
range(y)

VanillaICE documentation built on Nov. 8, 2020, 7:33 p.m.