funs()
is deprecated; please use list()
instead. We deprecated this
function because it provided a unique way of specifying anonymous functions,
rather than adopting the conventions used by purrr and other packages
in the tidyverse.
funs(..., .args = list())
... | <
The following notations are not supported, see examples:
|
---|---|
.args, args | A named list of additional arguments to be added to all
function calls. As |
#> Warning: `funs()` was deprecated in dplyr 0.8.0. #> Please use a list of either functions or lambdas: #> #> # Simple named list: #> list(mean = mean, median = median) #> #> # Auto named with `tibble::lst()`: #> tibble::lst(mean, median) #> #> # Using lambdas #> list(~ mean(., trim = .2), ~ median(., na.rm = TRUE))#> <fun_calls> #> $ mean: mean(.) #> $ mean: mean(., na.rm = TRUE)#> $mean #> function (x, ...) #> UseMethod("mean") #> <bytecode: 0x56264639ffa8> #> <environment: namespace:base> #> #> $mean #> ~mean(.x, na.rm = TRUE) #> <environment: 0x562654ee9680> #>#> <fun_calls> #> $ m1: mean(.) #> $ m2: mean(.) #> $ m3: mean(., na.rm = TRUE)#> $m1 #> function (x, ...) #> UseMethod("mean") #> <bytecode: 0x56264639ffa8> #> <environment: namespace:base> #> #> $m2 #> [1] "mean" #> #> $m3 #> ~mean(.x, na.rm = TRUE) #> <environment: 0x562654ee9680> #>