R: Censor any values outside of range.

censor {scales} | R Documentation

## Censor any values outside of range.

### Description

Censor any values outside of range.

### Usage

    censor(x, range = c(0, 1), only.finite = TRUE)

### Arguments

`x` | numeric vector of values to manipulate.
`range` | numeric vector of length two giving desired output range.
`only.finite` | if `TRUE` (the default), will only modify finite values.

### Examples

    censor(c(-1, 0.5, 1, 2, NA))

[Package scales version 0.5.0 Index]