Intermediate-R icon indicating copy to clipboard operation
Intermediate-R copied to clipboard

funs vs lists on scoped verbs

Open dan-reznik opened this issue 6 years ago • 0 comments

per dplyr 0.8.x the "funs()" paramenter will be soft deprecated in favor of lists, so you may want, for longevity purposes, propose the new format on the *_{at,if,all} verbs

fns <- list(
  centered = mean,                # Function object
  scaled = ~ . - mean(.) / sd(.)  # Purrr-style lambda
)
mutate_if(iris, is.numeric, fns)

source: https://www.tidyverse.org/articles/2018/12/dplyr-0-8-0-release-candidate/

dan-reznik avatar Feb 27 '19 14:02 dan-reznik