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 = "+")
Arguments
x
A vector of numbers or character strings.
f
The operator. Must be compatible with the type of input vector (numeric or character)
Value
The result of applying the chosen operator to all the elements of the vector is an object of length 1.