Description Usage Arguments Details Examples
1 |
... |
A list of functions specified by: - Their name, '"mean"' - The function itself, 'mean' - A call to the function with '.' as a dummy argument, 'mean(., na.rm = TRUE)' These arguments are automatically [quoted][rlang::quo]. They support [unquoting][rlang::quasiquotation] and splicing. See 'vignette("programming")' for an introduction to these concepts. The following notations are **not** supported, see examples: - An anonymous function, 'function(x) mean(x, na.rm = TRUE)' - An anonymous function in purrr notation, '~mean(., na.rm = TRUE)' |
.args, args |
A named list of additional arguments to be added to all function calls. |
'funs()' provides a flexible way to generate a named list of functions for input to other functions like [summarise_at()].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.