New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
future() arguments for passing R options and environment variables #480
Comments
[...] Are there any workarounds you are aware of @HenrikBengtsson that we can use until this feature is added? [...] |
The workaround would be to set the option or the environment variable manually inside the future where the values are passed via globals, e.g. myenv <- Sys.getenv("MYENV")
myopt <- getOption("myopt")
f <- future({
Sys.setenv(MYENV = myenv)
options(myopt = myopt)
...
}) |
Hi @HenrikBengtsson, [...] |
Okay, so that sounds like a different problem than what this issue is about ("passing R options and environment variables"). Can you please bring this up on https://github.com/HenrikBengtsson/future/discussions instead. |
Sure, will do. |
Continued in #552 |
There are cases where one needs to customize options and environment variables used by the future. This can be done by explicitly setting those in the future expression, but that might be tedious, especially to make sure that they are unset afterward. Having
future()
do it for us is easier and avoids some code clutter. Here's one idea:These arguments should be exposed also in map-reduce APIs, e.g. future.apply and furrr.
Possible concerns
The text was updated successfully, but these errors were encountered: