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:
# Set env var 'FOO' with its currently set value, if set + set 'BAR' to "42"
f <- future(..., envvars = c("FOO", BAR = "42"))
# Set R options 'foo' with its currently set value, if set + set 'bar' to 42L
f <- future(..., options = c("foo", BAR = 42L))
These arguments should be exposed also in map-reduce APIs, e.g. future.apply and furrr.
Possible concerns
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