Replace Values Below a Given Threshold
Usage
replace_threshold(x, y, threshold, ...)
# S4 method for class 'numeric,numeric,function'
replace_threshold(x, y, threshold, value = 0, ...)
# S4 method for class 'ANY,missing,function'
replace_threshold(x, threshold, value = 0, ...)
# S4 method for class 'numeric,numeric,numeric'
replace_threshold(x, y, threshold, value = 0, ...)
# S4 method for class 'ANY,missing,numeric'
replace_threshold(x, threshold, value = 0, ...)
Arguments
- x, y
A
numeric
vector. Ify
is missing, an attempt is made to interpretx
in a suitable way (seegrDevices::xy.coords()
).- threshold
A
numeric
value or afunction
that takes anumeric
vector as argument and returns a singlenumeric
value.- ...
Extra parameters to be passed to
threshold
.- value
A
numeric
value to replace values belowthreshold
.
Value
Returns a list
with two components x
and y
.
See also
Other replacement methods:
replace_negative()