A utility function that aims to streamline the set up
of the required future backend with sensible defaults for most users of
regional_epinow(). More advanced users are recommended to setup their own
{future} backend based on their available resources. Running this requires
the {future} package to be installed.
Usage
setup_future(
data,
strategies = c("multisession", "multisession"),
min_cores_per_worker = 4
)Arguments
- data
A
<data.frame>of disease reports (confirm) by date (date), and region (region).- strategies
A vector length 1 to 2 of strategies to pass to
future::plan(). Nesting of parallelisation is from the top level down. The default is to set up nesting parallelisation with both usingfuture::multisession()(future::multicore()will likely be a faster option on supported platforms). For single level parallelisation use a single strategy orfuture::plan()directly. Seefuture::plan()for options.- min_cores_per_worker
Numeric, the minimum number of cores per worker. Defaults to 4 which assumes 4 MCMC chains are in use per region.