Running ‘fold.R’ [7s/48s]
  Running ‘future_apply.R’ [5s/128s]
  Running ‘future_by.R’ [5s/131s]
  Running ‘future_eapply.R’ [2s/136s]
  Running ‘future_lapply,RNG.R’ [1s/134s]
  Running ‘future_lapply,globals.R’ [4s/199s]
  Running ‘future_lapply.R’ [15s/194s]
  Running ‘future_mapply,globals.R’ [4s/112s]
  Running ‘future_mapply.R’ [6s/89s]
  Running ‘future_replicate.R’ [4s/57s]
  Running ‘future_sapply.R’ [26s/98s]
  Running ‘future_tapply.R’
  Running ‘future_vapply.R’ [9s/49s]
  Running ‘globals,tricky_recursive.R’ [2s/25s]
  Running ‘rng.R’
  Running ‘stdout.R’ [3s/35s]
  Running ‘utils.R’
Running the tests in ‘tests/future_eapply.R’ failed.
Complete output:
  > source("incl/start.R")
  Loading required package: future
  plan(): Setting new future strategy stack:
  List of future strategies:
  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("sequential")
  
  plan(): nbrOfWorkers() = 1
  > 
  > message("*** future_eapply() ...")
  *** future_eapply() ...
  > 
  > message("- From example(eapply) ...")
  - From example(eapply) ...
  > 
  > for (strategy in supportedStrategies()) {
  +   message(sprintf("*** strategy = %s ...", sQuote(strategy)))
  +   plan(strategy)
  +   
  +   env <- new.env(hash = FALSE)
  +   env$a <- 1:10
  +   env$beta <- exp(-3:3)
  +   env$logic <- c(TRUE, FALSE, FALSE, TRUE)
  +   
  +   y0 <- unlist(eapply(env, mean, USE.NAMES = FALSE))
  +   y1 <- unlist(future_eapply(env, mean, USE.NAMES = FALSE))
  +   stopifnot(all.equal(y1, y0))
  +   
  +   y0 <- eapply(env, quantile, probs = 1:3/4)
  +   y1 <- future_eapply(env, quantile, probs = 1:3/4)
  +   stopifnot(all.equal(y1, y0))
  +   
  +   y0 <- eapply(env, quantile)
  +   y1 <- future_eapply(env, quantile)
  +   stopifnot(all.equal(y1, y0))
  + 
  +   plan(sequential)
  +   message(sprintf("*** strategy = %s ... done", sQuote(strategy)))
  + } ## for (strategy in ...) 
  *** strategy = 'sequential' ...
  plan(): Setting new future strategy stack:
  List of future strategies:
  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: plan(strategy)
  
  plan(): nbrOfWorkers() = 1
  future_lapply() ...
  Finding globals ...
  getGlobalsAndPackages() ...
  Searching for globals...
  - globals found: [2] 'FUN', 'UseMethod'
  Searching for globals ... DONE
  Resolving globals: FALSE
  The total size of the 1 globals is 1.21 KiB (1240 bytes)
  - globals: [1] 'FUN'
  
  getGlobalsAndPackages() ... DONE
   - globals found/used: [1] 'FUN'
  
  Finding globals ... DONE
  Getting '...' globals ...
  resolve() on list ...
   recursive: 0
   length: 1
   elements: '...'
   length: 0 (resolved future 1)
  resolve() on list ... DONE
  Getting '...' globals ... DONE
  Globals to be used in all futures:
  List of 2
   $ ...future.FUN:function (x, ...)  
   $ ...          : list()
    ..- attr(*, "class")= chr [1:2] "DotDotDotList" "list"
   - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
   - attr(*, "where")=List of 2
    ..$ ...future.FUN:<environment: 0x38088d0> 
    ..$ ...          :<environment: 0x38088d0> 
   - attr(*, "resolved")= logi FALSE
   - attr(*, "total_size")= num 1240
  Packages to be attached in all futures:
   chr(0) 
  Number of chunks: 1
  Number of futures (= number of chunks): 1
  Launching 1 futures (chunks) ...
  Chunk #1 of 1 ...
   - Finding globals in 'X' for chunk #1 ...
  getGlobalsAndPackages() ...
  Searching for globals...
  
  Searching for globals ... DONE
  - globals: [0] <none>
  getGlobalsAndPackages() ... DONE
  
  
   - Finding globals in 'X' for chunk #1 ... DONE
   - Adjusted option 'future.globals.maxSize': 5.24288e+08 -> 3 * 5.24288e+08 = 1.57286e+09 (bytes)
   - seeds: <none>
  getGlobalsAndPackages() ...
  - globals passed as-is: [5] '...future.FUN', '...', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  Resolving globals: FALSE
  Tweak future expression to call with '...' arguments ...
  Tweak future expression to call with '...' arguments ... DONE
  The total size of the 5 globals is 1.48 KiB (1512 bytes)
  - globals: [5] '...future.FUN', 'future.call.arguments', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  
  getGlobalsAndPackages() ... DONE
  Packages needed by future strategies (n = 0): <none>
  Packages needed by the future expression (n = 0): <none>
  {
      {
          ...future.oldOptions <- options(future.startup.loadScript = FALSE, 
              future.globals.onMissing = "ignore", future.globals.maxSize = 1572864000, 
              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)
                  }
              }
              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.frame <- sys.nframe()
      ...future.conditions <- list()
      ...future.result <- tryCatch({
          withCallingHandlers({
              ...future.value <- local({
                  ...future.globals.maxSize.org <- getOption("future.globals.maxSize")
                  if (!identical(...future.globals.maxSize.org, 
                    ...future.globals.maxSize)) {
                    oopts <- options(future.globals.maxSize = ...future.globals.maxSize)
                    on.exit(options(oopts), add = TRUE)
                  }
                  lapply(seq_along(...future.elements_ii), FUN = function(jj) {
                    ...future.X_jj <- ...future.elements_ii[[jj]]
                    ...future.FUN(...future.X_jj, ...)
                  })
              })
              future::FutureResult(value = ...future.value, version = "1.8")
          }, condition = local({
              inherits <- base::inherits
              invokeRestart <- base::invokeRestart
              length <- base::length
              seq.int <- base::seq.int
              sys.calls <- base::sys.calls
              `[[` <- base::`[[`
              `+` <- base::`+`
              `<<-` <- base::`<<-`
              sysCalls <- function(calls = sys.calls(), from = 1L) {
                  calls[seq.int(from = from + 12L, to = length(calls) - 
                    3L)]
              }
              function(cond) {
                  if (inherits(cond, "error")) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), 
                      cond$call), timestamp = base::Sys.time())
                    signalCondition(cond)
                  }
                  else if (inherits(cond, c("message", "warning"
                  ))) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond)
                    if (inherits(cond, "message")) {
                      invokeRestart("muffleMessage")
                    }
                    else if (inherits(cond, "warning")) {
                      invokeRestart("muffleWarning")
                    }
                  }
              }
          }))
      }, error = function(ex) {
          structure(list(value = NULL, conditions = ...future.conditions, 
              condition = ex, calls = sys.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$conditions <- ...future.conditions
      ...future.result
  }
  plan(): Setting new future strategy stack:
  List of future strategies:
  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: NULL
  
  plan(): nbrOfWorkers() = 1
  plan(): Setting new future strategy stack:
  List of future strategies:
  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: plan(strategy)
  
  plan(): nbrOfWorkers() = 1
  SequentialFuture started (and completed)
  Chunk #1 of 1 ... DONE
  Launching 1 futures (chunks) ... DONE
  Resolving 1 futures (chunks) ...
  resolve() on list ...
   recursive: 0
   length: 1
  
   length: 0 (resolved future 1)
  resolve() on list ... DONE
   - Number of value chunks collected: 1
  Resolving 1 futures (chunks) ... DONE
  Reducing values from 1 chunks ...
   - Number of values collected after concatenation: 3
   - Number of values expected: 3
  Reducing values from 1 chunks ... DONE
  future_lapply() ... DONE
  future_lapply() ...
  Finding globals ...
  getGlobalsAndPackages() ...
  Searching for globals...
  - globals found: [2] 'FUN', 'UseMethod'
  Searching for globals ... DONE
  Resolving globals: FALSE
  The total size of the 1 globals is 1.22 KiB (1248 bytes)
  - globals: [1] 'FUN'
  - packages: [1] 'stats'
  getGlobalsAndPackages() ... DONE
   - globals found/used: [1] 'FUN'
   - needed namespaces: [1] 'stats'
  Finding globals ... DONE
  Getting '...' globals ...
  resolve() on list ...
   recursive: 0
   length: 1
   elements: '...'
   length: 0 (resolved future 1)
  resolve() on list ... DONE
  Getting '...' globals ... DONE
  Globals to be used in all futures:
  List of 2
   $ ...future.FUN:function (x, ...)  
   $ ...          :List of 1
    ..$ probs: num [1:3] 0.25 0.5 0.75
    ..- attr(*, "class")= chr [1:2] "DotDotDotList" "list"
   - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
   - attr(*, "where")=List of 2
    ..$ ...future.FUN:<environment: 0x20c7100> 
    ..$ ...          :<environment: 0x20c7100> 
   - attr(*, "resolved")= logi FALSE
   - attr(*, "total_size")= num 1328
  Packages to be attached in all futures:
   chr "stats"
  Number of chunks: 1
  Number of futures (= number of chunks): 1
  Launching 1 futures (chunks) ...
  Chunk #1 of 1 ...
   - Finding globals in 'X' for chunk #1 ...
  getGlobalsAndPackages() ...
  Searching for globals...
  
  Searching for globals ... DONE
  - globals: [0] <none>
  getGlobalsAndPackages() ... DONE
  
  
   - Finding globals in 'X' for chunk #1 ... DONE
   - Adjusted option 'future.globals.maxSize': 5.24288e+08 -> 3 * 5.24288e+08 = 1.57286e+09 (bytes)
   - seeds: <none>
  getGlobalsAndPackages() ...
  - globals passed as-is: [5] '...future.FUN', '...', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  Resolving globals: FALSE
  Tweak future expression to call with '...' arguments ...
  Tweak future expression to call with '...' arguments ... DONE
  The total size of the 5 globals is 1.56 KiB (1600 bytes)
  - globals: [5] '...future.FUN', 'future.call.arguments', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  - packages: [1] 'stats'
  getGlobalsAndPackages() ... DONE
  Packages needed by future strategies (n = 0): <none>
  Packages needed by the future expression (n = 1): 'stats'
  {
      {
          ...future.oldOptions <- options(future.startup.loadScript = FALSE, 
              future.globals.onMissing = "ignore", future.globals.maxSize = 1572864000, 
              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 "stats") {
                      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.frame <- sys.nframe()
      ...future.conditions <- list()
      ...future.result <- tryCatch({
          withCallingHandlers({
              ...future.value <- local({
                  ...future.globals.maxSize.org <- getOption("future.globals.maxSize")
                  if (!identical(...future.globals.maxSize.org, 
                    ...future.globals.maxSize)) {
                    oopts <- options(future.globals.maxSize = ...future.globals.maxSize)
                    on.exit(options(oopts), add = TRUE)
                  }
                  lapply(seq_along(...future.elements_ii), FUN = function(jj) {
                    ...future.X_jj <- ...future.elements_ii[[jj]]
                    ...future.FUN(...future.X_jj, ...)
                  })
              })
              future::FutureResult(value = ...future.value, version = "1.8")
          }, condition = local({
              inherits <- base::inherits
              invokeRestart <- base::invokeRestart
              length <- base::length
              seq.int <- base::seq.int
              sys.calls <- base::sys.calls
              `[[` <- base::`[[`
              `+` <- base::`+`
              `<<-` <- base::`<<-`
              sysCalls <- function(calls = sys.calls(), from = 1L) {
                  calls[seq.int(from = from + 12L, to = length(calls) - 
                    3L)]
              }
              function(cond) {
                  if (inherits(cond, "error")) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), 
                      cond$call), timestamp = base::Sys.time())
                    signalCondition(cond)
                  }
                  else if (inherits(cond, c("message", "warning"
                  ))) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond)
                    if (inherits(cond, "message")) {
                      invokeRestart("muffleMessage")
                    }
                    else if (inherits(cond, "warning")) {
                      invokeRestart("muffleWarning")
                    }
                  }
              }
          }))
      }, error = function(ex) {
          structure(list(value = NULL, conditions = ...future.conditions, 
              condition = ex, calls = sys.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$conditions <- ...future.conditions
      ...future.result
  }
  plan(): Setting new future strategy stack:
  List of future strategies:
  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: NULL
  
  plan(): nbrOfWorkers() = 1
  plan(): Setting new future strategy stack:
  List of future strategies:
  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: plan(strategy)
  
  plan(): nbrOfWorkers() = 1
  SequentialFuture started (and completed)
  Chunk #1 of 1 ... DONE
  Launching 1 futures (chunks) ... DONE
  Resolving 1 futures (chunks) ...
  resolve() on list ...
   recursive: 0
   length: 1
  
   length: 0 (resolved future 1)
  resolve() on list ... DONE
   - Number of value chunks collected: 1
  Resolving 1 futures (chunks) ... DONE
  Reducing values from 1 chunks ...
   - Number of values collected after concatenation: 3
   - Number of values expected: 3
  Reducing values from 1 chunks ... DONE
  future_lapply() ... DONE
  future_lapply() ...
  Finding globals ...
  getGlobalsAndPackages() ...
  Searching for globals...
  - globals found: [2] 'FUN', 'UseMethod'
  Searching for globals ... DONE
  Resolving globals: FALSE
  The total size of the 1 globals is 1.22 KiB (1248 bytes)
  - globals: [1] 'FUN'
  - packages: [1] 'stats'
  getGlobalsAndPackages() ... DONE
   - globals found/used: [1] 'FUN'
   - needed namespaces: [1] 'stats'
  Finding globals ... DONE
  Getting '...' globals ...
  resolve() on list ...
   recursive: 0
   length: 1
   elements: '...'
   length: 0 (resolved future 1)
  resolve() on list ... DONE
  Getting '...' globals ... DONE
  Globals to be used in all futures:
  List of 2
   $ ...future.FUN:function (x, ...)  
   $ ...          : list()
    ..- attr(*, "class")= chr [1:2] "DotDotDotList" "list"
   - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
   - attr(*, "where")=List of 2
    ..$ ...future.FUN:<environment: 0x4156da8> 
    ..$ ...          :<environment: 0x4156da8> 
   - attr(*, "resolved")= logi FALSE
   - attr(*, "total_size")= num 1248
  Packages to be attached in all futures:
   chr "stats"
  Number of chunks: 1
  Number of futures (= number of chunks): 1
  Launching 1 futures (chunks) ...
  Chunk #1 of 1 ...
   - Finding globals in 'X' for chunk #1 ...
  getGlobalsAndPackages() ...
  Searching for globals...
  
  Searching for globals ... DONE
  - globals: [0] <none>
  getGlobalsAndPackages() ... DONE
  
  
   - Finding globals in 'X' for chunk #1 ... DONE
   - Adjusted option 'future.globals.maxSize': 5.24288e+08 -> 3 * 5.24288e+08 = 1.57286e+09 (bytes)
   - seeds: <none>
  getGlobalsAndPackages() ...
  - globals passed as-is: [5] '...future.FUN', '...', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  Resolving globals: FALSE
  Tweak future expression to call with '...' arguments ...
  Tweak future expression to call with '...' arguments ... DONE
  The total size of the 5 globals is 1.48 KiB (1520 bytes)
  - globals: [5] '...future.FUN', 'future.call.arguments', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  - packages: [1] 'stats'
  getGlobalsAndPackages() ... DONE
  Packages needed by future strategies (n = 0): <none>
  Packages needed by the future expression (n = 1): 'stats'
  {
      {
          ...future.oldOptions <- options(future.startup.loadScript = FALSE, 
              future.globals.onMissing = "ignore", future.globals.maxSize = 1572864000, 
              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 "stats") {
                      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.frame <- sys.nframe()
      ...future.conditions <- list()
      ...future.result <- tryCatch({
          withCallingHandlers({
              ...future.value <- local({
                  ...future.globals.maxSize.org <- getOption("future.globals.maxSize")
                  if (!identical(...future.globals.maxSize.org, 
                    ...future.globals.maxSize)) {
                    oopts <- options(future.globals.maxSize = ...future.globals.maxSize)
                    on.exit(options(oopts), add = TRUE)
                  }
                  lapply(seq_along(...future.elements_ii), FUN = function(jj) {
                    ...future.X_jj <- ...future.elements_ii[[jj]]
                    ...future.FUN(...future.X_jj, ...)
                  })
              })
              future::FutureResult(value = ...future.value, version = "1.8")
          }, condition = local({
              inherits <- base::inherits
              invokeRestart <- base::invokeRestart
              length <- base::length
              seq.int <- base::seq.int
              sys.calls <- base::sys.calls
              `[[` <- base::`[[`
              `+` <- base::`+`
              `<<-` <- base::`<<-`
              sysCalls <- function(calls = sys.calls(), from = 1L) {
                  calls[seq.int(from = from + 12L, to = length(calls) - 
                    3L)]
              }
              function(cond) {
                  if (inherits(cond, "error")) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), 
                      cond$call), timestamp = base::Sys.time())
                    signalCondition(cond)
                  }
                  else if (inherits(cond, c("message", "warning"
                  ))) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond)
                    if (inherits(cond, "message")) {
                      invokeRestart("muffleMessage")
                    }
                    else if (inherits(cond, "warning")) {
                      invokeRestart("muffleWarning")
                    }
                  }
              }
          }))
      }, error = function(ex) {
          structure(list(value = NULL, conditions = ...future.conditions, 
              condition = ex, calls = sys.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$conditions <- ...future.conditions
      ...future.result
  }
  plan(): Setting new future strategy stack:
  List of future strategies:
  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: NULL
  
  plan(): nbrOfWorkers() = 1
  plan(): Setting new future strategy stack:
  List of future strategies:
  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: plan(strategy)
  
  plan(): nbrOfWorkers() = 1
  SequentialFuture started (and completed)
  Chunk #1 of 1 ... DONE
  Launching 1 futures (chunks) ... DONE
  Resolving 1 futures (chunks) ...
  resolve() on list ...
   recursive: 0
   length: 1
  
   length: 0 (resolved future 1)
  resolve() on list ... DONE
   - Number of value chunks collected: 1
  Resolving 1 futures (chunks) ... DONE
  Reducing values from 1 chunks ...
   - Number of values collected after concatenation: 3
   - Number of values expected: 3
  Reducing values from 1 chunks ... DONE
  future_lapply() ... DONE
  plan(): Setting new future strategy stack:
  List of future strategies:
  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: plan(sequential)
  
  plan(): nbrOfWorkers() = 1
  *** strategy = 'sequential' ... done
  *** strategy = 'multicore' ...
  plan(): Setting new future strategy stack:
  List of future strategies:
  1. multicore:
     - args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"), earlySignal = FALSE, label = NULL, ...)
     - tweaked: FALSE
     - call: plan(strategy)
  
  plan(): nbrOfWorkers() = 2
  future_lapply() ...
  Finding globals ...
  getGlobalsAndPackages() ...
  Searching for globals...
  - globals found: [2] 'FUN', 'UseMethod'
  Searching for globals ... DONE
  Resolving globals: FALSE
  The total size of the 1 globals is 1.21 KiB (1240 bytes)
  - globals: [1] 'FUN'
  
  getGlobalsAndPackages() ... DONE
   - globals found/used: [1] 'FUN'
  
  Finding globals ... DONE
  Getting '...' globals ...
  resolve() on list ...
   recursive: 0
   length: 1
   elements: '...'
   length: 0 (resolved future 1)
  resolve() on list ... DONE
  Getting '...' globals ... DONE
  Globals to be used in all futures:
  List of 2
   $ ...future.FUN:function (x, ...)  
   $ ...          : list()
    ..- attr(*, "class")= chr [1:2] "DotDotDotList" "list"
   - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
   - attr(*, "where")=List of 2
    ..$ ...future.FUN:<environment: 0x39f7908> 
    ..$ ...          :<environment: 0x39f7908> 
   - attr(*, "resolved")= logi FALSE
   - attr(*, "total_size")= num 1240
  Packages to be attached in all futures:
   chr(0) 
  Number of chunks: 2
  Number of futures (= number of chunks): 2
  Launching 2 futures (chunks) ...
  Chunk #1 of 2 ...
   - Finding globals in 'X' for chunk #1 ...
  getGlobalsAndPackages() ...
  Searching for globals...
  
  Searching for globals ... DONE
  - globals: [0] <none>
  getGlobalsAndPackages() ... DONE
  
  
   - Finding globals in 'X' for chunk #1 ... DONE
   - seeds: <none>
  getGlobalsAndPackages() ...
  - globals passed as-is: [5] '...future.FUN', '...', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  Resolving globals: FALSE
  Tweak future expression to call with '...' arguments ...
  Tweak future expression to call with '...' arguments ... DONE
  The total size of the 5 globals is 1.27 KiB (1304 bytes)
  - globals: [5] '...future.FUN', 'future.call.arguments', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  
  getGlobalsAndPackages() ... DONE
  Packages needed by future strategies (n = 0): <none>
  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)
              }
              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.frame <- sys.nframe()
      ...future.conditions <- list()
      ...future.result <- tryCatch({
          withCallingHandlers({
              ...future.value <- local({
                  ...future.globals.maxSize.org <- getOption("future.globals.maxSize")
                  if (!identical(...future.globals.maxSize.org, 
                    ...future.globals.maxSize)) {
                    oopts <- options(future.globals.maxSize = ...future.globals.maxSize)
                    on.exit(options(oopts), add = TRUE)
                  }
                  lapply(seq_along(...future.elements_ii), FUN = function(jj) {
                    ...future.X_jj <- ...future.elements_ii[[jj]]
                    ...future.FUN(...future.X_jj, ...)
                  })
              })
              future::FutureResult(value = ...future.value, version = "1.8")
          }, condition = local({
              inherits <- base::inherits
              invokeRestart <- base::invokeRestart
              length <- base::length
              seq.int <- base::seq.int
              sys.calls <- base::sys.calls
              `[[` <- base::`[[`
              `+` <- base::`+`
              `<<-` <- base::`<<-`
              sysCalls <- function(calls = sys.calls(), from = 1L) {
                  calls[seq.int(from = from + 12L, to = length(calls) - 
                    3L)]
              }
              function(cond) {
                  if (inherits(cond, "error")) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), 
                      cond$call), timestamp = base::Sys.time())
                    signalCondition(cond)
                  }
                  else if (inherits(cond, c("message", "warning"
                  ))) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond)
                    if (inherits(cond, "message")) {
                      invokeRestart("muffleMessage")
                    }
                    else if (inherits(cond, "warning")) {
                      invokeRestart("muffleWarning")
                    }
                  }
              }
          }))
      }, error = function(ex) {
          structure(list(value = NULL, conditions = ...future.conditions, 
              condition = ex, calls = sys.calls(), version = "1.8"), 
              class = "FutureResult")
      }, finally = {
          {
              {
                  options(mc.cores = ...future.mc.cores.old)
              }
              future::plan(list(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$conditions <- ...future.conditions
      ...future.result
  }
  requestCore(): workers = 2
  MulticoreFuture started
  Chunk #1 of 2 ... DONE
  Chunk #2 of 2 ...
   - Finding globals in 'X' for chunk #2 ...
  getGlobalsAndPackages() ...
  Searching for globals...
  
  plan(): Setting new future strategy stack:
  List of future strategies:
  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: NULL
  
  plan(): nbrOfWorkers() = 1
  Searching for globals ... DONE
  - globals: [0] <none>
  getGlobalsAndPackages() ... DONE
  
  
   - Finding globals in 'X' for chunk #2 ... DONE
   - Adjusted option 'future.globals.maxSize': 5.24288e+08 -> 2 * 5.24288e+08 = 1.04858e+09 (bytes)
   - seeds: <none>
  plan(): Setting new future strategy stack:
  List of future strategies:
  1. multicore:
     - args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"), earlySignal = FALSE, label = NULL, ...)
     - tweaked: FALSE
     - call: plan(strategy)
  
  getGlobalsAndPackages() ...
  - globals passed as-is: [5] '...future.FUN', '...', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  Resolving globals: FALSE
  Tweak future expression to call with '...' arguments ...
  Tweak future expression to call with '...' arguments ... DONE
  plan(): nbrOfWorkers() = 2
  The total size of the 5 globals is 1.41 KiB (1448 bytes)
  - globals: [5] '...future.FUN', 'future.call.arguments', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  
  getGlobalsAndPackages() ... DONE
  Packages needed by future strategies (n = 0): <none>
  Packages needed by the future expression (n = 0): <none>
  {
      {
          ...future.oldOptions <- options(future.startup.loadScript = FALSE, 
              future.globals.onMissing = "ignore", future.globals.maxSize = 1048576000, 
              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)
              }
              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.frame <- sys.nframe()
      ...future.conditions <- list()
      ...future.result <- tryCatch({
          withCallingHandlers({
              ...future.value <- local({
                  ...future.globals.maxSize.org <- getOption("future.globals.maxSize")
                  if (!identical(...future.globals.maxSize.org, 
                    ...future.globals.maxSize)) {
                    oopts <- options(future.globals.maxSize = ...future.globals.maxSize)
                    on.exit(options(oopts), add = TRUE)
                  }
                  lapply(seq_along(...future.elements_ii), FUN = function(jj) {
                    ...future.X_jj <- ...future.elements_ii[[jj]]
                    ...future.FUN(...future.X_jj, ...)
                  })
              })
              future::FutureResult(value = ...future.value, version = "1.8")
          }, condition = local({
              inherits <- base::inherits
              invokeRestart <- base::invokeRestart
              length <- base::length
              seq.int <- base::seq.int
              sys.calls <- base::sys.calls
              `[[` <- base::`[[`
              `+` <- base::`+`
              `<<-` <- base::`<<-`
              sysCalls <- function(calls = sys.calls(), from = 1L) {
                  calls[seq.int(from = from + 12L, to = length(calls) - 
                    3L)]
              }
              function(cond) {
                  if (inherits(cond, "error")) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), 
                      cond$call), timestamp = base::Sys.time())
                    signalCondition(cond)
                  }
                  else if (inherits(cond, c("message", "warning"
                  ))) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond)
                    if (inherits(cond, "message")) {
                      invokeRestart("muffleMessage")
                    }
                    else if (inherits(cond, "warning")) {
                      invokeRestart("muffleWarning")
                    }
                  }
              }
          }))
      }, error = function(ex) {
          structure(list(value = NULL, conditions = ...future.conditions, 
              condition = ex, calls = sys.calls(), version = "1.8"), 
              class = "FutureResult")
      }, finally = {
          {
              {
                  options(mc.cores = ...future.mc.cores.old)
              }
              future::plan(list(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$conditions <- ...future.conditions
      ...future.result
  }
  requestCore(): workers = 2
  MulticoreFuture started
  Chunk #2 of 2 ... DONE
  Launching 2 futures (chunks) ... DONE
  Resolving 2 futures (chunks) ...
  resolve() on list ...
   recursive: 0
   length: 2
  
  plan(): Setting new future strategy stack:
  List of future strategies:
  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: NULL
  
   length: 1 (resolved future 1)
  plan(): nbrOfWorkers() = 1
  plan(): Setting new future strategy stack:
  List of future strategies:
  1. multicore:
     - args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"), earlySignal = FALSE, label = NULL, ...)
     - tweaked: FALSE
     - call: plan(strategy)
  
  plan(): nbrOfWorkers() = 2
   length: 0 (resolved future 2)
  resolve() on list ... DONE
   - Number of value chunks collected: 2
  Resolving 2 futures (chunks) ... DONE
  Reducing values from 2 chunks ...
   - Number of values collected after concatenation: 3
   - Number of values expected: 3
  Reducing values from 2 chunks ... DONE
  future_lapply() ... DONE
  future_lapply() ...
  Finding globals ...
  getGlobalsAndPackages() ...
  Searching for globals...
  - globals found: [2] 'FUN', 'UseMethod'
  Searching for globals ... DONE
  Resolving globals: FALSE
  The total size of the 1 globals is 1.22 KiB (1248 bytes)
  - globals: [1] 'FUN'
  - packages: [1] 'stats'
  getGlobalsAndPackages() ... DONE
   - globals found/used: [1] 'FUN'
   - needed namespaces: [1] 'stats'
  Finding globals ... DONE
  Getting '...' globals ...
  resolve() on list ...
   recursive: 0
   length: 1
   elements: '...'
   length: 0 (resolved future 1)
  resolve() on list ... DONE
  Getting '...' globals ... DONE
  Globals to be used in all futures:
  List of 2
   $ ...future.FUN:function (x, ...)  
   $ ...          :List of 1
    ..$ probs: num [1:3] 0.25 0.5 0.75
    ..- attr(*, "class")= chr [1:2] "DotDotDotList" "list"
   - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
   - attr(*, "where")=List of 2
    ..$ ...future.FUN:<environment: 0x39df1c0> 
    ..$ ...          :<environment: 0x39df1c0> 
   - attr(*, "resolved")= logi FALSE
   - attr(*, "total_size")= num 1328
  Packages to be attached in all futures:
   chr "stats"
  Number of chunks: 2
  Number of futures (= number of chunks): 2
  Launching 2 futures (chunks) ...
  Chunk #1 of 2 ...
   - Finding globals in 'X' for chunk #1 ...
  getGlobalsAndPackages() ...
  Searching for globals...
  
  Searching for globals ... DONE
  - globals: [0] <none>
  getGlobalsAndPackages() ... DONE
  
  
   - Finding globals in 'X' for chunk #1 ... DONE
   - seeds: <none>
  getGlobalsAndPackages() ...
  - globals passed as-is: [5] '...future.FUN', '...', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  Resolving globals: FALSE
  Tweak future expression to call with '...' arguments ...
  Tweak future expression to call with '...' arguments ... DONE
  The total size of the 5 globals is 1.36 KiB (1392 bytes)
  - globals: [5] '...future.FUN', 'future.call.arguments', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  - packages: [1] 'stats'
  getGlobalsAndPackages() ... DONE
  Packages needed by future strategies (n = 0): <none>
  Packages needed by the future expression (n = 1): 'stats'
  {
      {
          ...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 "stats") {
                      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.frame <- sys.nframe()
      ...future.conditions <- list()
      ...future.result <- tryCatch({
          withCallingHandlers({
              ...future.value <- local({
                  ...future.globals.maxSize.org <- getOption("future.globals.maxSize")
                  if (!identical(...future.globals.maxSize.org, 
                    ...future.globals.maxSize)) {
                    oopts <- options(future.globals.maxSize = ...future.globals.maxSize)
                    on.exit(options(oopts), add = TRUE)
                  }
                  lapply(seq_along(...future.elements_ii), FUN = function(jj) {
                    ...future.X_jj <- ...future.elements_ii[[jj]]
                    ...future.FUN(...future.X_jj, ...)
                  })
              })
              future::FutureResult(value = ...future.value, version = "1.8")
          }, condition = local({
              inherits <- base::inherits
              invokeRestart <- base::invokeRestart
              length <- base::length
              seq.int <- base::seq.int
              sys.calls <- base::sys.calls
              `[[` <- base::`[[`
              `+` <- base::`+`
              `<<-` <- base::`<<-`
              sysCalls <- function(calls = sys.calls(), from = 1L) {
                  calls[seq.int(from = from + 12L, to = length(calls) - 
                    3L)]
              }
              function(cond) {
                  if (inherits(cond, "error")) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), 
                      cond$call), timestamp = base::Sys.time())
                    signalCondition(cond)
                  }
                  else if (inherits(cond, c("message", "warning"
                  ))) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond)
                    if (inherits(cond, "message")) {
                      invokeRestart("muffleMessage")
                    }
                    else if (inherits(cond, "warning")) {
                      invokeRestart("muffleWarning")
                    }
                  }
              }
          }))
      }, error = function(ex) {
          structure(list(value = NULL, conditions = ...future.conditions, 
              condition = ex, calls = sys.calls(), version = "1.8"), 
              class = "FutureResult")
      }, finally = {
          {
              {
                  options(mc.cores = ...future.mc.cores.old)
              }
              future::plan(list(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$conditions <- ...future.conditions
      ...future.result
  }
  requestCore(): workers = 2
  MulticoreFuture started
  Chunk #1 of 2 ... DONE
  Chunk #2 of 2 ...
   - Finding globals in 'X' for chunk #2 ...
  getGlobalsAndPackages() ...
  Searching for globals...
  
  Searching for globals ... DONE
  - globals: [0] <none>
  getGlobalsAndPackages() ... DONE
  
  
   - Finding globals in 'X' for chunk #2 ... DONE
   - Adjusted option 'future.globals.maxSize': 5.24288e+08 -> 2 * 5.24288e+08 = 1.04858e+09 (bytes)
   - seeds: <none>
  getGlobalsAndPackages() ...
  plan(): Setting new future strategy stack:
  List of future strategies:
  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: NULL
  
  plan(): nbrOfWorkers() = 1
  - globals passed as-is: [5] '...future.FUN', '...', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  Resolving globals: FALSE
  Tweak future expression to call with '...' arguments ...
  Tweak future expression to call with '...' arguments ... DONE
  plan(): Setting new future strategy stack:
  List of future strategies:
  1. multicore:
     - args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"), earlySignal = FALSE, label = NULL, ...)
     - tweaked: FALSE
     - call: plan(strategy)
  
  The total size of the 5 globals is 1.50 KiB (1536 bytes)
  - globals: [5] '...future.FUN', 'future.call.arguments', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  - packages: [1] 'stats'
  getGlobalsAndPackages() ... DONE
  plan(): nbrOfWorkers() = 2
  Packages needed by future strategies (n = 0): <none>
  Packages needed by the future expression (n = 1): 'stats'
  {
      {
          ...future.oldOptions <- options(future.startup.loadScript = FALSE, 
              future.globals.onMissing = "ignore", future.globals.maxSize = 1048576000, 
              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 "stats") {
                      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.frame <- sys.nframe()
      ...future.conditions <- list()
      ...future.result <- tryCatch({
          withCallingHandlers({
              ...future.value <- local({
                  ...future.globals.maxSize.org <- getOption("future.globals.maxSize")
                  if (!identical(...future.globals.maxSize.org, 
                    ...future.globals.maxSize)) {
                    oopts <- options(future.globals.maxSize = ...future.globals.maxSize)
                    on.exit(options(oopts), add = TRUE)
                  }
                  lapply(seq_along(...future.elements_ii), FUN = function(jj) {
                    ...future.X_jj <- ...future.elements_ii[[jj]]
                    ...future.FUN(...future.X_jj, ...)
                  })
              })
              future::FutureResult(value = ...future.value, version = "1.8")
          }, condition = local({
              inherits <- base::inherits
              invokeRestart <- base::invokeRestart
              length <- base::length
              seq.int <- base::seq.int
              sys.calls <- base::sys.calls
              `[[` <- base::`[[`
              `+` <- base::`+`
              `<<-` <- base::`<<-`
              sysCalls <- function(calls = sys.calls(), from = 1L) {
                  calls[seq.int(from = from + 12L, to = length(calls) - 
                    3L)]
              }
              function(cond) {
                  if (inherits(cond, "error")) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), 
                      cond$call), timestamp = base::Sys.time())
                    signalCondition(cond)
                  }
                  else if (inherits(cond, c("message", "warning"
                  ))) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond)
                    if (inherits(cond, "message")) {
                      invokeRestart("muffleMessage")
                    }
                    else if (inherits(cond, "warning")) {
                      invokeRestart("muffleWarning")
                    }
                  }
              }
          }))
      }, error = function(ex) {
          structure(list(value = NULL, conditions = ...future.conditions, 
              condition = ex, calls = sys.calls(), version = "1.8"), 
              class = "FutureResult")
      }, finally = {
          {
              {
                  options(mc.cores = ...future.mc.cores.old)
              }
              future::plan(list(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$conditions <- ...future.conditions
      ...future.result
  }
  requestCore(): workers = 2
  MulticoreFuture started
  Chunk #2 of 2 ... DONE
  Launching 2 futures (chunks) ... DONE
  Resolving 2 futures (chunks) ...
  resolve() on list ...
   recursive: 0
   length: 2
  
   length: 1 (resolved future 1)
  plan(): Setting new future strategy stack:
  List of future strategies:
  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: NULL
  
  plan(): nbrOfWorkers() = 1
  plan(): Setting new future strategy stack:
  List of future strategies:
  1. multicore:
     - args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"), earlySignal = FALSE, label = NULL, ...)
     - tweaked: FALSE
     - call: plan(strategy)
  
  plan(): nbrOfWorkers() = 2
   length: 0 (resolved future 2)
  resolve() on list ... DONE
   - Number of value chunks collected: 2
  Resolving 2 futures (chunks) ... DONE
  Reducing values from 2 chunks ...
   - Number of values collected after concatenation: 3
   - Number of values expected: 3
  Reducing values from 2 chunks ... DONE
  future_lapply() ... DONE
  future_lapply() ...
  Finding globals ...
  getGlobalsAndPackages() ...
  Searching for globals...
  - globals found: [2] 'FUN', 'UseMethod'
  Searching for globals ... DONE
  Resolving globals: FALSE
  The total size of the 1 globals is 1.22 KiB (1248 bytes)
  - globals: [1] 'FUN'
  - packages: [1] 'stats'
  getGlobalsAndPackages() ... DONE
   - globals found/used: [1] 'FUN'
   - needed namespaces: [1] 'stats'
  Finding globals ... DONE
  Getting '...' globals ...
  resolve() on list ...
   recursive: 0
   length: 1
   elements: '...'
   length: 0 (resolved future 1)
  resolve() on list ... DONE
  Getting '...' globals ... DONE
  Globals to be used in all futures:
  List of 2
   $ ...future.FUN:function (x, ...)  
   $ ...          : list()
    ..- attr(*, "class")= chr [1:2] "DotDotDotList" "list"
   - attr(*, "class")= chr [1:3] "FutureGlobals" "Globals" "list"
   - attr(*, "where")=List of 2
    ..$ ...future.FUN:<environment: 0x3775268> 
    ..$ ...          :<environment: 0x3775268> 
   - attr(*, "resolved")= logi FALSE
   - attr(*, "total_size")= num 1248
  Packages to be attached in all futures:
   chr "stats"
  Number of chunks: 2
  Number of futures (= number of chunks): 2
  Launching 2 futures (chunks) ...
  Chunk #1 of 2 ...
   - Finding globals in 'X' for chunk #1 ...
  getGlobalsAndPackages() ...
  Searching for globals...
  
  Searching for globals ... DONE
  - globals: [0] <none>
  getGlobalsAndPackages() ... DONE
  
  
   - Finding globals in 'X' for chunk #1 ... DONE
   - seeds: <none>
  getGlobalsAndPackages() ...
  - globals passed as-is: [5] '...future.FUN', '...', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  Resolving globals: FALSE
  Tweak future expression to call with '...' arguments ...
  Tweak future expression to call with '...' arguments ... DONE
  The total size of the 5 globals is 1.28 KiB (1312 bytes)
  - globals: [5] '...future.FUN', 'future.call.arguments', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  - packages: [1] 'stats'
  getGlobalsAndPackages() ... DONE
  Packages needed by future strategies (n = 0): <none>
  Packages needed by the future expression (n = 1): 'stats'
  {
      {
          ...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 "stats") {
                      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.frame <- sys.nframe()
      ...future.conditions <- list()
      ...future.result <- tryCatch({
          withCallingHandlers({
              ...future.value <- local({
                  ...future.globals.maxSize.org <- getOption("future.globals.maxSize")
                  if (!identical(...future.globals.maxSize.org, 
                    ...future.globals.maxSize)) {
                    oopts <- options(future.globals.maxSize = ...future.globals.maxSize)
                    on.exit(options(oopts), add = TRUE)
                  }
                  lapply(seq_along(...future.elements_ii), FUN = function(jj) {
                    ...future.X_jj <- ...future.elements_ii[[jj]]
                    ...future.FUN(...future.X_jj, ...)
                  })
              })
              future::FutureResult(value = ...future.value, version = "1.8")
          }, condition = local({
              inherits <- base::inherits
              invokeRestart <- base::invokeRestart
              length <- base::length
              seq.int <- base::seq.int
              sys.calls <- base::sys.calls
              `[[` <- base::`[[`
              `+` <- base::`+`
              `<<-` <- base::`<<-`
              sysCalls <- function(calls = sys.calls(), from = 1L) {
                  calls[seq.int(from = from + 12L, to = length(calls) - 
                    3L)]
              }
              function(cond) {
                  if (inherits(cond, "error")) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), 
                      cond$call), timestamp = base::Sys.time())
                    signalCondition(cond)
                  }
                  else if (inherits(cond, c("message", "warning"
                  ))) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond)
                    if (inherits(cond, "message")) {
                      invokeRestart("muffleMessage")
                    }
                    else if (inherits(cond, "warning")) {
                      invokeRestart("muffleWarning")
                    }
                  }
              }
          }))
      }, error = function(ex) {
          structure(list(value = NULL, conditions = ...future.conditions, 
              condition = ex, calls = sys.calls(), version = "1.8"), 
              class = "FutureResult")
      }, finally = {
          {
              {
                  options(mc.cores = ...future.mc.cores.old)
              }
              future::plan(list(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$conditions <- ...future.conditions
      ...future.result
  }
  requestCore(): workers = 2
  MulticoreFuture started
  Chunk #1 of 2 ... DONE
  Chunk #2 of 2 ...
   - Finding globals in 'X' for chunk #2 ...
  getGlobalsAndPackages() ...
  Searching for globals...
  
  plan(): Setting new future strategy stack:
  List of future strategies:
  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: NULL
  
  plan(): nbrOfWorkers() = 1
  Searching for globals ... DONE
  - globals: [0] <none>
  getGlobalsAndPackages() ... DONE
  
  
   - Finding globals in 'X' for chunk #2 ... DONE
   - Adjusted option 'future.globals.maxSize': 5.24288e+08 -> 2 * 5.24288e+08 = 1.04858e+09 (bytes)
   - seeds: <none>
  plan(): Setting new future strategy stack:
  List of future strategies:
  1. multicore:
     - args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"), earlySignal = FALSE, label = NULL, ...)
     - tweaked: FALSE
     - call: plan(strategy)
  
  plan(): nbrOfWorkers() = 2
  getGlobalsAndPackages() ...
  - globals passed as-is: [5] '...future.FUN', '...', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  Resolving globals: FALSE
  Tweak future expression to call with '...' arguments ...
  Tweak future expression to call with '...' arguments ... DONE
  The total size of the 5 globals is 1.42 KiB (1456 bytes)
  - globals: [5] '...future.FUN', 'future.call.arguments', '...future.elements_ii', '...future.seeds_ii', '...future.globals.maxSize'
  - packages: [1] 'stats'
  getGlobalsAndPackages() ... DONE
  Packages needed by future strategies (n = 0): <none>
  Packages needed by the future expression (n = 1): 'stats'
  {
      {
          ...future.oldOptions <- options(future.startup.loadScript = FALSE, 
              future.globals.onMissing = "ignore", future.globals.maxSize = 1048576000, 
              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 "stats") {
                      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.frame <- sys.nframe()
      ...future.conditions <- list()
      ...future.result <- tryCatch({
          withCallingHandlers({
              ...future.value <- local({
                  ...future.globals.maxSize.org <- getOption("future.globals.maxSize")
                  if (!identical(...future.globals.maxSize.org, 
                    ...future.globals.maxSize)) {
                    oopts <- options(future.globals.maxSize = ...future.globals.maxSize)
                    on.exit(options(oopts), add = TRUE)
                  }
                  lapply(seq_along(...future.elements_ii), FUN = function(jj) {
                    ...future.X_jj <- ...future.elements_ii[[jj]]
                    ...future.FUN(...future.X_jj, ...)
                  })
              })
              future::FutureResult(value = ...future.value, version = "1.8")
          }, condition = local({
              inherits <- base::inherits
              invokeRestart <- base::invokeRestart
              length <- base::length
              seq.int <- base::seq.int
              sys.calls <- base::sys.calls
              `[[` <- base::`[[`
              `+` <- base::`+`
              `<<-` <- base::`<<-`
              sysCalls <- function(calls = sys.calls(), from = 1L) {
                  calls[seq.int(from = from + 12L, to = length(calls) - 
                    3L)]
              }
              function(cond) {
                  if (inherits(cond, "error")) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), 
                      cond$call), timestamp = base::Sys.time())
                    signalCondition(cond)
                  }
                  else if (inherits(cond, c("message", "warning"
                  ))) {
                    ...future.conditions[[length(...future.conditions) + 
                      1L]] <<- list(condition = cond)
                    if (inherits(cond, "message")) {
                      invokeRestart("muffleMessage")
                    }
                    else if (inherits(cond, "warning")) {
                      invokeRestart("muffleWarning")
                    }
                  }
              }
          }))
      }, error = function(ex) {
          structure(list(value = NULL, conditions = ...future.conditions, 
              condition = ex, calls = sys.calls(), version = "1.8"), 
              class = "FutureResult")
      }, finally = {
          {
              {
                  options(mc.cores = ...future.mc.cores.old)
              }
              future::plan(list(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$conditions <- ...future.conditions
      ...future.result
  }
  requestCore(): workers = 2
  MulticoreFuture started
  Chunk #2 of 2 ... DONE
  Launching 2 futures (chunks) ... DONE
  Resolving 2 futures (chunks) ...
  resolve() on list ...
   recursive: 0
   length: 2
  
   length: 1 (resolved future 1)
  plan(): Setting new future strategy stack:
  List of future strategies:
  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: NULL
  
  plan(): nbrOfWorkers() = 1
  plan(): Setting new future strategy stack:
  List of future strategies:
  1. multicore:
     - args: function (expr, envir = parent.frame(), substitute = TRUE, lazy = FALSE, seed = NULL, globals = TRUE, workers = availableCores(constraints = "multicore"), earlySignal = FALSE, label = NULL, ...)
     - tweaked: FALSE
     - call: plan(strategy)
  
  plan(): nbrOfWorkers() = 2
   length: 0 (resolved future 2)
  resolve() on list ... DONE
   - Number of value chunks collected: 2
  Resolving 2 futures (chunks) ... DONE
  Reducing values from 2 chunks ...
   - Number of values collected after concatenation: 3
   - Number of values expected: 3
  Reducing values from 2 chunks ... DONE
  future_lapply() ... DONE
  plan(): Setting new future strategy stack:
  List of future strategies:
  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: plan(sequential)
  
  plan(): nbrOfWorkers() = 1
  *** strategy = 'multicore' ... done
  *** strategy = 'multisession' ...
  plan(): Setting new future strategy stack:
  List of future strategies:
  1. 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(strategy)
  
  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(strategy)
  [local output] Workers: [n = 2] 'localhost', 'localhost'
  [local output] Base port: 11917
  [local output] Creating node 1 of 2 ...
  [local output] - setting up node
  [local output] Starting worker #1 on 'localhost': '/data/gannet/ripley/R/R-devel/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e '#label=future_eapply.R:46070:gannet.stats.ox.ac.uk:ripley' -e 'try(cat(Sys.getpid(),file="/tmp/RtmppZlFBy/future.parent=46070.b3f636065ca.pid"))' -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11917 OUT=/dev/null TIMEOUT=120 XDR=TRUE
  [local output] - Exit code of system() call: 0
  [local output] Waiting for worker #1 on 'localhost' to connect back
  [local output] Connection with worker #1 on 'localhost' established
  [local output] - collecting session information
  Error in unserialize(node$con) : error reading from connection
  Calls: plan ... FUN -> recvData -> recvData.SOCKnode -> unserialize
  Execution halted
Running the tests in ‘tests/future_lapply,RNG.R’ failed.
Complete output:
  > source("incl/start.R")
  Loading required package: future
  plan(): Setting new future strategy stack:
  List of future strategies:
  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("sequential")
  
  plan(): nbrOfWorkers() = 1
  > 
  > message("*** future_lapply() and RNGs ...")
  *** future_lapply() and RNGs ...
  > 
  > options(future.debug = FALSE)
  > 
  > message("* future_lapply(x, ..., future.seed = <invalid>) ...")
  * future_lapply(x, ..., future.seed = <invalid>) ...
  > 
  > res <- tryCatch({
  +   y <- future_lapply(1:3, FUN = identity, future.seed = as.list(1:2))
  + }, error = identity)
  > print(res)
  <simpleError in make_rng_seeds(nX, seed = future.seed, debug = debug): Argument 'seed' is a list, which specifies the sequence of seeds to be used for each element iterated over, but length(seed) != number of elements: 2 != 3>
  > stopifnot(inherits(res, "simpleError"))
  > 
  > res <- tryCatch({
  +   y <- future_lapply(1:3, FUN = identity, future.seed = list(1, 2, 3:4))
  + }, error = identity)
  > print(res)
  <simpleError in make_rng_seeds(nX, seed = future.seed, debug = debug): The elements of the list specified in argument 'seed' are not all of the same lengths (did you really pass RNG seeds?): 1, 2>
  > stopifnot(inherits(res, "simpleError"))
  > 
  > res <- tryCatch({
  +   y <- future_lapply(1:3, FUN = identity, future.seed = as.list(1:3))
  + }, error = identity)
  > print(res)
  <simpleError in make_rng_seeds(nX, seed = future.seed, debug = debug): Argument 'seed' is invalid. Pre-generated random seeds must be valid .Random.seed seeds, which means they should be all integers and consists of two or more elements, not just one.>
  > stopifnot(inherits(res, "simpleError"))
  > 
  > seeds <- lapply(1:3, FUN = as_lecyer_cmrg_seed)
  > res <- tryCatch({
  +   y <- future_lapply(1:3, FUN = identity, future.seed = lapply(seeds, FUN = as.numeric))
  + }, error = identity)
  > print(res)
  <simpleError in make_rng_seeds(nX, seed = future.seed, debug = debug): The elements of the list specified in argument 'seed' are not all integers (did you really pass RNG seeds?): double>
  > stopifnot(inherits(res, "simpleError"))
  > 
  > seeds[[1]][1] <- seeds[[1]][1] + 1L
  > res <- tryCatch({
  +   y <- future_lapply(1:3, FUN = identity, future.seed = seeds)
  + }, error = identity)
  > print(res)
  <simpleError in make_rng_seeds(nX, seed = future.seed, debug = debug): The list in argument 'seed' does not seem to hold elements that are valid .Random.seed values:  int [1:7] 10408 1280795612 -169270483 -442010614 -603558397 -222347416 1489374793>
  > stopifnot(inherits(res, "simpleError"))
  > 
  > message("* future_lapply(x, ..., future.seed = <invalid>) ... DONE")
  * future_lapply(x, ..., future.seed = <invalid>) ... DONE
  > 
  > 
  > ## Iterate of the same set in all tests
  > x <- 1:5
  > 
  > message("* future_lapply(x, ..., future.seed = FALSE) ...")
  * future_lapply(x, ..., future.seed = FALSE) ...
  > 
  > y0 <- y0_nested <- seed00 <- NULL
  > for (cores in 1:availCores) {
  +   message(sprintf("  - Testing with %d cores ...", cores))
  +   options(mc.cores = cores)
  +   
  +   for (strategy in supportedStrategies(cores)) {
  +     message(sprintf("* plan('%s') ...", strategy))
  +     plan(strategy)
  +   
  +     set.seed(0xBEEF)
  +     seed0 <- get_random_seed()
  +     y <- future_lapply(x, FUN = function(i) i, future.seed = FALSE)
  +     y <- unlist(y)
  +     seed <- get_random_seed()
  +     if (is.null(y0)) {
  +       y0 <- y
  +       seed00 <- seed
  +     }
  +     str(list(y = y))
  +     stopifnot(identical(seed, seed0), identical(seed, seed00))
  +     ## NOTE: We cannot guarantee the same random numbers, because
  +     ## future.seed = FALSE.
  +     
  +     message(sprintf("* plan('%s') ... DONE", strategy))
  +   }  ## for (strategy ...)
  +   message(sprintf("  - Testing with %d cores ... DONE", cores))
  + } ## for (core ...)
    - Testing with 1 cores ...
  * plan('sequential') ...
  List of 1
   $ y: int [1:5] 1 2 3 4 5
  * plan('sequential') ... DONE
  * plan('multicore') ...
  List of 1
   $ y: int [1:5] 1 2 3 4 5
  * plan('multicore') ... DONE
  * plan('multisession') ...
  List of 1
   $ y: int [1:5] 1 2 3 4 5
  * plan('multisession') ... DONE
    - Testing with 1 cores ... DONE
    - Testing with 2 cores ...
  * plan('multicore') ...
  List of 1
   $ y: int [1:5] 1 2 3 4 5
  * plan('multicore') ... DONE
  * plan('multisession') ...
  Error in unserialize(node$con) : error reading from connection
  Calls: plan ... FUN -> recvData -> recvData.SOCKnode -> unserialize
  Execution halted