Learn R Programming

drake (version 4.4.0)

backend: Function backend

Description

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.

Usage

backend(...)

Arguments

...

arguments to future::plan().

Details

The backend() function is exactly the same as future::plan(). We provide it only because workplan() conflicts with future::plan().

See Also

workplan, make,

Examples

Run this code
# 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