Set up disk.frame environment

setup_disk.frame(
  workers = data.table::getDTthreads(),
  future_backend = future::multisession,
  ...,
  gui = FALSE
)

Arguments

workers

the number of workers (background R processes in the

future_backend

which future backend to use for parallelization

...

passed to `future::plan`

gui

Whether to use a Graphical User Interface (GUI) for selecting the options. Defaults to FALSE

Examples

if (interactive()) {
  # setup disk.frame to use multiple workers these may use more than two
  # cores, and is therefore not allowed on CRAN. Hence it's set to run only in
  # interactive session
  setup_disk.frame()
  
  # use a Shiny GUI to adjust settings
  # only run in interactive()
  setup_disk.frame(gui = TRUE)
}

# set the number workers to 2
setup_disk.frame(2)
#> The number of workers available for disk.frame is 2

# if you do not wish to use multiple workers you can set it to sequential
setup_disk.frame(future_backend=future::sequential)
#> Warning: Detected 1 unknown future arguments: 'workers'
#> The number of workers available for disk.frame is 1