censorThis: Censor any values outside of range

Description Usage Arguments Value Examples

Description

This function follows the censor function, but allows extensions that work with objects other than numeric vectors.

Usage

1
2
3
4
5
6
7
censorThis(x, range = NULL, only.finite = TRUE, aes = "z")

## S4 method for signature 'WoodenHorse,ANY'
censorThis(x, range = c(0, 1), only.finite = TRUE, aes = "z")

## S4 method for signature 'numeric,numeric_OR_missing'
censorThis(x, range = c(0, 1), only.finite = TRUE, aes = "z")

Arguments

x

A vector of values to manipulate.

range

A range representing object.

only.finite

If TRUE (the default), will only modify finite values.

aes

An aesthetic for which to evaluate the function.

Value

The x argument, but with an indication which values should be censored.

Examples

1
2
# For regular numeric vectors
censorThis(c(-1, 0.5, 1, 2, NA))

teunbrand/ggnomics documentation built on Aug. 2, 2020, 7:34 p.m.