Learn R Programming

alkahest (version 1.3.0)

replace_threshold: Replace Values Below a Given Threshold

Description

Replace Values Below a Given Threshold

Usage

replace_threshold(x, y, threshold, ...)

# S4 method for numeric,numeric,function replace_threshold(x, y, threshold, value = 0, ...)

# S4 method for ANY,missing,function replace_threshold(x, threshold, value = 0, ...)

# S4 method for numeric,numeric,numeric replace_threshold(x, y, threshold, value = 0, ...)

# S4 method for ANY,missing,numeric replace_threshold(x, threshold, value = 0, ...)

Value

Returns a list with two components x and y.

Arguments

x, y

A numeric vector. If y is missing, an attempt is made to interpret x in a suitable way (see grDevices::xy.coords()).

threshold

A numeric value or a function that takes a numeric vector as argument and returns a single numeric value.

...

Extra parameters to be passed to threshold.

value

A numeric value to replace values below threshold.

Author

N. Frerebeau

See Also

Other replacement methods: replace_negative()