CRAN Package Check Results for Package doFuture

Last updated on 2019-01-15 00:46:24 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.7.0 1.75 55.67 57.42 OK
r-devel-linux-x86_64-debian-gcc 0.7.0 1.39 43.47 44.86 OK
r-devel-linux-x86_64-fedora-clang 0.7.0 67.23 OK
r-devel-linux-x86_64-fedora-gcc 0.7.0 63.65 OK
r-devel-windows-ix86+x86_64 0.7.0 3.00 113.00 116.00 OK
r-patched-linux-x86_64 0.7.0 1.12 51.68 52.80 OK
r-patched-solaris-x86 0.7.0 185.10 ERROR
r-release-linux-x86_64 0.7.0 1.53 52.38 53.91 OK
r-release-windows-ix86+x86_64 0.7.0 5.00 107.00 112.00 OK
r-release-osx-x86_64 0.7.0 OK
r-oldrel-windows-ix86+x86_64 0.7.0 6.00 166.00 172.00 OK
r-oldrel-osx-x86_64 0.6.0 OK

Check Details

Version: 0.7.0
Check: tests
Result: ERROR
     Running ‘DEPRECATED.R’
     Running ‘cluster-missing-doFuture-pkg.R’
     Running ‘doRNG,dopar.R’
     Running ‘doRNG,dorng.R’ [15s/16s]
     Running ‘foreach,errors.R’ [18s/20s]
     Running ‘foreach,globals.R’ [16s/19s]
     Running ‘foreach,nested.R’ [23s/24s]
     Running ‘foreach,nested_dopar.R’ [35s/36s]
     Running ‘foreach.R’
     Running ‘future.BatchJobs.R’
     Running ‘future.batchtools.R’
     Running ‘options.R’
     Running ‘registerDoFuture.R’
     Running ‘times.R’
     Running ‘zzz_opt-in,NMF.R’
     Running ‘zzz_opt-in,TSP.R’
     Running ‘zzz_opt-in,caret.R’
     Running ‘zzz_opt-in,foreach.R’
     Running ‘zzz_opt-in,glmnet.R’
     Running ‘zzz_opt-in,plyr.R’
    Running the tests in ‘tests/foreach,nested_dopar.R’ failed.
    Complete output:
     > source("incl/start.R")
     Loading required package: globals
     Loading required package: future
     Loading required package: foreach
     Loading required package: iterators
     Loading required package: parallel
     plan(): nbrOfWorkers() = 1
     >
     > strategies <- future:::supportedStrategies()
     > strategies <- setdiff(strategies, "multiprocess")
     >
     > message("*** doFuture - nested %dopar% ...")
     *** doFuture - nested %dopar% ...
     >
     > registerDoFuture()
     >
     > message("*** doFuture - nested %dopar% and tricky globals ...")
     *** doFuture - nested %dopar% and tricky globals ...
     >
     > ## This works ...
     > x <- foreach(j = 1) %dopar% { j }
     doFuture() ...
     - dummy globals (as locals): [1] 'j'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     j <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     j
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [14] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 1 globals is 0 bytes (0 bytes)
     - globals: [1] '...future.x_ii'
    
     getGlobalsAndPackages() ... DONE
     List of 1
     $ ...future.x_ii: NULL
     - attr(*, "where")=List of 1
     ..$ ...future.x_ii:<environment: 8a7e4e8>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 0
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     j <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     j
     }, error = identity)
     })
     }
     - globals: [1] '...future.x_ii'
     List of 1
     $ ...future.x_ii: NULL
     - attr(*, "where")=List of 1
     ..$ ...future.x_ii:<environment: 8a7e4e8>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 0
     - packages: [1] 'doFuture'
     - identifying globals and packages ... DONE
     Number of chunks: 1
     Number of futures (= number of chunks): 1
     Launching 1 futures (chunks) ...
     Chunk #1 of 1 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [1] '...future.x_ii'
     Resolving globals: FALSE
     The total size of the 1 globals is 36 bytes (36 bytes)
     - globals: [1] '...future.x_ii'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 1): 'doFuture'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = NULL,
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     local({
     for (pkg in "doFuture") {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     j <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     j
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     plan(): nbrOfWorkers() = 1
     SequentialFuture started (and completed)
     Chunk #1 of 1 ... DONE
     Launching 1 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 1
    
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     > str(x)
     List of 1
     $ : num 1
     > rm(list = "x")
     >
     > ## ... but this would give a "globals-not-found" error in
     > ## doFuture (<= 0.4.0) because 'j' was interpreted as global variable
     > x <- foreach(i = 1, .packages = "foreach") %dopar% {
     + foreach(j = 1) %dopar% { j }
     + }
     doFuture() ...
     - dummy globals (as locals): [1] 'i'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     i <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     foreach(j = 1) %dopar% {
     j
     }
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [17] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', '%dopar%', 'foreach', 'j', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 1 globals is 0 bytes (0 bytes)
     - globals: [1] '...future.x_ii'
     - packages: [1] 'foreach'
     getGlobalsAndPackages() ... DONE
     List of 1
     $ ...future.x_ii: NULL
     - attr(*, "where")=List of 1
     ..$ ...future.x_ii:<environment: 89f3fc0>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 0
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     i <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     foreach(j = 1) %dopar% {
     j
     }
     }, error = identity)
     })
     }
     - globals: [1] '...future.x_ii'
     List of 1
     $ ...future.x_ii: NULL
     - attr(*, "where")=List of 1
     ..$ ...future.x_ii:<environment: 89f3fc0>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 0
     - packages: [2] 'doFuture', 'foreach'
     - identifying globals and packages ... DONE
     Number of chunks: 1
     Number of futures (= number of chunks): 1
     Launching 1 futures (chunks) ...
     Chunk #1 of 1 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [1] '...future.x_ii'
     Resolving globals: FALSE
     The total size of the 1 globals is 36 bytes (36 bytes)
     - globals: [1] '...future.x_ii'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'foreach'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     local({
     for (pkg in c("doFuture", "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     i <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     foreach(j = 1) %dopar% {
     j
     }
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     plan(): nbrOfWorkers() = 1
     doFuture() ...
     - dummy globals (as locals): [1] 'j'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     j <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     j
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [14] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 1 globals is 0 bytes (0 bytes)
     - globals: [1] '...future.x_ii'
    
     getGlobalsAndPackages() ... DONE
     List of 1
     $ ...future.x_ii: NULL
     - attr(*, "where")=List of 1
     ..$ ...future.x_ii:<environment: a1f9ef0>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 0
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     j <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     j
     }, error = identity)
     })
     }
     - globals: [1] '...future.x_ii'
     List of 1
     $ ...future.x_ii: NULL
     - attr(*, "where")=List of 1
     ..$ ...future.x_ii:<environment: a1f9ef0>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 0
     - packages: [1] 'doFuture'
     - identifying globals and packages ... DONE
     Number of chunks: 1
     Number of futures (= number of chunks): 1
     Launching 1 futures (chunks) ...
     Chunk #1 of 1 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [1] '...future.x_ii'
     Resolving globals: FALSE
     The total size of the 1 globals is 36 bytes (36 bytes)
     - globals: [1] '...future.x_ii'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 1): 'doFuture'
     plan(): nbrOfWorkers() = 1
     SequentialFuture started (and completed)
     Chunk #1 of 1 ... DONE
     Launching 1 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 1
    
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     SequentialFuture started (and completed)
     Chunk #1 of 1 ... DONE
     Launching 1 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 1
    
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     local({
     for (pkg in "doFuture") {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     j <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     j
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     > str(x)
     List of 1
     $ :List of 1
     ..$ : num 1
     > rm(list = "x")
     >
     > message("*** doFuture - nested %dopar% and tricky globals ... DONE")
     *** doFuture - nested %dopar% and tricky globals ... DONE
     >
     >
     > for (strategy1 in strategies) {
     + for (strategy2 in strategies) {
     + message(sprintf("- plan(list('%s', '%s')) ...", strategy1, strategy2))
     + plan(list(a = strategy1, b = strategy2))
     + nested <- plan("list")
     +
     + as <- 1:2
     + bs <- 3:1
     +
     + stopifnot(!exists("a", inherits = FALSE), !exists("b", inherits = FALSE))
     +
     + message("foreach() - level 1 ...")
     + x <- foreach(a = as, .export = c("bs", "strategy2"),
     + .packages = "foreach") %dopar% {
     + plan_list <- future::plan()
     + stopifnot(inherits(plan_list, strategy2))
     + plan_a <- future::plan("list")
     + str(plan_a)
     + stopifnot(inherits(plan_a[[1]], strategy2))
     +
     + message("foreach() - level 2 ...")
     + y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar% {
     + plan_list <- future::plan()
     + message(capture.output(print(plan_list)))
     + stopifnot(
     + inherits(plan_list, "future"),
     + inherits(plan_list, getOption("future.default", "sequential"))
     + )
     +
     + plan_b <- future::plan("list")
     + str(plan_b)
     + stopifnot(
     + inherits(plan_b[[1]], "future"),
     + inherits(plan_b[[1]], getOption("future.default", "sequential"))
     + )
     +
     + list(a = a, plan_a = plan_a,
     + b = b, plan_b = plan_b)
     + }
     + message("foreach() - level 2 ... DONE")
     +
     + y
     + }
     + message("foreach() - level 1 ... DONE")
     +
     + local({
     + stopifnot(length(x) == length(as))
     + for (aa in seq_along(as)) {
     + x_aa <- x[[aa]]
     + stopifnot(length(x_aa) == length(bs))
     + a <- as[aa]
     + for (bb in seq_along(bs)) {
     + x_aa_bb <- x_aa[[bb]]
     + b <- bs[bb]
     + stopifnot(
     + length(x_aa_bb) == 4L,
     + all(names(x_aa_bb) == c("a", "plan_a", "b", "plan_b")),
     + x_aa_bb$a == a,
     + x_aa_bb$b == b,
     + inherits(x_aa_bb$plan_a[[1]], strategy2),
     + inherits(x_aa_bb$plan_b[[1]], "future"),
     + inherits(x_aa_bb$plan_b[[1]],
     + getOption("future.default", "sequential"))
     + )
     + }
     + }
     + })
     +
     + ## Cleanup in order make sure none of these variables exist as
     + ## proxies for missing globals of the name names
     + rm(list = c("as", "bs", "x"))
     + message(sprintf("- plan(list('%s', '%s')) ... DONE", strategy1, strategy2))
     + }
     + }
     - plan(list('sequential', 'sequential')) ...
     plan(): nbrOfWorkers() = 1
     foreach() - level 1 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'a'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [28] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'stopifnot', 'inherits', 'strategy2', 'str', 'message', '%dopar%', 'foreach', 'bs', 'c', 'capture.output', 'print', 'getOption', 'list', 'b', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 124 bytes (124 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     - packages: [2] 'utils', 'foreach'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "sequential"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9b08c78>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "sequential"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9b08c78>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - packages: [3] 'doFuture', 'utils', 'foreach'
     - identifying globals and packages ... DONE
     Number of chunks: 1
     Number of futures (= number of chunks): 1
     Launching 1 futures (chunks) ...
     Chunk #1 of 1 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 196 bytes (196 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     foreach() - level 2 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'b'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [24] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'message', 'capture.output', 'print', 'stopifnot', 'inherits', 'getOption', 'str', 'list', 'a', 'plan_a', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 23.10 KiB (23652 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     - packages: [1] 'utils'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 1
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     .. ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9c44ed0>
     ..$ a :<environment: 9b5d338>
     ..$ plan_a :<environment: 9b5d338>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 23652
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 1
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     .. ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9c44ed0>
     ..$ a :<environment: 9b5d338>
     ..$ plan_a :<environment: 9b5d338>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 23652
     - packages: [2] 'doFuture', 'utils'
     - identifying globals and packages ... DONE
     Number of chunks: 1
     Number of futures (= number of chunks): 1
     Launching 1 futures (chunks) ...
     Chunk #1 of 1 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 23.20 KiB (23760 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     plan(): nbrOfWorkers() = 1
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     SequentialFuture started (and completed)
     Chunk #1 of 1 ... DONE
     Launching 1 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 1
    
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 2 ... DONE
     foreach() - level 2 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'b'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [24] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'message', 'capture.output', 'print', 'stopifnot', 'inherits', 'getOption', 'str', 'list', 'a', 'plan_a', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 23.10 KiB (23652 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     - packages: [1] 'utils'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 2
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     .. ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 98b96a8>
     ..$ a :<environment: 9af2478>
     ..$ plan_a :<environment: 9af2478>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 23652
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 2
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     .. ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 98b96a8>
     ..$ a :<environment: 9af2478>
     ..$ plan_a :<environment: 9af2478>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 23652
     - packages: [2] 'doFuture', 'utils'
     - identifying globals and packages ... DONE
     Number of chunks: 1
     Number of futures (= number of chunks): 1
     Launching 1 futures (chunks) ...
     Chunk #1 of 1 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 23.20 KiB (23760 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     plan(): nbrOfWorkers() = 1
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     SequentialFuture started (and completed)
     Chunk #1 of 1 ... DONE
     Launching 1 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 1
    
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 2 ... DONE
     SequentialFuture started (and completed)
     Chunk #1 of 1 ... DONE
     Launching 1 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 1
    
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 1 ... DONE
     - plan(list('sequential', 'sequential')) ... DONE
     - plan(list('sequential', 'multicore')) ...
     plan(): nbrOfWorkers() = 1
     foreach() - level 1 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'a'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [28] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'stopifnot', 'inherits', 'strategy2', 'str', 'message', '%dopar%', 'foreach', 'bs', 'c', 'capture.output', 'print', 'getOption', 'list', 'b', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 124 bytes (124 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     - packages: [2] 'utils', 'foreach'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "multicore"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: a26aa58>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "multicore"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: a26aa58>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - packages: [3] 'doFuture', 'utils', 'foreach'
     - identifying globals and packages ... DONE
     Number of chunks: 1
     Number of futures (= number of chunks): 1
     Launching 1 futures (chunks) ...
     Chunk #1 of 1 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 196 bytes (196 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >= 1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     foreach() - level 2 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'b'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [24] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'message', 'capture.output', 'print', 'stopifnot', 'inherits', 'getOption', 'str', 'list', 'a', 'plan_a', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 42.54 KiB (43560 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     - packages: [1] 'utils'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 1
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:4] "multicore" "multiprocess" "future" "function"
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 935d3c0>
     ..$ a :<environment: a523700>
     ..$ plan_a :<environment: a523700>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 43560
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 1
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:4] "multicore" "multiprocess" "future" "function"
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 935d3c0>
     ..$ a :<environment: a523700>
     ..$ plan_a :<environment: a523700>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 43560
     - packages: [2] 'doFuture', 'utils'
     - identifying globals and packages ... DONE
     Number of chunks: 2
     Number of futures (= number of chunks): 2
     Launching 2 futures (chunks) ...
     Chunk #1 of 2 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 42.57 KiB (43596 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     requestCore(): workers = 2
     MulticoreFuture started
     Chunk #1 of 2 ... DONE
     Chunk #2 of 2 ...
     - Finding globals in 'args_list' chunk #2 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #2 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     plan(): nbrOfWorkers() = 1
     The total size of the 3 globals is 42.61 KiB (43632 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     requestCore(): workers = 2
     MulticoreFuture started
     Chunk #2 of 2 ... DONE
     Launching 2 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     plan(): nbrOfWorkers() = 1
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     recursive: 0
     length: 2
    
     length: 1 (resolved future 1)
     length: 0 (resolved future 2)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 2 ... DONE
     foreach() - level 2 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'b'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [24] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'message', 'capture.output', 'print', 'stopifnot', 'inherits', 'getOption', 'str', 'list', 'a', 'plan_a', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 42.54 KiB (43560 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     - packages: [1] 'utils'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 2
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:4] "multicore" "multiprocess" "future" "function"
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9bc27d0>
     ..$ a :<environment: 9ac6cb0>
     ..$ plan_a :<environment: 9ac6cb0>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 43560
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 2
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:4] "multicore" "multiprocess" "future" "function"
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9bc27d0>
     ..$ a :<environment: 9ac6cb0>
     ..$ plan_a :<environment: 9ac6cb0>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 43560
     - packages: [2] 'doFuture', 'utils'
     - identifying globals and packages ... DONE
     Number of chunks: 2
     Number of futures (= number of chunks): 2
     Launching 2 futures (chunks) ...
     Chunk #1 of 2 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 42.57 KiB (43596 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     requestCore(): workers = 2
     MulticoreFuture started
     Chunk #1 of 2 ... DONE
     Chunk #2 of 2 ...
     - Finding globals in 'args_list' chunk #2 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #2 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 42.61 KiB (43632 bytes)
     plan(): nbrOfWorkers() = 1
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     requestCore(): workers = 2
     MulticoreFuture started
     Chunk #2 of 2 ... DONE
     Launching 2 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 2
    
     length: 1 (resolved future 1)
     plan(): nbrOfWorkers() = 1
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     length: 0 (resolved future 2)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 2 ... DONE
     SequentialFuture started (and completed)
     Chunk #1 of 1 ... DONE
     Launching 1 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 1
    
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     ..- attr(*, "class")= chr [1:4] "multicore" "multiprocess" "future" "function"
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     ..- attr(*, "class")= chr [1:4] "multicore" "multiprocess" "future" "function"
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 1 ... DONE
     - plan(list('sequential', 'multicore')) ... DONE
     - plan(list('sequential', 'multisession')) ...
     plan(): nbrOfWorkers() = 1
     foreach() - level 1 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'a'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [28] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'stopifnot', 'inherits', 'strategy2', 'str', 'message', '%dopar%', 'foreach', 'bs', 'c', 'capture.output', 'print', 'getOption', 'list', 'b', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 124 bytes (124 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     - packages: [2] 'utils', 'foreach'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "multisession"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 975bbe8>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "multisession"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 975bbe8>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - packages: [3] 'doFuture', 'utils', 'foreach'
     - identifying globals and packages ... DONE
     Number of chunks: 1
     Number of futures (= number of chunks): 1
     Launching 1 futures (chunks) ...
     Chunk #1 of 1 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 196 bytes (196 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     foreach() - level 2 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'b'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [24] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'message', 'capture.output', 'print', 'stopifnot', 'inherits', 'getOption', 'str', 'list', 'a', 'plan_a', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 47.03 KiB (48160 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     - packages: [1] 'utils'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 1
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:5] "multisession" "cluster" "multiprocess" "future" ...
     .. ..- attr(*, "init")= logi TRUE
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9b07d98>
     ..$ a :<environment: 97158d8>
     ..$ plan_a :<environment: 97158d8>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 48160
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 1
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:5] "multisession" "cluster" "multiprocess" "future" ...
     .. ..- attr(*, "init")= logi TRUE
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9b07d98>
     ..$ a :<environment: 97158d8>
     ..$ plan_a :<environment: 97158d8>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 48160
     - packages: [2] 'doFuture', 'utils'
     - identifying globals and packages ... DONE
     Number of chunks: 2
     Number of futures (= number of chunks): 2
     Launching 2 futures (chunks) ...
     Chunk #1 of 2 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     Workers: [n = 2] 'localhost', 'localhost'
     Base port: 11474
     Creating node 1 of 2 ...
     - setting up node
     Starting worker #1 on 'localhost': '/home/ripley/R/cc/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11474 OUT=/dev/null TIMEOUT=2592000 XDR=TRUE
     Waiting for worker #1 on 'localhost' to connect back
     Connection with worker #1 on 'localhost' established
     - assigning connection UUID
     - collecting session information
     Creating node 1 of 2 ... done
     Creating node 2 of 2 ...
     - setting up node
     Starting worker #2 on 'localhost': '/home/ripley/R/cc/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11474 OUT=/dev/null TIMEOUT=2592000 XDR=TRUE
     Waiting for worker #2 on 'localhost' to connect back
     Connection with worker #2 on 'localhost' established
     - assigning connection UUID
     - collecting session information
     Creating node 2 of 2 ... done
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 47.07 KiB (48196 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     Exporting 3 global objects (47.07 KiB) to cluster node #1 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #1 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #1 ... DONE
     Exporting 'a' (36 bytes) to cluster node #1 ...
     Exporting 'a' (36 bytes) to cluster node #1 ... DONE
     Exporting 'plan_a' (47.00 KiB) to cluster node #1 ...
     Exporting 'plan_a' (47.00 KiB) to cluster node #1 ... DONE
     Exporting 3 global objects (47.07 KiB) to cluster node #1 ... DONE
     MultisessionFuture started
     Chunk #1 of 2 ... DONE
     Chunk #2 of 2 ...
     - Finding globals in 'args_list' chunk #2 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #2 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 47.10 KiB (48232 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     Exporting 3 global objects (47.10 KiB) to cluster node #2 ...
     Exporting '...future.x_ii' (72 bytes) to cluster node #2 ...
     Exporting '...future.x_ii' (72 bytes) to cluster node #2 ... DONE
     Exporting 'a' (36 bytes) to cluster node #2 ...
     Exporting 'a' (36 bytes) to cluster node #2 ... DONE
     Exporting 'plan_a' (47.00 KiB) to cluster node #2 ...
     Exporting 'plan_a' (47.00 KiB) to cluster node #2 ... DONE
     Exporting 3 global objects (47.10 KiB) to cluster node #2 ... DONE
     MultisessionFuture started
     Chunk #2 of 2 ... DONE
     Launching 2 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 2
    
     length: 1 (resolved future 1)
     length: 0 (resolved future 2)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 2 ... DONE
     foreach() - level 2 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'b'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [24] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'message', 'capture.output', 'print', 'stopifnot', 'inherits', 'getOption', 'str', 'list', 'a', 'plan_a', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 47.03 KiB (48160 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     - packages: [1] 'utils'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 2
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:5] "multisession" "cluster" "multiprocess" "future" ...
     .. ..- attr(*, "init")= logi TRUE
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 97909e0>
     ..$ a :<environment: 9868b90>
     ..$ plan_a :<environment: 9868b90>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 48160
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 2
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:5] "multisession" "cluster" "multiprocess" "future" ...
     .. ..- attr(*, "init")= logi TRUE
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 97909e0>
     ..$ a :<environment: 9868b90>
     ..$ plan_a :<environment: 9868b90>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 48160
     - packages: [2] 'doFuture', 'utils'
     - identifying globals and packages ... DONE
     Number of chunks: 2
     Number of futures (= number of chunks): 2
     Launching 2 futures (chunks) ...
     Chunk #1 of 2 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 47.07 KiB (48196 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     Exporting 3 global objects (47.07 KiB) to cluster node #1 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #1 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #1 ... DONE
     Exporting 'a' (36 bytes) to cluster node #1 ...
     Exporting 'a' (36 bytes) to cluster node #1 ... DONE
     Exporting 'plan_a' (47.00 KiB) to cluster node #1 ...
     Exporting 'plan_a' (47.00 KiB) to cluster node #1 ... DONE
     Exporting 3 global objects (47.07 KiB) to cluster node #1 ... DONE
     MultisessionFuture started
     Chunk #1 of 2 ... DONE
     Chunk #2 of 2 ...
     - Finding globals in 'args_list' chunk #2 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #2 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 47.10 KiB (48232 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     Exporting 3 global objects (47.10 KiB) to cluster node #2 ...
     Exporting '...future.x_ii' (72 bytes) to cluster node #2 ...
     Exporting '...future.x_ii' (72 bytes) to cluster node #2 ... DONE
     Exporting 'a' (36 bytes) to cluster node #2 ...
     Exporting 'a' (36 bytes) to cluster node #2 ... DONE
     Exporting 'plan_a' (47.00 KiB) to cluster node #2 ...
     Exporting 'plan_a' (47.00 KiB) to cluster node #2 ... DONE
     Exporting 3 global objects (47.10 KiB) to cluster node #2 ... DONE
     MultisessionFuture started
     Chunk #2 of 2 ... DONE
     Launching 2 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 2
    
     length: 1 (resolved future 1)
     length: 0 (resolved future 2)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 2 ... DONE
     SequentialFuture started (and completed)
     Chunk #1 of 1 ... DONE
     Launching 1 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 1
    
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     ..- attr(*, "class")= chr [1:5] "multisession" "cluster" "multiprocess" "future" ...
     ..- attr(*, "init")= logi TRUE
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     ..- attr(*, "class")= chr [1:5] "multisession" "cluster" "multiprocess" "future" ...
     ..- attr(*, "init")= logi TRUE
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 1 ... DONE
     - plan(list('sequential', 'multisession')) ... DONE
     - plan(list('sequential', 'cluster')) ...
     plan(): nbrOfWorkers() = 1
     foreach() - level 1 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'a'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [28] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'stopifnot', 'inherits', 'strategy2', 'str', 'message', '%dopar%', 'foreach', 'bs', 'c', 'capture.output', 'print', 'getOption', 'list', 'b', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 116 bytes (116 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     - packages: [2] 'utils', 'foreach'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "cluster"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 8c4bdb0>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 116
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "cluster"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 8c4bdb0>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 116
     - packages: [3] 'doFuture', 'utils', 'foreach'
     - identifying globals and packages ... DONE
     Number of chunks: 1
     Number of futures (= number of chunks): 1
     Launching 1 futures (chunks) ...
     Chunk #1 of 1 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 188 bytes (188 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     foreach() - level 2 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'b'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [24] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'message', 'capture.output', 'print', 'stopifnot', 'inherits', 'getOption', 'str', 'list', 'a', 'plan_a', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 37.43 KiB (38332 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     - packages: [1] 'utils'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 1
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE, gc = FALSE, earlySignal = FALSE,
     label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:4] "cluster" "multiprocess" "future" "function"
     .. ..- attr(*, "init")= logi TRUE
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9b22ae0>
     ..$ a :<environment: 96e7d38>
     ..$ plan_a :<environment: 96e7d38>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 38332
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 1
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE, gc = FALSE, earlySignal = FALSE,
     label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:4] "cluster" "multiprocess" "future" "function"
     .. ..- attr(*, "init")= logi TRUE
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9b22ae0>
     ..$ a :<environment: 96e7d38>
     ..$ plan_a :<environment: 96e7d38>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 38332
     - packages: [2] 'doFuture', 'utils'
     - identifying globals and packages ... DONE
     Number of chunks: 2
     Number of futures (= number of chunks): 2
     Launching 2 futures (chunks) ...
     Chunk #1 of 2 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     Workers: [n = 2] 'localhost', 'localhost'
     Base port: 11475
     Creating node 1 of 2 ...
     - setting up node
     Starting worker #1 on 'localhost': '/home/ripley/R/cc/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11475 OUT=/dev/null TIMEOUT=2592000 XDR=TRUE
     Waiting for worker #1 on 'localhost' to connect back
     Connection with worker #1 on 'localhost' established
     - assigning connection UUID
     - collecting session information
     Creating node 1 of 2 ... done
     Creating node 2 of 2 ...
     - setting up node
     Starting worker #2 on 'localhost': '/home/ripley/R/cc/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11475 OUT=/dev/null TIMEOUT=2592000 XDR=TRUE
     Waiting for worker #2 on 'localhost' to connect back
     Connection with worker #2 on 'localhost' established
     - assigning connection UUID
     - collecting session information
     Creating node 2 of 2 ... done
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 37.47 KiB (38368 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     Exporting 3 global objects (37.47 KiB) to cluster node #1 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #1 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #1 ... DONE
     Exporting 'a' (36 bytes) to cluster node #1 ...
     Exporting 'a' (36 bytes) to cluster node #1 ... DONE
     Exporting 'plan_a' (37.40 KiB) to cluster node #1 ...
     Exporting 'plan_a' (37.40 KiB) to cluster node #1 ... DONE
     Exporting 3 global objects (37.47 KiB) to cluster node #1 ... DONE
     ClusterFuture started
     Chunk #1 of 2 ... DONE
     Chunk #2 of 2 ...
     - Finding globals in 'args_list' chunk #2 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #2 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 37.50 KiB (38404 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     Exporting 3 global objects (37.50 KiB) to cluster node #2 ...
     Exporting '...future.x_ii' (72 bytes) to cluster node #2 ...
     Exporting '...future.x_ii' (72 bytes) to cluster node #2 ... DONE
     Exporting 'a' (36 bytes) to cluster node #2 ...
     Exporting 'a' (36 bytes) to cluster node #2 ... DONE
     Exporting 'plan_a' (37.40 KiB) to cluster node #2 ...
     Exporting 'plan_a' (37.40 KiB) to cluster node #2 ... DONE
     Exporting 3 global objects (37.50 KiB) to cluster node #2 ... DONE
     ClusterFuture started
     Chunk #2 of 2 ... DONE
     Launching 2 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 2
    
     length: 1 (resolved future 1)
     length: 0 (resolved future 2)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 2 ... DONE
     foreach() - level 2 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'b'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [24] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'message', 'capture.output', 'print', 'stopifnot', 'inherits', 'getOption', 'str', 'list', 'a', 'plan_a', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 37.43 KiB (38332 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     - packages: [1] 'utils'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 2
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE, gc = FALSE, earlySignal = FALSE,
     label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:4] "cluster" "multiprocess" "future" "function"
     .. ..- attr(*, "init")= logi TRUE
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 984a670>
     ..$ a :<environment: 8a15478>
     ..$ plan_a :<environment: 8a15478>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 38332
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 2
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE, gc = FALSE, earlySignal = FALSE,
     label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:4] "cluster" "multiprocess" "future" "function"
     .. ..- attr(*, "init")= logi TRUE
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 984a670>
     ..$ a :<environment: 8a15478>
     ..$ plan_a :<environment: 8a15478>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 38332
     - packages: [2] 'doFuture', 'utils'
     - identifying globals and packages ... DONE
     Number of chunks: 2
     Number of futures (= number of chunks): 2
     Launching 2 futures (chunks) ...
     Chunk #1 of 2 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 37.47 KiB (38368 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     Exporting 3 global objects (37.47 KiB) to cluster node #1 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #1 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #1 ... DONE
     Exporting 'a' (36 bytes) to cluster node #1 ...
     Exporting 'a' (36 bytes) to cluster node #1 ... DONE
     Exporting 'plan_a' (37.40 KiB) to cluster node #1 ...
     Exporting 'plan_a' (37.40 KiB) to cluster node #1 ... DONE
     Exporting 3 global objects (37.47 KiB) to cluster node #1 ... DONE
     ClusterFuture started
     Chunk #1 of 2 ... DONE
     Chunk #2 of 2 ...
     - Finding globals in 'args_list' chunk #2 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #2 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 37.50 KiB (38404 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     Exporting 3 global objects (37.50 KiB) to cluster node #2 ...
     Exporting '...future.x_ii' (72 bytes) to cluster node #2 ...
     Exporting '...future.x_ii' (72 bytes) to cluster node #2 ... DONE
     Exporting 'a' (36 bytes) to cluster node #2 ...
     Exporting 'a' (36 bytes) to cluster node #2 ... DONE
     Exporting 'plan_a' (37.40 KiB) to cluster node #2 ...
     Exporting 'plan_a' (37.40 KiB) to cluster node #2 ... DONE
     Exporting 3 global objects (37.50 KiB) to cluster node #2 ... DONE
     ClusterFuture started
     Chunk #2 of 2 ... DONE
     Launching 2 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 2
    
     length: 1 (resolved future 1)
     length: 0 (resolved future 2)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 2 ... DONE
     SequentialFuture started (and completed)
     Chunk #1 of 1 ... DONE
     Launching 1 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 1
    
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE, gc = FALSE, earlySignal = FALSE,
     label = NULL, ...)
     ..- attr(*, "class")= chr [1:4] "cluster" "multiprocess" "future" "function"
     ..- attr(*, "init")= logi TRUE
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE, gc = FALSE, earlySignal = FALSE,
     label = NULL, ...)
     ..- attr(*, "class")= chr [1:4] "cluster" "multiprocess" "future" "function"
     ..- attr(*, "init")= logi TRUE
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 1 ... DONE
     - plan(list('sequential', 'cluster')) ... DONE
     - plan(list('multicore', 'sequential')) ...
     plan(): nbrOfWorkers() = 2
     foreach() - level 1 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'a'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [28] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'stopifnot', 'inherits', 'strategy2', 'str', 'message', '%dopar%', 'foreach', 'bs', 'c', 'capture.output', 'print', 'getOption', 'list', 'b', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 124 bytes (124 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     - packages: [2] 'utils', 'foreach'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "sequential"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 94a3830>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "sequential"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 94a3830>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - packages: [3] 'doFuture', 'utils', 'foreach'
     - identifying globals and packages ... DONE
     Number of chunks: 2
     Number of futures (= number of chunks): 2
     Launching 2 futures (chunks) ...
     Chunk #1 of 2 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 160 bytes (160 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     requestCore(): workers = 2
     MulticoreFuture started
     Chunk #1 of 2 ... DONE
     Chunk #2 of 2 ...
     - Finding globals in 'args_list' chunk #2 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #2 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 160 bytes (160 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     foreach() - level 2 ...
     doFuture() ...
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     - dummy globals (as locals): [1] 'b'
     | version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     - R expression:
     requestCore(): workers = 2
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     MulticoreFuture started
     Chunk #2 of 2 ... DONE
     Launching 2 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 2
    
     foreach() - level 2 ...
     doFuture() ...
     - globals found: [24] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'message', 'capture.output', 'print', 'stopifnot', 'inherits', 'getOption', 'str', 'list', 'a', 'plan_a', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     - dummy globals (as locals): [1] 'b'
     The total size of the 3 globals is 23.10 KiB (23652 bytes)
     - R expression:
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     - packages: [1] 'utils'
     getGlobalsAndPackages() ... DONE
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 1
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     .. ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9809ef8>
     ..$ a :<environment: 89ce618>
     ..$ plan_a :<environment: 89ce618>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 23652
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 1
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     .. ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9809ef8>
     ..$ a :<environment: 89ce618>
     ..$ plan_a :<environment: 89ce618>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 23652
     - packages: [2] 'doFuture', 'utils'
     - identifying globals and packages ... DONE
     Number of chunks: 1
     Number of futures (= number of chunks): 1
     Launching 1 futures (chunks) ...
     Chunk #1 of 1 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 23.20 KiB (23760 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     - globals found: [24] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'message', 'capture.output', 'print', 'stopifnot', 'inherits', 'getOption', 'str', 'list', 'a', 'plan_a', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     plan(): nbrOfWorkers() = 1
     The total size of the 3 globals is 23.10 KiB (23652 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     - packages: [1] 'utils'
     getGlobalsAndPackages() ... DONE
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     SequentialFuture started (and completed)
     Chunk #1 of 1 ... DONE
     Launching 1 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 1
    
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 2 ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 2
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     .. ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 8b824b0>
     ..$ a :<environment: 98aaa58>
     ..$ plan_a :<environment: 98aaa58>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 23652
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 2
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     .. ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 8b824b0>
     ..$ a :<environment: 98aaa58>
     ..$ plan_a :<environment: 98aaa58>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 23652
     - packages: [2] 'doFuture', 'utils'
     - identifying globals and packages ... DONE
     Number of chunks: 1
     Number of futures (= number of chunks): 1
     Launching 1 futures (chunks) ...
     Chunk #1 of 1 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 23.20 KiB (23760 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     plan(): nbrOfWorkers() = 1
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     SequentialFuture started (and completed)
     Chunk #1 of 1 ... DONE
     Launching 1 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 1
    
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 2 ... DONE
     length: 1 (resolved future 2)
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 1 ... DONE
     - plan(list('multicore', 'sequential')) ... DONE
     - plan(list('multicore', 'multicore')) ...
     plan(): nbrOfWorkers() = 2
     foreach() - level 1 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'a'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [28] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'stopifnot', 'inherits', 'strategy2', 'str', 'message', '%dopar%', 'foreach', 'bs', 'c', 'capture.output', 'print', 'getOption', 'list', 'b', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 124 bytes (124 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     - packages: [2] 'utils', 'foreach'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "multicore"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9b29760>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "multicore"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9b29760>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - packages: [3] 'doFuture', 'utils', 'foreach'
     - identifying globals and packages ... DONE
     Number of chunks: 2
     Number of futures (= number of chunks): 2
     Launching 2 futures (chunks) ...
     Chunk #1 of 2 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 160 bytes (160 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >= 1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     requestCore(): workers = 2
     MulticoreFuture started
     Chunk #1 of 2 ... DONE
     Chunk #2 of 2 ...
     - Finding globals in 'args_list' chunk #2 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #2 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 160 bytes (160 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     foreach() - level 2 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'b'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >= 1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     requestCore(): workers = 2
     Searching for globals...
     foreach() - level 2 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'b'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     MulticoreFuture started
     Chunk #2 of 2 ... DONE
     Launching 2 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 2
    
     - globals found: [24] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'message', 'capture.output', 'print', 'stopifnot', 'inherits', 'getOption', 'str', 'list', 'a', 'plan_a', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 42.54 KiB (43560 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     - packages: [1] 'utils'
     getGlobalsAndPackages() ... DONE
     - globals found: [24] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'message', 'capture.output', 'print', 'stopifnot', 'inherits', 'getOption', 'str', 'list', 'a', 'plan_a', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 42.54 KiB (43560 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     - packages: [1] 'utils'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 1
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:4] "multicore" "multiprocess" "future" "function"
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: a5271e0>
     ..$ a :<environment: a17c320>
     ..$ plan_a :<environment: a17c320>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 43560
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 2
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:4] "multicore" "multiprocess" "future" "function"
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 93ce898>
     ..$ a :<environment: 95f2c08>
     ..$ plan_a :<environment: 95f2c08>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 43560
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 2
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:4] "multicore" "multiprocess" "future" "function"
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 93ce898>
     ..$ a :<environment: 95f2c08>
     ..$ plan_a :<environment: 95f2c08>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 43560
     - packages: [2] 'doFuture', 'utils'
     - identifying globals and packages ... DONE
     Number of chunks: 1
     Number of futures (= number of chunks): 1
     Launching 1 futures (chunks) ...
     Chunk #1 of 1 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 42.64 KiB (43668 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 0): <none>
     plan(): nbrOfWorkers() = 1
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     SequentialFuture started (and completed)
     Chunk #1 of 1 ... DONE
     Launching 1 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 1
    
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 2 ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 1
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:4] "multicore" "multiprocess" "future" "function"
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: a5271e0>
     ..$ a :<environment: a17c320>
     ..$ plan_a :<environment: a17c320>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 43560
     - packages: [2] 'doFuture', 'utils'
     - identifying globals and packages ... DONE
     Number of chunks: 1
     Number of futures (= number of chunks): 1
     Launching 1 futures (chunks) ...
     Chunk #1 of 1 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 42.64 KiB (43668 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 0): <none>
     length: 1 (resolved future 2)
     plan(): nbrOfWorkers() = 1
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     SequentialFuture started (and completed)
     Chunk #1 of 1 ... DONE
     Launching 1 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 1
    
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 2 ... DONE
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     ..- attr(*, "class")= chr [1:4] "multicore" "multiprocess" "future" "function"
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ", "",
     R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     ..- attr(*, "class")= chr [1:4] "multicore" "multiprocess" "future" "function"
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ", "",
     R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 1 ... DONE
     - plan(list('multicore', 'multicore')) ... DONE
     - plan(list('multicore', 'multisession')) ...
     plan(): nbrOfWorkers() = 2
     foreach() - level 1 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'a'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [28] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'stopifnot', 'inherits', 'strategy2', 'str', 'message', '%dopar%', 'foreach', 'bs', 'c', 'capture.output', 'print', 'getOption', 'list', 'b', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 124 bytes (124 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     - packages: [2] 'utils', 'foreach'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "multisession"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 8e446d0>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "multisession"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 8e446d0>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - packages: [3] 'doFuture', 'utils', 'foreach'
     - identifying globals and packages ... DONE
     Number of chunks: 2
     Number of futures (= number of chunks): 2
     Launching 2 futures (chunks) ...
     Chunk #1 of 2 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 160 bytes (160 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     requestCore(): workers = 2
     MulticoreFuture started
     Chunk #1 of 2 ... DONE
     Chunk #2 of 2 ...
     - Finding globals in 'args_list' chunk #2 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #2 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 160 bytes (160 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     foreach() - level 2 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'b'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     - R expression:
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     requestCore(): workers = 2
     uture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     MulticoreFuture started
     Chunk #2 of 2 ... DONE
     Launching 2 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 2
    
     - globals found: [24] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'message', 'capture.output', 'print', 'stopifnot', 'inherits', 'getOption', 'str', 'list', 'a', 'plan_a', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 47.03 KiB (48160 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     - packages: [1] 'utils'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 1
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:5] "multisession" "cluster" "multiprocess" "future" ...
     .. ..- attr(*, "init")= logi TRUE
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 8eadcc8>
     ..$ a :<environment: 9759c50>
     ..$ plan_a :<environment: 9759c50>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 48160
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 1
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:5] "multisession" "cluster" "multiprocess" "future" ...
     .. ..- attr(*, "init")= logi TRUE
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 8eadcc8>
     ..$ a :<environment: 9759c50>
     ..$ plan_a :<environment: 9759c50>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 48160
     - packages: [2] 'doFuture', 'utils'
     - identifying globals and packages ... DONE
     Number of chunks: 1
     Number of futures (= number of chunks): 1
     Launching 1 futures (chunks) ...
     Chunk #1 of 1 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 47.14 KiB (48268 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Chunk #1 of 1 ... DONE
     Launching 1 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 1
    
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 0): <none>
     plan(): nbrOfWorkers() = 1
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     foreach() - level 2 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'b'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     SequentialFuture started (and completed)
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 2 ... DONE
     length: 1 (resolved future 1)
     - globals found: [24] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'message', 'capture.output', 'print', 'stopifnot', 'inherits', 'getOption', 'str', 'list', 'a', 'plan_a', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 47.03 KiB (48160 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     - packages: [1] 'utils'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 2
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:5] "multisession" "cluster" "multiprocess" "future" ...
     .. ..- attr(*, "init")= logi TRUE
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9bf5840>
     ..$ a :<environment: 9518700>
     ..$ plan_a :<environment: 9518700>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 48160
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 2
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:5] "multisession" "cluster" "multiprocess" "future" ...
     .. ..- attr(*, "init")= logi TRUE
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9bf5840>
     ..$ a :<environment: 9518700>
     ..$ plan_a :<environment: 9518700>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 48160
     - packages: [2] 'doFuture', 'utils'
     - identifying globals and packages ... DONE
     Number of chunks: 1
     Number of futures (= number of chunks): 1
     Launching 1 futures (chunks) ...
     Chunk #1 of 1 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 47.14 KiB (48268 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Chunk #1 of 1 ... DONE
     Launching 1 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 1
    
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 0): <none>
     plan(): nbrOfWorkers() = 1
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     sequential:- args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL, ...)- tweaked: FALSE- call: future::plan("default", .cleanup = FALSE, .init = FALSE)
     SequentialFuture started (and completed)
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 2 ... DONE
     length: 0 (resolved future 2)
     resolve() on list ... DONE
     - relaying conditions of futures
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     ..- attr(*, "class")= chr [1:5] "multisession" "cluster" "multiprocess" "future" ...
     ..- attr(*, "init")= logi TRUE
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ", "",
     R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     ..- attr(*, "class")= chr [1:5] "multisession" "cluster" "multiprocess" "future" ...
     ..- attr(*, "init")= logi TRUE
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ", "",
     R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 1 ... DONE
     - plan(list('multicore', 'multisession')) ... DONE
     - plan(list('multicore', 'cluster')) ...
     plan(): nbrOfWorkers() = 2
     foreach() - level 1 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'a'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [28] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'stopifnot', 'inherits', 'strategy2', 'str', 'message', '%dopar%', 'foreach', 'bs', 'c', 'capture.output', 'print', 'getOption', 'list', 'b', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 116 bytes (116 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     - packages: [2] 'utils', 'foreach'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "cluster"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9c735d0>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 116
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "cluster"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9c735d0>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 116
     - packages: [3] 'doFuture', 'utils', 'foreach'
     - identifying globals and packages ... DONE
     Number of chunks: 2
     Number of futures (= number of chunks): 2
     Launching 2 futures (chunks) ...
     Chunk #1 of 2 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 152 bytes (152 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     requestCore(): workers = 2
     MulticoreFuture started
     Chunk #1 of 2 ... DONE
     Chunk #2 of 2 ...
     - Finding globals in 'args_list' chunk #2 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #2 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 152 bytes (152 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     foreach() - level 2 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'b'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     - identifying globals and packages ...
     L, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     getGlobalsAndPackages() ...
     s == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     Searching for globals...
     requestCore(): workers = 2
     MulticoreFuture started
     Chunk #2 of 2 ... DONE
     Launching 2 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 2
    
     - globals found: [24] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'message', 'capture.output', 'print', 'stopifnot', 'inherits', 'getOption', 'str', 'list', 'a', 'plan_a', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     foreach() - level 2 ...
     doFuture() ...
     The total size of the 3 globals is 37.43 KiB (38332 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     - packages: [1] 'utils'
     getGlobalsAndPackages() ... DONE
     - dummy globals (as locals): [1] 'b'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 1
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE, gc = FALSE, earlySignal = FALSE,
     label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:4] "cluster" "multiprocess" "future" "function"
     .. ..- attr(*, "init")= logi TRUE
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 934b2d0>
     ..$ a :<environment: 9c9bb50>
     ..$ plan_a :<environment: 9c9bb50>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 38332
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 1
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE, gc = FALSE, earlySignal = FALSE,
     label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:4] "cluster" "multiprocess" "future" "function"
     .. ..- attr(*, "init")= logi TRUE
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 934b2d0>
     ..$ a :<environment: 9c9bb50>
     ..$ plan_a :<environment: 9c9bb50>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 38332
     - packages: [2] 'doFuture', 'utils'
     - identifying globals and packages ... DONE
     Number of chunks: 1
     Number of futures (= number of chunks): 1
     Launching 1 futures (chunks) ...
     Chunk #1 of 1 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     Workers: [n = 1] 'localhost'
     Base port: 11605
     - globals found: [24] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'message', 'capture.output', 'print', 'stopifnot', 'inherits', 'getOption', 'str', 'list', 'a', 'plan_a', 'identity'
     Creating node 1 of 1 ...
     - setting up node
     Searching for globals ... DONE
     Resolving globals: FALSE
     Starting worker #1 on 'localhost': '/home/ripley/R/cc/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11605 OUT=/dev/null TIMEOUT=2592000 XDR=TRUE
     The total size of the 3 globals is 37.43 KiB (38332 bytes)
     Waiting for worker #1 on 'localhost' to connect back
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     - packages: [1] 'utils'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 2
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE, gc = FALSE, earlySignal = FALSE,
     label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:4] "cluster" "multiprocess" "future" "function"
     .. ..- attr(*, "init")= logi TRUE
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 97b3570>
     ..$ a :<environment: 8e39120>
     ..$ plan_a :<environment: 8e39120>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 38332
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"), inherits(plan_b[[1]],
     getOption("future.default", "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
     List of 3
     $ ...future.x_ii: NULL
     $ a : int 2
     $ plan_a :List of 1
     ..$ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE, gc = FALSE, earlySignal = FALSE,
     label = NULL, ...)
     .. ..- attr(*, "class")= chr [1:4] "cluster" "multiprocess" "future" "function"
     .. ..- attr(*, "init")= logi TRUE
     .. ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     ..- attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 97b3570>
     ..$ a :<environment: 8e39120>
     ..$ plan_a :<environment: 8e39120>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 38332
     - packages: [2] 'doFuture', 'utils'
     - identifying globals and packages ... DONE
     Number of chunks: 1
     Number of futures (= number of chunks): 1
     Launching 1 futures (chunks) ...
     Chunk #1 of 1 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     Workers: [n = 1] 'localhost'
     Base port: 11972
     Creating node 1 of 1 ...
     - setting up node
     Starting worker #1 on 'localhost': '/home/ripley/R/cc/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11972 OUT=/dev/null TIMEOUT=2592000 XDR=TRUE
     Waiting for worker #1 on 'localhost' to connect back
     Connection with worker #1 on 'localhost' established
     - assigning connection UUID
     - collecting session information
     Creating node 1 of 1 ... done
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 37.54 KiB (38440 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     Exporting 3 global objects (37.54 KiB) to cluster node #1 ...
     Exporting '...future.x_ii' (108 bytes) to cluster node #1 ...
     Exporting '...future.x_ii' (108 bytes) to cluster node #1 ... DONE
     Exporting 'a' (36 bytes) to cluster node #1 ...
     Exporting 'a' (36 bytes) to cluster node #1 ... DONE
     Exporting 'plan_a' (37.40 KiB) to cluster node #1 ...
     Exporting 'plan_a' (37.40 KiB) to cluster node #1 ... DONE
     Exporting 3 global objects (37.54 KiB) to cluster node #1 ... DONE
     ClusterFuture started
     Chunk #1 of 1 ... DONE
     Launching 1 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 1
    
     Connection with worker #1 on 'localhost' established
     - assigning connection UUID
     - collecting session information
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 2 ... DONE
     length: 1 (resolved future 1)
     Creating node 1 of 1 ... done
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'a', 'plan_a'
     Resolving globals: FALSE
     The total size of the 3 globals is 37.54 KiB (38440 bytes)
     - globals: [3] '...future.x_ii', 'a', 'plan_a'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 0): <none>
     Packages needed by the future expression (n = 2): 'doFuture', 'utils'
     Exporting 3 global objects (37.54 KiB) to cluster node #1 ...
     Exporting '...future.x_ii' (108 bytes) to cluster node #1 ...
     Exporting '...future.x_ii' (108 bytes) to cluster node #1 ... DONE
     Exporting 'a' (36 bytes) to cluster node #1 ...
     Exporting 'a' (36 bytes) to cluster node #1 ... DONE
     Exporting 'plan_a' (37.40 KiB) to cluster node #1 ...
     Exporting 'plan_a' (37.40 KiB) to cluster node #1 ... DONE
     Exporting 3 global objects (37.54 KiB) to cluster node #1 ... DONE
     ClusterFuture started
     Chunk #1 of 1 ... DONE
     Launching 1 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 1
    
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 2 ... DONE
     length: 0 (resolved future 2)
     resolve() on list ... DONE
     - relaying conditions of futures
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE, gc = FALSE, earlySignal = FALSE,
     label = NULL, ...)
     ..- attr(*, "class")= chr [1:4] "cluster" "multiprocess" "future" "function"
     ..- attr(*, "init")= logi TRUE
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE, gc = FALSE, earlySignal = FALSE,
     label = NULL, ...)
     ..- attr(*, "class")= chr [1:4] "cluster" "multiprocess" "future" "function"
     ..- attr(*, "init")= logi TRUE
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     has_future <- requireNamespace("future", quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info), info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     local({
     for (pkg in c("doFuture", "utils")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan("default", .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     b <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     NULL
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 1 ... DONE
     - plan(list('multicore', 'cluster')) ... DONE
     - plan(list('multisession', 'sequential')) ...
     plan(): plan_init() of 'multisession', 'cluster', 'multiprocess', 'future', 'function' ...
     multisession:
     - args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(), gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     - tweaked: FALSE
     - call: plan(list(a = strategy1, b = strategy2))
     Workers: [n = 2] 'localhost', 'localhost'
     Base port: 11169
     Creating node 1 of 2 ...
     - setting up node
     Starting worker #1 on 'localhost': '/home/ripley/R/cc/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11169 OUT=/dev/null TIMEOUT=2592000 XDR=TRUE
     Waiting for worker #1 on 'localhost' to connect back
     Connection with worker #1 on 'localhost' established
     - assigning connection UUID
     - collecting session information
     Creating node 1 of 2 ... done
     Creating node 2 of 2 ...
     - setting up node
     Starting worker #2 on 'localhost': '/home/ripley/R/cc/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11169 OUT=/dev/null TIMEOUT=2592000 XDR=TRUE
     Waiting for worker #2 on 'localhost' to connect back
     Connection with worker #2 on 'localhost' established
     - assigning connection UUID
     - collecting session information
     Creating node 2 of 2 ... done
     getGlobalsAndPackages() ...
     Not searching for globals
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 0): <none>
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in "future") {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local(NA)
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     MultisessionFuture started
     plan(): plan_init() of 'multisession', 'cluster', 'multiprocess', 'future', 'function' ... DONE
     plan(): nbrOfWorkers() = 2
     foreach() - level 1 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'a'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [28] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'stopifnot', 'inherits', 'strategy2', 'str', 'message', '%dopar%', 'foreach', 'bs', 'c', 'capture.output', 'print', 'getOption', 'list', 'b', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 124 bytes (124 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     - packages: [2] 'utils', 'foreach'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "sequential"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9b2de10>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "sequential"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9b2de10>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - packages: [3] 'doFuture', 'utils', 'foreach'
     - identifying globals and packages ... DONE
     Number of chunks: 2
     Number of futures (= number of chunks): 2
     Launching 2 futures (chunks) ...
     Chunk #1 of 2 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 160 bytes (160 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     Exporting 3 global objects (160 bytes) to cluster node #1 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #1 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #1 ... DONE
     Exporting 'strategy2' (80 bytes) to cluster node #1 ...
     Exporting 'strategy2' (80 bytes) to cluster node #1 ... DONE
     Exporting 'bs' (44 bytes) to cluster node #1 ...
     Exporting 'bs' (44 bytes) to cluster node #1 ... DONE
     Exporting 3 global objects (160 bytes) to cluster node #1 ... DONE
     MultisessionFuture started
     Chunk #1 of 2 ... DONE
     Chunk #2 of 2 ...
     - Finding globals in 'args_list' chunk #2 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #2 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 160 bytes (160 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, local = TRUE, earlySignal = FALSE,
     label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     local <- as.logical(local)
     future <- SequentialFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, local = local, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     Exporting 3 global objects (160 bytes) to cluster node #2 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #2 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #2 ... DONE
     Exporting 'strategy2' (80 bytes) to cluster node #2 ...
     Exporting 'strategy2' (80 bytes) to cluster node #2 ... DONE
     Exporting 'bs' (44 bytes) to cluster node #2 ...
     Exporting 'bs' (44 bytes) to cluster node #2 ... DONE
     Exporting 3 global objects (160 bytes) to cluster node #2 ... DONE
     MultisessionFuture started
     Chunk #2 of 2 ... DONE
     Launching 2 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 2
    
     length: 1 (resolved future 2)
     length: 0 (resolved future 1)
     resolve() on list ... DONE
     - relaying conditions of futures
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 1 ... DONE
     - plan(list('multisession', 'sequential')) ... DONE
     - plan(list('multisession', 'multicore')) ...
     plan(): plan_init() of 'multisession', 'cluster', 'multiprocess', 'future', 'function' ...
     multisession:
     - args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(), gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     - tweaked: FALSE
     - call: plan(list(a = strategy1, b = strategy2))
     Workers: [n = 2] 'localhost', 'localhost'
     Base port: 11089
     Creating node 1 of 2 ...
     - setting up node
     Starting worker #1 on 'localhost': '/home/ripley/R/cc/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11089 OUT=/dev/null TIMEOUT=2592000 XDR=TRUE
     Waiting for worker #1 on 'localhost' to connect back
     Connection with worker #1 on 'localhost' established
     - assigning connection UUID
     - collecting session information
     Creating node 1 of 2 ... done
     Creating node 2 of 2 ...
     - setting up node
     Starting worker #2 on 'localhost': '/home/ripley/R/cc/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11089 OUT=/dev/null TIMEOUT=2592000 XDR=TRUE
     Waiting for worker #2 on 'localhost' to connect back
     Connection with worker #2 on 'localhost' established
     - assigning connection UUID
     - collecting session information
     Creating node 2 of 2 ... done
     getGlobalsAndPackages() ...
     Not searching for globals
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 0): <none>
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in "future") {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >= 1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local(NA)
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     MultisessionFuture started
     plan(): plan_init() of 'multisession', 'cluster', 'multiprocess', 'future', 'function' ... DONE
     plan(): nbrOfWorkers() = 2
     foreach() - level 1 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'a'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [28] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'stopifnot', 'inherits', 'strategy2', 'str', 'message', '%dopar%', 'foreach', 'bs', 'c', 'capture.output', 'print', 'getOption', 'list', 'b', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 124 bytes (124 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     - packages: [2] 'utils', 'foreach'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "multicore"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9b37200>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "multicore"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9b37200>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - packages: [3] 'doFuture', 'utils', 'foreach'
     - identifying globals and packages ... DONE
     Number of chunks: 2
     Number of futures (= number of chunks): 2
     Launching 2 futures (chunks) ...
     Chunk #1 of 2 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 160 bytes (160 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >= 1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     Exporting 3 global objects (160 bytes) to cluster node #1 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #1 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #1 ... DONE
     Exporting 'strategy2' (80 bytes) to cluster node #1 ...
     Exporting 'strategy2' (80 bytes) to cluster node #1 ... DONE
     Exporting 'bs' (44 bytes) to cluster node #1 ...
     Exporting 'bs' (44 bytes) to cluster node #1 ... DONE
     Exporting 3 global objects (160 bytes) to cluster node #1 ... DONE
     MultisessionFuture started
     Chunk #1 of 2 ... DONE
     Chunk #2 of 2 ...
     - Finding globals in 'args_list' chunk #2 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #2 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 160 bytes (160 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >= 1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(is.finite(workers), workers >=
     1L)
     if (workers == 1L || !supportsMulticore()) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = lazy, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     oopts <- options(mc.cores = workers)
     on.exit(options(oopts))
     future <- MulticoreFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, workers = workers, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     Exporting 3 global objects (160 bytes) to cluster node #2 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #2 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #2 ... DONE
     Exporting 'strategy2' (80 bytes) to cluster node #2 ...
     Exporting 'strategy2' (80 bytes) to cluster node #2 ... DONE
     Exporting 'bs' (44 bytes) to cluster node #2 ...
     Exporting 'bs' (44 bytes) to cluster node #2 ... DONE
     Exporting 3 global objects (160 bytes) to cluster node #2 ... DONE
     MultisessionFuture started
     Chunk #2 of 2 ... DONE
     Launching 2 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 2
    
     length: 1 (resolved future 1)
     length: 0 (resolved future 2)
     resolve() on list ... DONE
     - relaying conditions of futures
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     ..- attr(*, "class")= chr [1:4] "multicore" "multiprocess" "future" "function"
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"),
     earlySignal = FALSE, label = NULL, ...)
     ..- attr(*, "class")= chr [1:4] "multicore" "multiprocess" "future" "function"
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 1 ... DONE
     - plan(list('multisession', 'multicore')) ... DONE
     - plan(list('multisession', 'multisession')) ...
     plan(): plan_init() of 'multisession', 'cluster', 'multiprocess', 'future', 'function' ...
     multisession:
     - args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(), gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     - tweaked: FALSE
     - call: plan(list(a = strategy1, b = strategy2))
     Workers: [n = 2] 'localhost', 'localhost'
     Base port: 11708
     Creating node 1 of 2 ...
     - setting up node
     Starting worker #1 on 'localhost': '/home/ripley/R/cc/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11708 OUT=/dev/null TIMEOUT=2592000 XDR=TRUE
     Waiting for worker #1 on 'localhost' to connect back
     Connection with worker #1 on 'localhost' established
     - assigning connection UUID
     - collecting session information
     Creating node 1 of 2 ... done
     Creating node 2 of 2 ...
     - setting up node
     Starting worker #2 on 'localhost': '/home/ripley/R/cc/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11708 OUT=/dev/null TIMEOUT=2592000 XDR=TRUE
     Waiting for worker #2 on 'localhost' to connect back
     Connection with worker #2 on 'localhost' established
     - assigning connection UUID
     - collecting session information
     Creating node 2 of 2 ... done
     getGlobalsAndPackages() ...
     Not searching for globals
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 0): <none>
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in "future") {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local(NA)
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     MultisessionFuture started
     plan(): plan_init() of 'multisession', 'cluster', 'multiprocess', 'future', 'function' ... DONE
     plan(): nbrOfWorkers() = 2
     foreach() - level 1 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'a'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [28] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'stopifnot', 'inherits', 'strategy2', 'str', 'message', '%dopar%', 'foreach', 'bs', 'c', 'capture.output', 'print', 'getOption', 'list', 'b', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 124 bytes (124 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     - packages: [2] 'utils', 'foreach'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "multisession"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9bea7b0>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "multisession"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: 9bea7b0>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 124
     - packages: [3] 'doFuture', 'utils', 'foreach'
     - identifying globals and packages ... DONE
     Number of chunks: 2
     Number of futures (= number of chunks): 2
     Launching 2 futures (chunks) ...
     Chunk #1 of 2 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 160 bytes (160 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     Exporting 3 global objects (160 bytes) to cluster node #1 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #1 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #1 ... DONE
     Exporting 'strategy2' (80 bytes) to cluster node #1 ...
     Exporting 'strategy2' (80 bytes) to cluster node #1 ... DONE
     Exporting 'bs' (44 bytes) to cluster node #1 ...
     Exporting 'bs' (44 bytes) to cluster node #1 ... DONE
     Exporting 3 global objects (160 bytes) to cluster node #1 ... DONE
     MultisessionFuture started
     Chunk #1 of 2 ... DONE
     Chunk #2 of 2 ...
     - Finding globals in 'args_list' chunk #2 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #2 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 160 bytes (160 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     Exporting 3 global objects (160 bytes) to cluster node #2 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #2 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #2 ... DONE
     Exporting 'strategy2' (80 bytes) to cluster node #2 ...
     Exporting 'strategy2' (80 bytes) to cluster node #2 ... DONE
     Exporting 'bs' (44 bytes) to cluster node #2 ...
     Exporting 'bs' (44 bytes) to cluster node #2 ... DONE
     Exporting 3 global objects (160 bytes) to cluster node #2 ... DONE
     MultisessionFuture started
     Chunk #2 of 2 ... DONE
     Launching 2 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 2
    
     length: 1 (resolved future 1)
     length: 0 (resolved future 2)
     resolve() on list ... DONE
     - relaying conditions of futures
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     ..- attr(*, "class")= chr [1:5] "multisession" "cluster" "multiprocess" "future" ...
     ..- attr(*, "init")= logi TRUE
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     ..- attr(*, "class")= chr [1:5] "multisession" "cluster" "multiprocess" "future" ...
     ..- attr(*, "init")= logi TRUE
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 1 ... DONE
     - plan(list('multisession', 'multisession')) ... DONE
     - plan(list('multisession', 'cluster')) ...
     plan(): plan_init() of 'multisession', 'cluster', 'multiprocess', 'future', 'function' ...
     multisession:
     - args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, persistent = FALSE, workers = availableCores(), gc = FALSE, earlySignal = FALSE, label = NULL, ...)
     - tweaked: FALSE
     - call: plan(list(a = strategy1, b = strategy2))
     Workers: [n = 2] 'localhost', 'localhost'
     Base port: 11348
     Creating node 1 of 2 ...
     - setting up node
     Starting worker #1 on 'localhost': '/home/ripley/R/cc/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11348 OUT=/dev/null TIMEOUT=2592000 XDR=TRUE
     Waiting for worker #1 on 'localhost' to connect back
     Connection with worker #1 on 'localhost' established
     - assigning connection UUID
     - collecting session information
     Creating node 1 of 2 ... done
     Creating node 2 of 2 ...
     - setting up node
     Starting worker #2 on 'localhost': '/home/ripley/R/cc/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11348 OUT=/dev/null TIMEOUT=2592000 XDR=TRUE
     Waiting for worker #2 on 'localhost' to connect back
     Connection with worker #2 on 'localhost' established
     - assigning connection UUID
     - collecting session information
     Creating node 2 of 2 ... done
     getGlobalsAndPackages() ...
     Not searching for globals
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 0): <none>
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in "future") {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local(NA)
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     MultisessionFuture started
     plan(): plan_init() of 'multisession', 'cluster', 'multiprocess', 'future', 'function' ... DONE
     plan(): nbrOfWorkers() = 2
     foreach() - level 1 ...
     doFuture() ...
     - dummy globals (as locals): [1] 'a'
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - identifying globals and packages ...
     getGlobalsAndPackages() ...
     Searching for globals...
     - globals found: [28] '{', '::', 'lapply', 'seq_along', '...future.x_ii', '<-', '[[', 'environment', 'local', 'for', 'names', 'assign', 'tryCatch', 'stopifnot', 'inherits', 'strategy2', 'str', 'message', '%dopar%', 'foreach', 'bs', 'c', 'capture.output', 'print', 'getOption', 'list', 'b', 'identity'
     Searching for globals ... DONE
     Resolving globals: FALSE
     The total size of the 3 globals is 116 bytes (116 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     - packages: [2] 'utils', 'foreach'
     getGlobalsAndPackages() ... DONE
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "cluster"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: a1385c8>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 116
     - R expression:
     {
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"), inherits(plan_list,
     getOption("future.default", "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     }
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
     List of 3
     $ ...future.x_ii: NULL
     $ strategy2 : chr "cluster"
     $ bs : int [1:3] 3 2 1
     - attr(*, "where")=List of 3
     ..$ ...future.x_ii:<environment: a1385c8>
     ..$ strategy2 :<environment: R_GlobalEnv>
     ..$ bs :<environment: R_GlobalEnv>
     - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
     - attr(*, "resolved")= logi FALSE
     - attr(*, "total_size")= num 116
     - packages: [3] 'doFuture', 'utils', 'foreach'
     - identifying globals and packages ... DONE
     Number of chunks: 2
     Number of futures (= number of chunks): 2
     Launching 2 futures (chunks) ...
     Chunk #1 of 2 ...
     - Finding globals in 'args_list' chunk #1 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #1 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 152 bytes (152 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     Exporting 3 global objects (152 bytes) to cluster node #1 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #1 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #1 ... DONE
     Exporting 'strategy2' (72 bytes) to cluster node #1 ...
     Exporting 'strategy2' (72 bytes) to cluster node #1 ... DONE
     Exporting 'bs' (44 bytes) to cluster node #1 ...
     Exporting 'bs' (44 bytes) to cluster node #1 ... DONE
     Exporting 3 global objects (152 bytes) to cluster node #1 ... DONE
     MultisessionFuture started
     Chunk #1 of 2 ... DONE
     Chunk #2 of 2 ...
     - Finding globals in 'args_list' chunk #2 ...
     getGlobalsAndPackages() ...
     Searching for globals...
    
     Searching for globals ... DONE
     - globals: [0] <none>
     getGlobalsAndPackages() ... DONE
    
    
     - Finding globals in 'args_list' for chunk #2 ... DONE
     getGlobalsAndPackages() ...
     - globals passed as-is: [3] '...future.x_ii', 'strategy2', 'bs'
     Resolving globals: FALSE
     The total size of the 3 globals is 152 bytes (152 bytes)
     - globals: [3] '...future.x_ii', 'strategy2', 'bs'
    
     getGlobalsAndPackages() ... DONE
     Packages needed by future strategies (n = 1): 'future'
     Packages needed by the future expression (n = 3): 'doFuture', 'utils', 'foreach'
     {
     {
     ...future.oldOptions <- options(future.startup.loadScript = FALSE,
     future.globals.onMissing = "ignore", future.globals.maxSize = NULL,
     future.globals.method = NULL, future.globals.onMissing = "ignore",
     future.globals.onReference = NULL, future.globals.resolve = NULL,
     future.resolve.recursive = NULL, width = 80L)
     {
     {
     {
     {
     has_future <- requireNamespace("future",
     quietly = TRUE)
     version <- if (has_future)
     packageVersion("future")
     else NULL
     if (!has_future || version < "1.8.0") {
     info <- c(r_version = gsub("R version ",
     "", R.version$version.string), platform = sprintf("%s (%s-bit)",
     R.version$platform, 8 * .Machine$sizeof.pointer),
     os = paste(Sys.info()[c("sysname", "release",
     "version")], collapse = " "), hostname = Sys.info()[["nodename"]])
     info <- sprintf("%s: %s", names(info),
     info)
     info <- paste(info, collapse = "; ")
     if (!has_future) {
     msg <- sprintf("Package 'future' is not installed on worker (%s)",
     info)
     }
     else {
     msg <- sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s",
     info, version)
     }
     stop(msg)
     }
     }
     ...future.mc.cores.old <- getOption("mc.cores")
     options(mc.cores = 1L)
     }
     local({
     for (pkg in c("future", "doFuture", "utils",
     "foreach")) {
     loadNamespace(pkg)
     library(pkg, character.only = TRUE)
     }
     })
     }
     future::plan(list(b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     }
     if (is.na(TRUE)) {
     }
     else {
     if (TRUE) {
     ...future.stdout <- rawConnection(raw(0L), open = "w")
     }
     else {
     ...future.stdout <- file(switch(.Platform$OS.type,
     windows = "NUL", "/dev/null"), open = "w")
     }
     sink(...future.stdout, type = "output", split = FALSE)
     on.exit(if (!is.null(...future.stdout)) {
     sink(type = "output", split = FALSE)
     close(...future.stdout)
     }, add = TRUE)
     }
     ...future.result <- tryCatch({
     ...future.value <- local({
     doFuture::registerDoFuture()
     lapply(seq_along(...future.x_ii), FUN = function(jj) {
     ...future.x_jj <- ...future.x_ii[[jj]]
     a <- NULL
     ...future.env <- environment()
     local({
     for (name in names(...future.x_jj)) {
     assign(name, ...future.x_jj[[name]], envir = ...future.env,
     inherits = FALSE)
     }
     })
     tryCatch({
     plan_list <- future::plan()
     stopifnot(inherits(plan_list, strategy2))
     plan_a <- future::plan("list")
     str(plan_a)
     stopifnot(inherits(plan_a[[1]], strategy2))
     message("foreach() - level 2 ...")
     y <- foreach(b = bs, .export = c("a", "plan_a")) %dopar%
     {
     plan_list <- future::plan()
     message(capture.output(print(plan_list)))
     stopifnot(inherits(plan_list, "future"),
     inherits(plan_list, getOption("future.default",
     "sequential")))
     plan_b <- future::plan("list")
     str(plan_b)
     stopifnot(inherits(plan_b[[1]], "future"),
     inherits(plan_b[[1]], getOption("future.default",
     "sequential")))
     list(a = a, plan_a = plan_a, b = b, plan_b = plan_b)
     }
     message("foreach() - level 2 ... DONE")
     y
     }, error = identity)
     })
     })
     future::FutureResult(value = ...future.value, version = "1.8")
     }, error = function(cond) {
     calls <- sys.calls()
     structure(list(value = NULL, condition = cond, calls = calls,
     version = "1.8"), class = "FutureResult")
     }, finally = {
     {
     {
     {
     options(mc.cores = ...future.mc.cores.old)
     }
     future::plan(list(a = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableCores(),
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     if (is.function(workers))
     workers <- workers()
     workers <- as.integer(workers)
     stop_if_not(length(workers) == 1, is.finite(workers),
     workers >= 1)
     if (workers == 1L) {
     return(sequential(expr, envir = envir, substitute = FALSE,
     lazy = TRUE, seed = seed, globals = globals,
     local = TRUE, label = label))
     }
     workers <- ClusterRegistry("start", workers = workers)
     future <- MultisessionFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }, b = function (expr, envir = parent.frame(),
     substitute = TRUE, lazy = FALSE, seed = NULL,
     globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE,
     gc = FALSE, earlySignal = FALSE, label = NULL,
     ...)
     {
     if (substitute)
     expr <- substitute(expr)
     future <- ClusterFuture(expr = expr, envir = envir,
     substitute = FALSE, lazy = lazy, seed = seed,
     globals = globals, persistent = persistent,
     workers = workers, user = user, revtunnel = revtunnel,
     homogeneous = homogeneous, gc = gc, earlySignal = earlySignal,
     label = label, ...)
     if (!future$lazy)
     future <- run(future)
     invisible(future)
     }), .cleanup = FALSE, .init = FALSE)
     }
     options(...future.oldOptions)
     }
     })
     if (is.na(TRUE)) {
     }
     else {
     sink(type = "output", split = FALSE)
     if (TRUE) {
     ...future.result$stdout <- rawToChar(rawConnectionValue(...future.stdout))
     }
     else {
     ...future.result["stdout"] <- list(NULL)
     }
     close(...future.stdout)
     ...future.stdout <- NULL
     }
     ...future.result
     }
     Exporting 3 global objects (152 bytes) to cluster node #2 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #2 ...
     Exporting '...future.x_ii' (36 bytes) to cluster node #2 ... DONE
     Exporting 'strategy2' (72 bytes) to cluster node #2 ...
     Exporting 'strategy2' (72 bytes) to cluster node #2 ... DONE
     Exporting 'bs' (44 bytes) to cluster node #2 ...
     Exporting 'bs' (44 bytes) to cluster node #2 ... DONE
     Exporting 3 global objects (152 bytes) to cluster node #2 ... DONE
     MultisessionFuture started
     Chunk #2 of 2 ... DONE
     Launching 2 futures (chunks) ... DONE
     - resolving futures
     resolve() on list ...
     recursive: 0
     length: 2
    
     length: 1 (resolved future 1)
     length: 0 (resolved future 2)
     resolve() on list ... DONE
     - relaying conditions of futures
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE, gc = FALSE, earlySignal = FALSE,
     label = NULL, ...)
     ..- attr(*, "class")= chr [1:4] "cluster" "multiprocess" "future" "function"
     ..- attr(*, "init")= logi TRUE
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ b:function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, persistent = FALSE, workers = availableWorkers(),
     user = NULL, revtunnel = TRUE, homogeneous = TRUE, gc = FALSE, earlySignal = FALSE,
     label = NULL, ...)
     ..- attr(*, "class")= chr [1:4] "cluster" "multiprocess" "future" "function"
     ..- attr(*, "init")= logi TRUE
     ..- attr(*, "call")= language plan(list(a = strategy1, b = strategy2))
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     List of 1
     $ :function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE,
     seed = NULL, globals = TRUE, local = TRUE, earlySignal = FALSE, label = NULL,
     ...)
     ..- attr(*, "class")= chr [1:4] "sequential" "uniprocess" "future" "function"
     ..- attr(*, "call")= language future::plan("default", .cleanup = FALSE, .init = FALSE)
     - attr(*, "class")= chr [1:2] "FutureStrategyList" "list"
     - collecting values of futures
     - accumulating results
     - processing errors (handler = 'stop')
     - extracting results
     doFuture() ... DONE
     foreach() - level 1 ... DONE
     - plan(list('multisession', 'cluster')) ... DONE
     - plan(list('cluster', 'sequential')) ...
     plan(): plan_init() of 'cluster', 'multiprocess', 'future', 'function' ...
     cluster:
     - args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, persistent = FALSE, workers = availableWorkers(), user = NULL, revtunnel = TRUE, homogeneous = TRUE, gc = FALSE, earlySignal = FALSE, label = NULL, ..