I am trying to set the plan I need but I am getting the following errors:
no_cores <- availableCores() - 2
plan(multisession, workers = no_cores, lazy = T, gc = T)
and the error is:
Error in MultisessionFuture(expr = expr, envir = envir, substitute = FALSE, :
argument "expr" is missing, with no default
or:
plan(multisession, workers = no_cores, lazy = T, gc = T)
Error in tweak.future(function (expr, envir = parent.frame(), substitute = TRUE, :
Future argument 'lazy' must not be tweaked / set via plan()
Please advise how can I set the workers
, lazy
, gc
and other parameters of multisession
/multicore
plans.
My R version is:
R.Version()
$platform
[1] "x86_64-pc-linux-gnu"
$arch
[1] "x86_64"
$os
[1] "linux-gnu"
$system
[1] "x86_64, linux-gnu"
$status
[1] ""
$major
[1] "4"
$minor
[1] "0.2"
$year
[1] "2020"
$month
[1] "06"
$day
[1] "22"
$`svn rev`
[1] "78730"
$language
[1] "R"
$version.string
[1] "R version 4.0.2 (2020-06-22)"
$nickname
[1] "Taking Off Again"