funs {dplyr} | R Documentation |
funs()
provides a flexible way to generate a named list of
functions for input to other functions like summarise_at()
.
funs(..., .args = list())
... |
A list of functions specified by:
These arguments are automatically quoted. They
support unquoting and splicing. See
The following notations are not supported, see examples:
|
.args, args |
A named list of additional arguments to be added to all function calls. |
funs(mean, "mean", mean(., na.rm = TRUE)) # Override default names funs(m1 = mean, m2 = "mean", m3 = mean(., na.rm = TRUE)) # If you have function names in a vector, use funs_ fs <- c("min", "max") funs_(fs) # Not supported ## Not run: funs(function(x) mean(x, na.rm = TRUE)) funs(~mean(x, na.rm = TRUE)) ## End(Not run)