future_map_maker | R Documentation |
furrr
future_map
functionsThis function is responsible for making the future_walk
and future_cnd_map
sets of functions. The code used to make it is pretty helpful for understanding R's meta-programming, and if you need to modify the input function .f
to the future_map
functions, you can change the decorator_func
argument to whatever you want.
future_map_maker(.orig_function, ...,
decorator_func = cs::collect_decorator)
.orig_function |
the specific |
... |
additional arguments to pass into |
decorator_func |
the function that you want to use to modify the given |
I wanted functions that would behave with all the complexity of furrr
's future_map
functions (which, due to this complexity, are mostly a blackbox to me), while modifying the behavior of the specified input function, basically so I wouldn't have to keep on adding zplyr::collect_all
to these argument functions, like: furrr::future_map(c(1:4), ~zplyr::collect_all(saveRDS(...)))
. I'm inordinately proud of what I did here, making a function that would be able to take any of the future_map
functions and turn them into what I had in mind. Ooooh lawdy, I loved learning this.
collect_decorator
, warn_about_package
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.