Faster pmax() and pmin().
pmax()
pmin()
pmaxC(x, a, in_place = FALSE)pmax0(x, in_place = FALSE)pmaxV(x, y, in_place = FALSE)pmax3(x, y, z, in_place = FALSE)
pmax0(x, in_place = FALSE)
pmaxV(x, y, in_place = FALSE)
pmax3(x, y, z, in_place = FALSE)
A numeric vector.
A single numeric value.
(logical, default: FALSE) Should x be modified in-place.
FALSE
x
Other numeric vectors the same length as x
The parallel maximum/minimum of the input values. pmax0(x) is shorthand for pmaxC(x, 0), i.e. convert negative values in x to 0.
pmax0(x)
pmaxC(x, 0)
# NOT RUN { pmaxC(-5:5, 2) # }
Run the code above in your browser using DataCamp Workspace