Hello, in
|
future::plan(future.plan, |
|
workers = n.core |
|
) |
|
|
|
# begin future |
|
imps <- furrr::future_map( |
|
n.imp.core, |
|
function(x) { |
|
mice(data = data, |
|
m = x, |
|
printFlag = FALSE, |
|
seed = seed, |
|
... |
|
)}, |
|
.options = furrr::furrr_options( |
|
seed = TRUE, |
|
globals = globals, |
|
packages = packages |
|
) |
|
) |
|
|
|
# end multisession |
|
future::plan(future::sequential) |
you're resetting the future plan to plan(sequential) when done. Note that the user might have another type of plan set for other reasons. Instead, set your custom plan as:
with(future::plan(future.plan,
workers = n.core
), local = TRUE)
and drop the future::plan(future::sequential) call at the end.
This is the recommended approach to undo plan changes, cf. https://future.futureverse.org/articles/future-7-for-package-developers.html#avoid-changing-the-future-backend
Hello, in
mice/R/futuremice.R
Lines 146 to 168 in ded22e4
you're resetting the future plan to
plan(sequential)when done. Note that the user might have another type of plan set for other reasons. Instead, set your custom plan as:and drop the
future::plan(future::sequential)call at the end.This is the recommended approach to undo plan changes, cf. https://future.futureverse.org/articles/future-7-for-package-developers.html#avoid-changing-the-future-backend