pmax(..., na.rm=F) pmin(..., na.rm=F)
Note the difference between pmax, pmin and max, min. The latter two give the single element which is the maximum or minimum of all the arguments.
z <- pmax(x, y, 5) # vector as long as larger of x and y # where z[i] is max of x[i], y[i], and 5z <- pmax(x, y, 5, na.rm=T) # as above but missing values are ignored