
Sums, maxima and minima with alternative missing value handling
Source:R/math.R
aggregate_if_any.RdReturns the sum, maximum, or minimum of input values, similar to
base::sum(), min(), and max(). Unlike these base functions, these
variants return NA when all values are NA and na.rm = TRUE.
(base::sum(), min(), and max() return 0, -Inf, and Inf,
respectively, in this situation). Also unlike base functions, na.rm is
TRUE by default (since this is the typical use case).