Multiple functions with names & args
df |> summarize(across(a:c,
list(
mean = \(x) mean(x, na.rm = TRUE),
median = \(x) median(x, na.rm = TRUE)
)
))
## # A tibble: 1 × 6
## a_mean a_median b_mean b_median c_mean c_median
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 -0.111 -0.261 0.191 -0.0207 0.275 0.387