This utility function is used to obtain a summary of a vector of data for many operators. The function is taken from the project APL in R (https://rpubs.com/deleeuw/158476).
Usage
reduction(x, f)
Value
The result of applying the chosen operator to all the elements of the vector is an object of length 1.
Arguments
x
A vector of numbers or a character string.
f
The operator. Must be compatible with the type of input vector (numeric or character)