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
numericvector. Ifyis missing, an attempt is made to interpretxin a suitable way (seegrDevices::xy.coords()).- threshold
A
numericvalue or afunctionthat takes anumericvector as argument and returns a singlenumericvalue.- ...
Extra parameters to be passed to
threshold.- value
A
numericvalue to replace values belowthreshold.
Value
Returns a list with two components x and y.
See also
Other replacement methods:
replace_negative()
