backend
Select the specific future
-style
parallel backend for make(..., parallelism = "future_lapply")
.
For more information, please read the documentation,
tutorials, and vignettes of the R packages
future
and future.batchtools
.
backend(...)
arguments to future::plan()
.
The backend()
function is exactly
the same as future::plan()
.
We provide it only because workplan()
conflicts
with future::plan()
.
# NOT RUN {
load_basic_example()
library(future) # Use workplan() instead of plan()
backend(multicore) # Same as future::plan(multicore)
make(my_plan, parallelism = "future_lapply")
clean() # Erase the targets to start from scratch.
backend(multisession) # Use separate background R sessions.
make(my_plan, parallelism = "future_lapply")
clean()
library(future.batchtools) # More heavy-duty future-style parallel backends
# https://github.com/HenrikBengtsson/future.batchtools#choosing-batchtools-backend # nolint
backend(batchtools_local)
make(my_plan, parallelism = "future_lapply")
clean()
# }
Run the code above in your browser using DataLab