threshold {VanillaICE} | R Documentation

## Threshold numeric values

### Description

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

### Usage

    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

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

[Package VanillaICE version 1.52.0 Index]