I thought I knew most of what the maggritr
was about, but I surely had forgotten that starting with the "." was creating functions! Now I do understand your previous statement!
Thanks again!
Benchmark-wise, lifting the domain of the mean function does imply some cost, but nothing too bad:
library(tidyverse)
big_iris <- map_dfc(1:100, ~ bind_cols(iris, iris))
dim(big_iris)
#> [1] 150 1000
bench::mark(
lift = {
big_iris %>%
mutate(size = pmap_dbl(select_if(., is.numeric), lift_vd(mean)))
},
dots = {
big_iris %>%
mutate(size = pmap_dbl(select_if(., is.numeric), ~ mean(c(...))))
}, min_iterations = 100
) %>%
plot()
#> Warning: Some expressions had a GC in every iteration; so filtering is
#> disabled.

Created on 2019-10-17 by the reprex package (v0.3.0)
The relative cost seems to remain quite the same for various size of datasets I created (did not time anything huge, but still quite large).
++