R Under development (unstable) (2024-05-14 r86553 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > source("incl/start.R") Loading required package: future [10:56:18.237] plan(): Setting new future strategy stack: [10:56:18.238] List of future strategies: [10:56:18.238] 1. mirai_multisession: [10:56:18.238] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [10:56:18.238] - tweaked: FALSE [10:56:18.238] - call: future::plan(future.mirai::mirai_multisession) [10:56:18.251] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [10:56:18.251] < mirai | $data > [10:56:18.256] getGlobalsAndPackages() ... [10:56:18.256] Not searching for globals [10:56:18.256] - globals: [0] [10:56:18.256] getGlobalsAndPackages() ... DONE [10:56:18.257] getGlobalsAndPackages() ... [10:56:18.257] [10:56:18.257] - globals: [0] [10:56:18.257] getGlobalsAndPackages() ... DONE [10:56:18.628] Packages needed by the future expression (n = 0): [10:56:18.628] Packages needed by future strategies (n = 0): [10:56:18.629] { [10:56:18.629] { [10:56:18.629] { [10:56:18.629] ...future.startTime <- base::Sys.time() [10:56:18.629] { [10:56:18.629] { [10:56:18.629] { [10:56:18.629] base::local({ [10:56:18.629] has_future <- base::requireNamespace("future", [10:56:18.629] quietly = TRUE) [10:56:18.629] if (has_future) { [10:56:18.629] ns <- base::getNamespace("future") [10:56:18.629] version <- ns[[".package"]][["version"]] [10:56:18.629] if (is.null(version)) [10:56:18.629] version <- utils::packageVersion("future") [10:56:18.629] } [10:56:18.629] else { [10:56:18.629] version <- NULL [10:56:18.629] } [10:56:18.629] if (!has_future || version < "1.8.0") { [10:56:18.629] info <- base::c(r_version = base::gsub("R version ", [10:56:18.629] "", base::R.version$version.string), [10:56:18.629] platform = base::sprintf("%s (%s-bit)", [10:56:18.629] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:18.629] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:18.629] "release", "version")], collapse = " "), [10:56:18.629] hostname = base::Sys.info()[["nodename"]]) [10:56:18.629] info <- base::sprintf("%s: %s", base::names(info), [10:56:18.629] info) [10:56:18.629] info <- base::paste(info, collapse = "; ") [10:56:18.629] if (!has_future) { [10:56:18.629] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:18.629] info) [10:56:18.629] } [10:56:18.629] else { [10:56:18.629] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:18.629] info, version) [10:56:18.629] } [10:56:18.629] base::stop(msg) [10:56:18.629] } [10:56:18.629] }) [10:56:18.629] } [10:56:18.629] ...future.strategy.old <- future::plan("list") [10:56:18.629] options(future.plan = NULL) [10:56:18.629] Sys.unsetenv("R_FUTURE_PLAN") [10:56:18.629] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:18.629] } [10:56:18.629] ...future.workdir <- getwd() [10:56:18.629] } [10:56:18.629] ...future.oldOptions <- base::as.list(base::.Options) [10:56:18.629] ...future.oldEnvVars <- base::Sys.getenv() [10:56:18.629] } [10:56:18.629] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:18.629] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:18.629] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:18.629] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:18.629] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:18.629] future.stdout.windows.reencode = NULL, width = 80L) [10:56:18.629] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:18.629] base::names(...future.oldOptions)) [10:56:18.629] } [10:56:18.629] if (FALSE) { [10:56:18.629] } [10:56:18.629] else { [10:56:18.629] if (TRUE) { [10:56:18.629] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:18.629] open = "w") [10:56:18.629] } [10:56:18.629] else { [10:56:18.629] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:18.629] windows = "NUL", "/dev/null"), open = "w") [10:56:18.629] } [10:56:18.629] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:18.629] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:18.629] base::sink(type = "output", split = FALSE) [10:56:18.629] base::close(...future.stdout) [10:56:18.629] }, add = TRUE) [10:56:18.629] } [10:56:18.629] ...future.frame <- base::sys.nframe() [10:56:18.629] ...future.conditions <- base::list() [10:56:18.629] ...future.rng <- base::globalenv()$.Random.seed [10:56:18.629] if (FALSE) { [10:56:18.629] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:18.629] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:18.629] } [10:56:18.629] ...future.result <- base::tryCatch({ [10:56:18.629] base::withCallingHandlers({ [10:56:18.629] ...future.value <- base::withVisible(base::local(NA)) [10:56:18.629] future::FutureResult(value = ...future.value$value, [10:56:18.629] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:18.629] ...future.rng), globalenv = if (FALSE) [10:56:18.629] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:18.629] ...future.globalenv.names)) [10:56:18.629] else NULL, started = ...future.startTime, version = "1.8") [10:56:18.629] }, condition = base::local({ [10:56:18.629] c <- base::c [10:56:18.629] inherits <- base::inherits [10:56:18.629] invokeRestart <- base::invokeRestart [10:56:18.629] length <- base::length [10:56:18.629] list <- base::list [10:56:18.629] seq.int <- base::seq.int [10:56:18.629] signalCondition <- base::signalCondition [10:56:18.629] sys.calls <- base::sys.calls [10:56:18.629] `[[` <- base::`[[` [10:56:18.629] `+` <- base::`+` [10:56:18.629] `<<-` <- base::`<<-` [10:56:18.629] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:18.629] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:18.629] 3L)] [10:56:18.629] } [10:56:18.629] function(cond) { [10:56:18.629] is_error <- inherits(cond, "error") [10:56:18.629] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:18.629] NULL) [10:56:18.629] if (is_error) { [10:56:18.629] sessionInformation <- function() { [10:56:18.629] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:18.629] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:18.629] search = base::search(), system = base::Sys.info()) [10:56:18.629] } [10:56:18.629] ...future.conditions[[length(...future.conditions) + [10:56:18.629] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:18.629] cond$call), session = sessionInformation(), [10:56:18.629] timestamp = base::Sys.time(), signaled = 0L) [10:56:18.629] signalCondition(cond) [10:56:18.629] } [10:56:18.629] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:18.629] signal <- FALSE && inherits(cond, character(0)) [10:56:18.629] ...future.conditions[[length(...future.conditions) + [10:56:18.629] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:18.629] if (FALSE && !signal) { [10:56:18.629] muffleCondition <- function (cond, pattern = "^muffle") [10:56:18.629] { [10:56:18.629] inherits <- base::inherits [10:56:18.629] invokeRestart <- base::invokeRestart [10:56:18.629] is.null <- base::is.null [10:56:18.629] muffled <- FALSE [10:56:18.629] if (inherits(cond, "message")) { [10:56:18.629] muffled <- grepl(pattern, "muffleMessage") [10:56:18.629] if (muffled) [10:56:18.629] invokeRestart("muffleMessage") [10:56:18.629] } [10:56:18.629] else if (inherits(cond, "warning")) { [10:56:18.629] muffled <- grepl(pattern, "muffleWarning") [10:56:18.629] if (muffled) [10:56:18.629] invokeRestart("muffleWarning") [10:56:18.629] } [10:56:18.629] else if (inherits(cond, "condition")) { [10:56:18.629] if (!is.null(pattern)) { [10:56:18.629] computeRestarts <- base::computeRestarts [10:56:18.629] grepl <- base::grepl [10:56:18.629] restarts <- computeRestarts(cond) [10:56:18.629] for (restart in restarts) { [10:56:18.629] name <- restart$name [10:56:18.629] if (is.null(name)) [10:56:18.629] next [10:56:18.629] if (!grepl(pattern, name)) [10:56:18.629] next [10:56:18.629] invokeRestart(restart) [10:56:18.629] muffled <- TRUE [10:56:18.629] break [10:56:18.629] } [10:56:18.629] } [10:56:18.629] } [10:56:18.629] invisible(muffled) [10:56:18.629] } [10:56:18.629] muffleCondition(cond, pattern = "^muffle") [10:56:18.629] } [10:56:18.629] } [10:56:18.629] else { [10:56:18.629] if (TRUE) { [10:56:18.629] muffleCondition <- function (cond, pattern = "^muffle") [10:56:18.629] { [10:56:18.629] inherits <- base::inherits [10:56:18.629] invokeRestart <- base::invokeRestart [10:56:18.629] is.null <- base::is.null [10:56:18.629] muffled <- FALSE [10:56:18.629] if (inherits(cond, "message")) { [10:56:18.629] muffled <- grepl(pattern, "muffleMessage") [10:56:18.629] if (muffled) [10:56:18.629] invokeRestart("muffleMessage") [10:56:18.629] } [10:56:18.629] else if (inherits(cond, "warning")) { [10:56:18.629] muffled <- grepl(pattern, "muffleWarning") [10:56:18.629] if (muffled) [10:56:18.629] invokeRestart("muffleWarning") [10:56:18.629] } [10:56:18.629] else if (inherits(cond, "condition")) { [10:56:18.629] if (!is.null(pattern)) { [10:56:18.629] computeRestarts <- base::computeRestarts [10:56:18.629] grepl <- base::grepl [10:56:18.629] restarts <- computeRestarts(cond) [10:56:18.629] for (restart in restarts) { [10:56:18.629] name <- restart$name [10:56:18.629] if (is.null(name)) [10:56:18.629] next [10:56:18.629] if (!grepl(pattern, name)) [10:56:18.629] next [10:56:18.629] invokeRestart(restart) [10:56:18.629] muffled <- TRUE [10:56:18.629] break [10:56:18.629] } [10:56:18.629] } [10:56:18.629] } [10:56:18.629] invisible(muffled) [10:56:18.629] } [10:56:18.629] muffleCondition(cond, pattern = "^muffle") [10:56:18.629] } [10:56:18.629] } [10:56:18.629] } [10:56:18.629] })) [10:56:18.629] }, error = function(ex) { [10:56:18.629] base::structure(base::list(value = NULL, visible = NULL, [10:56:18.629] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:18.629] ...future.rng), started = ...future.startTime, [10:56:18.629] finished = Sys.time(), session_uuid = NA_character_, [10:56:18.629] version = "1.8"), class = "FutureResult") [10:56:18.629] }, finally = { [10:56:18.629] if (!identical(...future.workdir, getwd())) [10:56:18.629] setwd(...future.workdir) [10:56:18.629] { [10:56:18.629] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:18.629] ...future.oldOptions$nwarnings <- NULL [10:56:18.629] } [10:56:18.629] base::options(...future.oldOptions) [10:56:18.629] if (.Platform$OS.type == "windows") { [10:56:18.629] old_names <- names(...future.oldEnvVars) [10:56:18.629] envs <- base::Sys.getenv() [10:56:18.629] names <- names(envs) [10:56:18.629] common <- intersect(names, old_names) [10:56:18.629] added <- setdiff(names, old_names) [10:56:18.629] removed <- setdiff(old_names, names) [10:56:18.629] changed <- common[...future.oldEnvVars[common] != [10:56:18.629] envs[common]] [10:56:18.629] NAMES <- toupper(changed) [10:56:18.629] args <- list() [10:56:18.629] for (kk in seq_along(NAMES)) { [10:56:18.629] name <- changed[[kk]] [10:56:18.629] NAME <- NAMES[[kk]] [10:56:18.629] if (name != NAME && is.element(NAME, old_names)) [10:56:18.629] next [10:56:18.629] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:18.629] } [10:56:18.629] NAMES <- toupper(added) [10:56:18.629] for (kk in seq_along(NAMES)) { [10:56:18.629] name <- added[[kk]] [10:56:18.629] NAME <- NAMES[[kk]] [10:56:18.629] if (name != NAME && is.element(NAME, old_names)) [10:56:18.629] next [10:56:18.629] args[[name]] <- "" [10:56:18.629] } [10:56:18.629] NAMES <- toupper(removed) [10:56:18.629] for (kk in seq_along(NAMES)) { [10:56:18.629] name <- removed[[kk]] [10:56:18.629] NAME <- NAMES[[kk]] [10:56:18.629] if (name != NAME && is.element(NAME, old_names)) [10:56:18.629] next [10:56:18.629] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:18.629] } [10:56:18.629] if (length(args) > 0) [10:56:18.629] base::do.call(base::Sys.setenv, args = args) [10:56:18.629] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:18.629] } [10:56:18.629] else { [10:56:18.629] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:18.629] } [10:56:18.629] { [10:56:18.629] if (base::length(...future.futureOptionsAdded) > [10:56:18.629] 0L) { [10:56:18.629] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:18.629] base::names(opts) <- ...future.futureOptionsAdded [10:56:18.629] base::options(opts) [10:56:18.629] } [10:56:18.629] { [10:56:18.629] NULL [10:56:18.629] options(future.plan = NULL) [10:56:18.629] if (is.na(NA_character_)) [10:56:18.629] Sys.unsetenv("R_FUTURE_PLAN") [10:56:18.629] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:18.629] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:18.629] .init = FALSE) [10:56:18.629] } [10:56:18.629] } [10:56:18.629] } [10:56:18.629] }) [10:56:18.629] if (TRUE) { [10:56:18.629] base::sink(type = "output", split = FALSE) [10:56:18.629] if (TRUE) { [10:56:18.629] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:18.629] } [10:56:18.629] else { [10:56:18.629] ...future.result["stdout"] <- base::list(NULL) [10:56:18.629] } [10:56:18.629] base::close(...future.stdout) [10:56:18.629] ...future.stdout <- NULL [10:56:18.629] } [10:56:18.629] ...future.result$conditions <- ...future.conditions [10:56:18.629] ...future.result$finished <- base::Sys.time() [10:56:18.629] ...future.result [10:56:18.629] } [10:56:18.805] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [10:56:18.806] plan(): nbrOfWorkers() = 2 > library("listenv") > > plan(mirai_multisession) [10:56:18.811] plan(): Setting new future strategy stack: [10:56:18.811] List of future strategies: [10:56:18.811] 1. mirai_multisession: [10:56:18.811] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [10:56:18.811] - tweaked: FALSE [10:56:18.811] - call: plan(mirai_multisession) [10:56:18.825] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [10:56:18.825] < mirai | $data > [10:56:18.827] getGlobalsAndPackages() ... [10:56:18.827] Not searching for globals [10:56:18.828] - globals: [0] [10:56:18.828] getGlobalsAndPackages() ... DONE [10:56:18.828] getGlobalsAndPackages() ... [10:56:18.828] [10:56:18.828] - globals: [0] [10:56:18.828] getGlobalsAndPackages() ... DONE [10:56:18.829] Packages needed by the future expression (n = 0): [10:56:18.829] Packages needed by future strategies (n = 0): [10:56:18.830] { [10:56:18.830] { [10:56:18.830] { [10:56:18.830] ...future.startTime <- base::Sys.time() [10:56:18.830] { [10:56:18.830] { [10:56:18.830] { [10:56:18.830] base::local({ [10:56:18.830] has_future <- base::requireNamespace("future", [10:56:18.830] quietly = TRUE) [10:56:18.830] if (has_future) { [10:56:18.830] ns <- base::getNamespace("future") [10:56:18.830] version <- ns[[".package"]][["version"]] [10:56:18.830] if (is.null(version)) [10:56:18.830] version <- utils::packageVersion("future") [10:56:18.830] } [10:56:18.830] else { [10:56:18.830] version <- NULL [10:56:18.830] } [10:56:18.830] if (!has_future || version < "1.8.0") { [10:56:18.830] info <- base::c(r_version = base::gsub("R version ", [10:56:18.830] "", base::R.version$version.string), [10:56:18.830] platform = base::sprintf("%s (%s-bit)", [10:56:18.830] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:18.830] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:18.830] "release", "version")], collapse = " "), [10:56:18.830] hostname = base::Sys.info()[["nodename"]]) [10:56:18.830] info <- base::sprintf("%s: %s", base::names(info), [10:56:18.830] info) [10:56:18.830] info <- base::paste(info, collapse = "; ") [10:56:18.830] if (!has_future) { [10:56:18.830] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:18.830] info) [10:56:18.830] } [10:56:18.830] else { [10:56:18.830] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:18.830] info, version) [10:56:18.830] } [10:56:18.830] base::stop(msg) [10:56:18.830] } [10:56:18.830] }) [10:56:18.830] } [10:56:18.830] ...future.strategy.old <- future::plan("list") [10:56:18.830] options(future.plan = NULL) [10:56:18.830] Sys.unsetenv("R_FUTURE_PLAN") [10:56:18.830] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:18.830] } [10:56:18.830] ...future.workdir <- getwd() [10:56:18.830] } [10:56:18.830] ...future.oldOptions <- base::as.list(base::.Options) [10:56:18.830] ...future.oldEnvVars <- base::Sys.getenv() [10:56:18.830] } [10:56:18.830] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:18.830] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:18.830] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:18.830] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:18.830] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:18.830] future.stdout.windows.reencode = NULL, width = 80L) [10:56:18.830] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:18.830] base::names(...future.oldOptions)) [10:56:18.830] } [10:56:18.830] if (FALSE) { [10:56:18.830] } [10:56:18.830] else { [10:56:18.830] if (TRUE) { [10:56:18.830] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:18.830] open = "w") [10:56:18.830] } [10:56:18.830] else { [10:56:18.830] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:18.830] windows = "NUL", "/dev/null"), open = "w") [10:56:18.830] } [10:56:18.830] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:18.830] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:18.830] base::sink(type = "output", split = FALSE) [10:56:18.830] base::close(...future.stdout) [10:56:18.830] }, add = TRUE) [10:56:18.830] } [10:56:18.830] ...future.frame <- base::sys.nframe() [10:56:18.830] ...future.conditions <- base::list() [10:56:18.830] ...future.rng <- base::globalenv()$.Random.seed [10:56:18.830] if (FALSE) { [10:56:18.830] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:18.830] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:18.830] } [10:56:18.830] ...future.result <- base::tryCatch({ [10:56:18.830] base::withCallingHandlers({ [10:56:18.830] ...future.value <- base::withVisible(base::local(NA)) [10:56:18.830] future::FutureResult(value = ...future.value$value, [10:56:18.830] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:18.830] ...future.rng), globalenv = if (FALSE) [10:56:18.830] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:18.830] ...future.globalenv.names)) [10:56:18.830] else NULL, started = ...future.startTime, version = "1.8") [10:56:18.830] }, condition = base::local({ [10:56:18.830] c <- base::c [10:56:18.830] inherits <- base::inherits [10:56:18.830] invokeRestart <- base::invokeRestart [10:56:18.830] length <- base::length [10:56:18.830] list <- base::list [10:56:18.830] seq.int <- base::seq.int [10:56:18.830] signalCondition <- base::signalCondition [10:56:18.830] sys.calls <- base::sys.calls [10:56:18.830] `[[` <- base::`[[` [10:56:18.830] `+` <- base::`+` [10:56:18.830] `<<-` <- base::`<<-` [10:56:18.830] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:18.830] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:18.830] 3L)] [10:56:18.830] } [10:56:18.830] function(cond) { [10:56:18.830] is_error <- inherits(cond, "error") [10:56:18.830] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:18.830] NULL) [10:56:18.830] if (is_error) { [10:56:18.830] sessionInformation <- function() { [10:56:18.830] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:18.830] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:18.830] search = base::search(), system = base::Sys.info()) [10:56:18.830] } [10:56:18.830] ...future.conditions[[length(...future.conditions) + [10:56:18.830] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:18.830] cond$call), session = sessionInformation(), [10:56:18.830] timestamp = base::Sys.time(), signaled = 0L) [10:56:18.830] signalCondition(cond) [10:56:18.830] } [10:56:18.830] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:18.830] signal <- FALSE && inherits(cond, character(0)) [10:56:18.830] ...future.conditions[[length(...future.conditions) + [10:56:18.830] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:18.830] if (FALSE && !signal) { [10:56:18.830] muffleCondition <- function (cond, pattern = "^muffle") [10:56:18.830] { [10:56:18.830] inherits <- base::inherits [10:56:18.830] invokeRestart <- base::invokeRestart [10:56:18.830] is.null <- base::is.null [10:56:18.830] muffled <- FALSE [10:56:18.830] if (inherits(cond, "message")) { [10:56:18.830] muffled <- grepl(pattern, "muffleMessage") [10:56:18.830] if (muffled) [10:56:18.830] invokeRestart("muffleMessage") [10:56:18.830] } [10:56:18.830] else if (inherits(cond, "warning")) { [10:56:18.830] muffled <- grepl(pattern, "muffleWarning") [10:56:18.830] if (muffled) [10:56:18.830] invokeRestart("muffleWarning") [10:56:18.830] } [10:56:18.830] else if (inherits(cond, "condition")) { [10:56:18.830] if (!is.null(pattern)) { [10:56:18.830] computeRestarts <- base::computeRestarts [10:56:18.830] grepl <- base::grepl [10:56:18.830] restarts <- computeRestarts(cond) [10:56:18.830] for (restart in restarts) { [10:56:18.830] name <- restart$name [10:56:18.830] if (is.null(name)) [10:56:18.830] next [10:56:18.830] if (!grepl(pattern, name)) [10:56:18.830] next [10:56:18.830] invokeRestart(restart) [10:56:18.830] muffled <- TRUE [10:56:18.830] break [10:56:18.830] } [10:56:18.830] } [10:56:18.830] } [10:56:18.830] invisible(muffled) [10:56:18.830] } [10:56:18.830] muffleCondition(cond, pattern = "^muffle") [10:56:18.830] } [10:56:18.830] } [10:56:18.830] else { [10:56:18.830] if (TRUE) { [10:56:18.830] muffleCondition <- function (cond, pattern = "^muffle") [10:56:18.830] { [10:56:18.830] inherits <- base::inherits [10:56:18.830] invokeRestart <- base::invokeRestart [10:56:18.830] is.null <- base::is.null [10:56:18.830] muffled <- FALSE [10:56:18.830] if (inherits(cond, "message")) { [10:56:18.830] muffled <- grepl(pattern, "muffleMessage") [10:56:18.830] if (muffled) [10:56:18.830] invokeRestart("muffleMessage") [10:56:18.830] } [10:56:18.830] else if (inherits(cond, "warning")) { [10:56:18.830] muffled <- grepl(pattern, "muffleWarning") [10:56:18.830] if (muffled) [10:56:18.830] invokeRestart("muffleWarning") [10:56:18.830] } [10:56:18.830] else if (inherits(cond, "condition")) { [10:56:18.830] if (!is.null(pattern)) { [10:56:18.830] computeRestarts <- base::computeRestarts [10:56:18.830] grepl <- base::grepl [10:56:18.830] restarts <- computeRestarts(cond) [10:56:18.830] for (restart in restarts) { [10:56:18.830] name <- restart$name [10:56:18.830] if (is.null(name)) [10:56:18.830] next [10:56:18.830] if (!grepl(pattern, name)) [10:56:18.830] next [10:56:18.830] invokeRestart(restart) [10:56:18.830] muffled <- TRUE [10:56:18.830] break [10:56:18.830] } [10:56:18.830] } [10:56:18.830] } [10:56:18.830] invisible(muffled) [10:56:18.830] } [10:56:18.830] muffleCondition(cond, pattern = "^muffle") [10:56:18.830] } [10:56:18.830] } [10:56:18.830] } [10:56:18.830] })) [10:56:18.830] }, error = function(ex) { [10:56:18.830] base::structure(base::list(value = NULL, visible = NULL, [10:56:18.830] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:18.830] ...future.rng), started = ...future.startTime, [10:56:18.830] finished = Sys.time(), session_uuid = NA_character_, [10:56:18.830] version = "1.8"), class = "FutureResult") [10:56:18.830] }, finally = { [10:56:18.830] if (!identical(...future.workdir, getwd())) [10:56:18.830] setwd(...future.workdir) [10:56:18.830] { [10:56:18.830] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:18.830] ...future.oldOptions$nwarnings <- NULL [10:56:18.830] } [10:56:18.830] base::options(...future.oldOptions) [10:56:18.830] if (.Platform$OS.type == "windows") { [10:56:18.830] old_names <- names(...future.oldEnvVars) [10:56:18.830] envs <- base::Sys.getenv() [10:56:18.830] names <- names(envs) [10:56:18.830] common <- intersect(names, old_names) [10:56:18.830] added <- setdiff(names, old_names) [10:56:18.830] removed <- setdiff(old_names, names) [10:56:18.830] changed <- common[...future.oldEnvVars[common] != [10:56:18.830] envs[common]] [10:56:18.830] NAMES <- toupper(changed) [10:56:18.830] args <- list() [10:56:18.830] for (kk in seq_along(NAMES)) { [10:56:18.830] name <- changed[[kk]] [10:56:18.830] NAME <- NAMES[[kk]] [10:56:18.830] if (name != NAME && is.element(NAME, old_names)) [10:56:18.830] next [10:56:18.830] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:18.830] } [10:56:18.830] NAMES <- toupper(added) [10:56:18.830] for (kk in seq_along(NAMES)) { [10:56:18.830] name <- added[[kk]] [10:56:18.830] NAME <- NAMES[[kk]] [10:56:18.830] if (name != NAME && is.element(NAME, old_names)) [10:56:18.830] next [10:56:18.830] args[[name]] <- "" [10:56:18.830] } [10:56:18.830] NAMES <- toupper(removed) [10:56:18.830] for (kk in seq_along(NAMES)) { [10:56:18.830] name <- removed[[kk]] [10:56:18.830] NAME <- NAMES[[kk]] [10:56:18.830] if (name != NAME && is.element(NAME, old_names)) [10:56:18.830] next [10:56:18.830] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:18.830] } [10:56:18.830] if (length(args) > 0) [10:56:18.830] base::do.call(base::Sys.setenv, args = args) [10:56:18.830] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:18.830] } [10:56:18.830] else { [10:56:18.830] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:18.830] } [10:56:18.830] { [10:56:18.830] if (base::length(...future.futureOptionsAdded) > [10:56:18.830] 0L) { [10:56:18.830] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:18.830] base::names(opts) <- ...future.futureOptionsAdded [10:56:18.830] base::options(opts) [10:56:18.830] } [10:56:18.830] { [10:56:18.830] NULL [10:56:18.830] options(future.plan = NULL) [10:56:18.830] if (is.na(NA_character_)) [10:56:18.830] Sys.unsetenv("R_FUTURE_PLAN") [10:56:18.830] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:18.830] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:18.830] .init = FALSE) [10:56:18.830] } [10:56:18.830] } [10:56:18.830] } [10:56:18.830] }) [10:56:18.830] if (TRUE) { [10:56:18.830] base::sink(type = "output", split = FALSE) [10:56:18.830] if (TRUE) { [10:56:18.830] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:18.830] } [10:56:18.830] else { [10:56:18.830] ...future.result["stdout"] <- base::list(NULL) [10:56:18.830] } [10:56:18.830] base::close(...future.stdout) [10:56:18.830] ...future.stdout <- NULL [10:56:18.830] } [10:56:18.830] ...future.result$conditions <- ...future.conditions [10:56:18.830] ...future.result$finished <- base::Sys.time() [10:56:18.830] ...future.result [10:56:18.830] } [10:56:18.940] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [10:56:18.941] plan(): nbrOfWorkers() = 2 > > message("*** Tricky use cases related to globals ...") *** Tricky use cases related to globals ... > > message("- Globals with the same name as 'base' objects ...") - Globals with the same name as 'base' objects ... > > ## 'col' is masked by 'base::col' (Issue #55) > > col <- 3 > x %<-% { stopifnot(is.numeric(col)); col } [10:56:18.942] getGlobalsAndPackages() ... [10:56:18.942] Searching for globals... [10:56:18.952] - globals found: [4] '{', 'stopifnot', 'is.numeric', 'col' [10:56:18.953] Searching for globals ... DONE [10:56:18.953] Resolving globals: FALSE [10:56:18.954] The total size of the 1 globals is 56 bytes (56 bytes) [10:56:18.955] The total size of the 1 globals exported for future expression ('{; stopifnot(is.numeric(col)); col; }') is 56 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There is one global: 'col' (56 bytes of class 'numeric') [10:56:18.955] - globals: [1] 'col' [10:56:18.955] [10:56:18.955] getGlobalsAndPackages() ... DONE [10:56:18.956] run() for 'Future' ... [10:56:18.956] - state: 'created' [10:56:18.956] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:18.959] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:18.959] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:18.959] - Field: 'label' [10:56:18.959] - Field: 'local' [10:56:18.959] - Field: 'owner' [10:56:18.960] - Field: 'envir' [10:56:18.960] - Field: 'packages' [10:56:18.960] - Field: 'gc' [10:56:18.960] - Field: 'conditions' [10:56:18.960] - Field: 'expr' [10:56:18.960] - Field: 'uuid' [10:56:18.961] - Field: 'seed' [10:56:18.961] - Field: 'version' [10:56:18.961] - Field: 'result' [10:56:18.961] - Field: 'asynchronous' [10:56:18.961] - Field: 'calls' [10:56:18.961] - Field: 'globals' [10:56:18.962] - Field: 'stdout' [10:56:18.962] - Field: 'earlySignal' [10:56:18.962] - Field: 'lazy' [10:56:18.962] - Field: 'state' [10:56:18.962] - Field: '.cluster' [10:56:18.963] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:18.963] - Launch lazy future ... [10:56:18.963] Packages needed by the future expression (n = 0): [10:56:18.963] Packages needed by future strategies (n = 0): [10:56:18.964] { [10:56:18.964] { [10:56:18.964] { [10:56:18.964] ...future.startTime <- base::Sys.time() [10:56:18.964] { [10:56:18.964] { [10:56:18.964] { [10:56:18.964] base::local({ [10:56:18.964] has_future <- base::requireNamespace("future", [10:56:18.964] quietly = TRUE) [10:56:18.964] if (has_future) { [10:56:18.964] ns <- base::getNamespace("future") [10:56:18.964] version <- ns[[".package"]][["version"]] [10:56:18.964] if (is.null(version)) [10:56:18.964] version <- utils::packageVersion("future") [10:56:18.964] } [10:56:18.964] else { [10:56:18.964] version <- NULL [10:56:18.964] } [10:56:18.964] if (!has_future || version < "1.8.0") { [10:56:18.964] info <- base::c(r_version = base::gsub("R version ", [10:56:18.964] "", base::R.version$version.string), [10:56:18.964] platform = base::sprintf("%s (%s-bit)", [10:56:18.964] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:18.964] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:18.964] "release", "version")], collapse = " "), [10:56:18.964] hostname = base::Sys.info()[["nodename"]]) [10:56:18.964] info <- base::sprintf("%s: %s", base::names(info), [10:56:18.964] info) [10:56:18.964] info <- base::paste(info, collapse = "; ") [10:56:18.964] if (!has_future) { [10:56:18.964] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:18.964] info) [10:56:18.964] } [10:56:18.964] else { [10:56:18.964] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:18.964] info, version) [10:56:18.964] } [10:56:18.964] base::stop(msg) [10:56:18.964] } [10:56:18.964] }) [10:56:18.964] } [10:56:18.964] ...future.strategy.old <- future::plan("list") [10:56:18.964] options(future.plan = NULL) [10:56:18.964] Sys.unsetenv("R_FUTURE_PLAN") [10:56:18.964] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:18.964] } [10:56:18.964] ...future.workdir <- getwd() [10:56:18.964] } [10:56:18.964] ...future.oldOptions <- base::as.list(base::.Options) [10:56:18.964] ...future.oldEnvVars <- base::Sys.getenv() [10:56:18.964] } [10:56:18.964] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:18.964] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:18.964] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:18.964] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:18.964] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:18.964] future.stdout.windows.reencode = NULL, width = 80L) [10:56:18.964] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:18.964] base::names(...future.oldOptions)) [10:56:18.964] } [10:56:18.964] if (FALSE) { [10:56:18.964] } [10:56:18.964] else { [10:56:18.964] if (TRUE) { [10:56:18.964] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:18.964] open = "w") [10:56:18.964] } [10:56:18.964] else { [10:56:18.964] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:18.964] windows = "NUL", "/dev/null"), open = "w") [10:56:18.964] } [10:56:18.964] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:18.964] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:18.964] base::sink(type = "output", split = FALSE) [10:56:18.964] base::close(...future.stdout) [10:56:18.964] }, add = TRUE) [10:56:18.964] } [10:56:18.964] ...future.frame <- base::sys.nframe() [10:56:18.964] ...future.conditions <- base::list() [10:56:18.964] ...future.rng <- base::globalenv()$.Random.seed [10:56:18.964] if (FALSE) { [10:56:18.964] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:18.964] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:18.964] } [10:56:18.964] ...future.result <- base::tryCatch({ [10:56:18.964] base::withCallingHandlers({ [10:56:18.964] ...future.value <- base::withVisible(base::local({ [10:56:18.964] stopifnot(is.numeric(col)) [10:56:18.964] col [10:56:18.964] })) [10:56:18.964] future::FutureResult(value = ...future.value$value, [10:56:18.964] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:18.964] ...future.rng), globalenv = if (FALSE) [10:56:18.964] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:18.964] ...future.globalenv.names)) [10:56:18.964] else NULL, started = ...future.startTime, version = "1.8") [10:56:18.964] }, condition = base::local({ [10:56:18.964] c <- base::c [10:56:18.964] inherits <- base::inherits [10:56:18.964] invokeRestart <- base::invokeRestart [10:56:18.964] length <- base::length [10:56:18.964] list <- base::list [10:56:18.964] seq.int <- base::seq.int [10:56:18.964] signalCondition <- base::signalCondition [10:56:18.964] sys.calls <- base::sys.calls [10:56:18.964] `[[` <- base::`[[` [10:56:18.964] `+` <- base::`+` [10:56:18.964] `<<-` <- base::`<<-` [10:56:18.964] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:18.964] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:18.964] 3L)] [10:56:18.964] } [10:56:18.964] function(cond) { [10:56:18.964] is_error <- inherits(cond, "error") [10:56:18.964] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:18.964] NULL) [10:56:18.964] if (is_error) { [10:56:18.964] sessionInformation <- function() { [10:56:18.964] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:18.964] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:18.964] search = base::search(), system = base::Sys.info()) [10:56:18.964] } [10:56:18.964] ...future.conditions[[length(...future.conditions) + [10:56:18.964] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:18.964] cond$call), session = sessionInformation(), [10:56:18.964] timestamp = base::Sys.time(), signaled = 0L) [10:56:18.964] signalCondition(cond) [10:56:18.964] } [10:56:18.964] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:18.964] signal <- FALSE && inherits(cond, character(0)) [10:56:18.964] ...future.conditions[[length(...future.conditions) + [10:56:18.964] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:18.964] if (FALSE && !signal) { [10:56:18.964] muffleCondition <- function (cond, pattern = "^muffle") [10:56:18.964] { [10:56:18.964] inherits <- base::inherits [10:56:18.964] invokeRestart <- base::invokeRestart [10:56:18.964] is.null <- base::is.null [10:56:18.964] muffled <- FALSE [10:56:18.964] if (inherits(cond, "message")) { [10:56:18.964] muffled <- grepl(pattern, "muffleMessage") [10:56:18.964] if (muffled) [10:56:18.964] invokeRestart("muffleMessage") [10:56:18.964] } [10:56:18.964] else if (inherits(cond, "warning")) { [10:56:18.964] muffled <- grepl(pattern, "muffleWarning") [10:56:18.964] if (muffled) [10:56:18.964] invokeRestart("muffleWarning") [10:56:18.964] } [10:56:18.964] else if (inherits(cond, "condition")) { [10:56:18.964] if (!is.null(pattern)) { [10:56:18.964] computeRestarts <- base::computeRestarts [10:56:18.964] grepl <- base::grepl [10:56:18.964] restarts <- computeRestarts(cond) [10:56:18.964] for (restart in restarts) { [10:56:18.964] name <- restart$name [10:56:18.964] if (is.null(name)) [10:56:18.964] next [10:56:18.964] if (!grepl(pattern, name)) [10:56:18.964] next [10:56:18.964] invokeRestart(restart) [10:56:18.964] muffled <- TRUE [10:56:18.964] break [10:56:18.964] } [10:56:18.964] } [10:56:18.964] } [10:56:18.964] invisible(muffled) [10:56:18.964] } [10:56:18.964] muffleCondition(cond, pattern = "^muffle") [10:56:18.964] } [10:56:18.964] } [10:56:18.964] else { [10:56:18.964] if (TRUE) { [10:56:18.964] muffleCondition <- function (cond, pattern = "^muffle") [10:56:18.964] { [10:56:18.964] inherits <- base::inherits [10:56:18.964] invokeRestart <- base::invokeRestart [10:56:18.964] is.null <- base::is.null [10:56:18.964] muffled <- FALSE [10:56:18.964] if (inherits(cond, "message")) { [10:56:18.964] muffled <- grepl(pattern, "muffleMessage") [10:56:18.964] if (muffled) [10:56:18.964] invokeRestart("muffleMessage") [10:56:18.964] } [10:56:18.964] else if (inherits(cond, "warning")) { [10:56:18.964] muffled <- grepl(pattern, "muffleWarning") [10:56:18.964] if (muffled) [10:56:18.964] invokeRestart("muffleWarning") [10:56:18.964] } [10:56:18.964] else if (inherits(cond, "condition")) { [10:56:18.964] if (!is.null(pattern)) { [10:56:18.964] computeRestarts <- base::computeRestarts [10:56:18.964] grepl <- base::grepl [10:56:18.964] restarts <- computeRestarts(cond) [10:56:18.964] for (restart in restarts) { [10:56:18.964] name <- restart$name [10:56:18.964] if (is.null(name)) [10:56:18.964] next [10:56:18.964] if (!grepl(pattern, name)) [10:56:18.964] next [10:56:18.964] invokeRestart(restart) [10:56:18.964] muffled <- TRUE [10:56:18.964] break [10:56:18.964] } [10:56:18.964] } [10:56:18.964] } [10:56:18.964] invisible(muffled) [10:56:18.964] } [10:56:18.964] muffleCondition(cond, pattern = "^muffle") [10:56:18.964] } [10:56:18.964] } [10:56:18.964] } [10:56:18.964] })) [10:56:18.964] }, error = function(ex) { [10:56:18.964] base::structure(base::list(value = NULL, visible = NULL, [10:56:18.964] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:18.964] ...future.rng), started = ...future.startTime, [10:56:18.964] finished = Sys.time(), session_uuid = NA_character_, [10:56:18.964] version = "1.8"), class = "FutureResult") [10:56:18.964] }, finally = { [10:56:18.964] if (!identical(...future.workdir, getwd())) [10:56:18.964] setwd(...future.workdir) [10:56:18.964] { [10:56:18.964] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:18.964] ...future.oldOptions$nwarnings <- NULL [10:56:18.964] } [10:56:18.964] base::options(...future.oldOptions) [10:56:18.964] if (.Platform$OS.type == "windows") { [10:56:18.964] old_names <- names(...future.oldEnvVars) [10:56:18.964] envs <- base::Sys.getenv() [10:56:18.964] names <- names(envs) [10:56:18.964] common <- intersect(names, old_names) [10:56:18.964] added <- setdiff(names, old_names) [10:56:18.964] removed <- setdiff(old_names, names) [10:56:18.964] changed <- common[...future.oldEnvVars[common] != [10:56:18.964] envs[common]] [10:56:18.964] NAMES <- toupper(changed) [10:56:18.964] args <- list() [10:56:18.964] for (kk in seq_along(NAMES)) { [10:56:18.964] name <- changed[[kk]] [10:56:18.964] NAME <- NAMES[[kk]] [10:56:18.964] if (name != NAME && is.element(NAME, old_names)) [10:56:18.964] next [10:56:18.964] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:18.964] } [10:56:18.964] NAMES <- toupper(added) [10:56:18.964] for (kk in seq_along(NAMES)) { [10:56:18.964] name <- added[[kk]] [10:56:18.964] NAME <- NAMES[[kk]] [10:56:18.964] if (name != NAME && is.element(NAME, old_names)) [10:56:18.964] next [10:56:18.964] args[[name]] <- "" [10:56:18.964] } [10:56:18.964] NAMES <- toupper(removed) [10:56:18.964] for (kk in seq_along(NAMES)) { [10:56:18.964] name <- removed[[kk]] [10:56:18.964] NAME <- NAMES[[kk]] [10:56:18.964] if (name != NAME && is.element(NAME, old_names)) [10:56:18.964] next [10:56:18.964] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:18.964] } [10:56:18.964] if (length(args) > 0) [10:56:18.964] base::do.call(base::Sys.setenv, args = args) [10:56:18.964] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:18.964] } [10:56:18.964] else { [10:56:18.964] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:18.964] } [10:56:18.964] { [10:56:18.964] if (base::length(...future.futureOptionsAdded) > [10:56:18.964] 0L) { [10:56:18.964] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:18.964] base::names(opts) <- ...future.futureOptionsAdded [10:56:18.964] base::options(opts) [10:56:18.964] } [10:56:18.964] { [10:56:18.964] NULL [10:56:18.964] options(future.plan = NULL) [10:56:18.964] if (is.na(NA_character_)) [10:56:18.964] Sys.unsetenv("R_FUTURE_PLAN") [10:56:18.964] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:18.964] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:18.964] .init = FALSE) [10:56:18.964] } [10:56:18.964] } [10:56:18.964] } [10:56:18.964] }) [10:56:18.964] if (TRUE) { [10:56:18.964] base::sink(type = "output", split = FALSE) [10:56:18.964] if (TRUE) { [10:56:18.964] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:18.964] } [10:56:18.964] else { [10:56:18.964] ...future.result["stdout"] <- base::list(NULL) [10:56:18.964] } [10:56:18.964] base::close(...future.stdout) [10:56:18.964] ...future.stdout <- NULL [10:56:18.964] } [10:56:18.964] ...future.result$conditions <- ...future.conditions [10:56:18.964] ...future.result$finished <- base::Sys.time() [10:56:18.964] ...future.result [10:56:18.964] } [10:56:18.968] - Launch lazy future ... done [10:56:18.968] run() for 'MiraiFuture' ... done > print(x) [1] 3 > stopifnot(x == col) > > message("- flapply(x, FUN = base::vector, ...) ...") - flapply(x, FUN = base::vector, ...) ... > > flapply <- function(x, FUN, ...) { + res <- listenv() + for (ii in seq_along(x)) { + res[[ii]] %<-% FUN(x[[ii]], ...) + } + names(res) <- names(x) + + ## Make sure 'x', 'FUN' and 'ii' are truly + ## exported to the future environment + rm(list = c("x", "FUN", "ii")) + + as.list(res) + } > > x <- list(a = "integer", b = "numeric", c = "character", c = "list") > str(list(x = x)) List of 1 $ x:List of 4 ..$ a: chr "integer" ..$ b: chr "numeric" ..$ c: chr "character" ..$ c: chr "list" > > y0 <- lapply(x, FUN = base::vector, length = 2L) > str(list(y0 = y0)) List of 1 $ y0:List of 4 ..$ a: int [1:2] 0 0 ..$ b: num [1:2] 0 0 ..$ c: chr [1:2] "" "" ..$ c:List of 2 .. ..$ : NULL .. ..$ : NULL > > y <- flapply(x, FUN = base::vector, length = 2L) [10:56:18.986] getGlobalsAndPackages() ... [10:56:18.986] Searching for globals... [10:56:18.989] - globals found: [6] 'FUN', '[[', 'x', 'ii', '...', '.Internal' [10:56:18.989] Searching for globals ... DONE [10:56:18.989] Resolving globals: FALSE [10:56:18.989] Tweak future expression to call with '...' arguments ... [10:56:18.989] { [10:56:18.989] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [10:56:18.989] } [10:56:18.990] Tweak future expression to call with '...' arguments ... DONE [10:56:18.991] The total size of the 4 globals is 2.69 KiB (2752 bytes) [10:56:18.991] The total size of the 4 globals exported for future expression ('FUN(x[[ii]], ...)') is 2.69 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'FUN' (2.13 KiB of class 'function'), 'x' (456 bytes of class 'list') and 'ii' (56 bytes of class 'numeric') [10:56:18.991] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [10:56:18.992] [10:56:18.992] getGlobalsAndPackages() ... DONE [10:56:18.992] run() for 'Future' ... [10:56:18.992] - state: 'created' [10:56:18.992] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:18.995] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:18.995] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:18.995] - Field: 'label' [10:56:18.995] - Field: 'local' [10:56:18.995] - Field: 'owner' [10:56:18.996] - Field: 'envir' [10:56:18.996] - Field: 'packages' [10:56:18.996] - Field: 'gc' [10:56:18.996] - Field: 'conditions' [10:56:18.996] - Field: 'expr' [10:56:18.996] - Field: 'uuid' [10:56:18.997] - Field: 'seed' [10:56:18.997] - Field: 'version' [10:56:18.997] - Field: 'result' [10:56:18.997] - Field: 'asynchronous' [10:56:18.997] - Field: 'calls' [10:56:18.997] - Field: 'globals' [10:56:18.998] - Field: 'stdout' [10:56:18.998] - Field: 'earlySignal' [10:56:18.998] - Field: 'lazy' [10:56:18.998] - Field: 'state' [10:56:18.998] - Field: '.cluster' [10:56:18.998] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:18.999] - Launch lazy future ... [10:56:18.999] Packages needed by the future expression (n = 0): [10:56:18.999] Packages needed by future strategies (n = 0): [10:56:18.999] { [10:56:18.999] { [10:56:18.999] { [10:56:18.999] ...future.startTime <- base::Sys.time() [10:56:18.999] { [10:56:18.999] { [10:56:18.999] { [10:56:18.999] base::local({ [10:56:18.999] has_future <- base::requireNamespace("future", [10:56:18.999] quietly = TRUE) [10:56:18.999] if (has_future) { [10:56:18.999] ns <- base::getNamespace("future") [10:56:18.999] version <- ns[[".package"]][["version"]] [10:56:18.999] if (is.null(version)) [10:56:18.999] version <- utils::packageVersion("future") [10:56:18.999] } [10:56:18.999] else { [10:56:18.999] version <- NULL [10:56:18.999] } [10:56:18.999] if (!has_future || version < "1.8.0") { [10:56:18.999] info <- base::c(r_version = base::gsub("R version ", [10:56:18.999] "", base::R.version$version.string), [10:56:18.999] platform = base::sprintf("%s (%s-bit)", [10:56:18.999] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:18.999] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:18.999] "release", "version")], collapse = " "), [10:56:18.999] hostname = base::Sys.info()[["nodename"]]) [10:56:18.999] info <- base::sprintf("%s: %s", base::names(info), [10:56:18.999] info) [10:56:18.999] info <- base::paste(info, collapse = "; ") [10:56:18.999] if (!has_future) { [10:56:18.999] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:18.999] info) [10:56:18.999] } [10:56:18.999] else { [10:56:18.999] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:18.999] info, version) [10:56:18.999] } [10:56:18.999] base::stop(msg) [10:56:18.999] } [10:56:18.999] }) [10:56:18.999] } [10:56:18.999] ...future.strategy.old <- future::plan("list") [10:56:18.999] options(future.plan = NULL) [10:56:18.999] Sys.unsetenv("R_FUTURE_PLAN") [10:56:18.999] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:18.999] } [10:56:18.999] ...future.workdir <- getwd() [10:56:18.999] } [10:56:18.999] ...future.oldOptions <- base::as.list(base::.Options) [10:56:18.999] ...future.oldEnvVars <- base::Sys.getenv() [10:56:18.999] } [10:56:18.999] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:18.999] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:18.999] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:18.999] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:18.999] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:18.999] future.stdout.windows.reencode = NULL, width = 80L) [10:56:18.999] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:18.999] base::names(...future.oldOptions)) [10:56:18.999] } [10:56:18.999] if (FALSE) { [10:56:18.999] } [10:56:18.999] else { [10:56:18.999] if (TRUE) { [10:56:18.999] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:18.999] open = "w") [10:56:18.999] } [10:56:18.999] else { [10:56:18.999] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:18.999] windows = "NUL", "/dev/null"), open = "w") [10:56:18.999] } [10:56:18.999] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:18.999] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:18.999] base::sink(type = "output", split = FALSE) [10:56:18.999] base::close(...future.stdout) [10:56:18.999] }, add = TRUE) [10:56:18.999] } [10:56:18.999] ...future.frame <- base::sys.nframe() [10:56:18.999] ...future.conditions <- base::list() [10:56:18.999] ...future.rng <- base::globalenv()$.Random.seed [10:56:18.999] if (FALSE) { [10:56:18.999] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:18.999] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:18.999] } [10:56:18.999] ...future.result <- base::tryCatch({ [10:56:18.999] base::withCallingHandlers({ [10:56:18.999] ...future.value <- base::withVisible(base::local({ [10:56:18.999] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [10:56:18.999] })) [10:56:18.999] future::FutureResult(value = ...future.value$value, [10:56:18.999] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:18.999] ...future.rng), globalenv = if (FALSE) [10:56:18.999] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:18.999] ...future.globalenv.names)) [10:56:18.999] else NULL, started = ...future.startTime, version = "1.8") [10:56:18.999] }, condition = base::local({ [10:56:18.999] c <- base::c [10:56:18.999] inherits <- base::inherits [10:56:18.999] invokeRestart <- base::invokeRestart [10:56:18.999] length <- base::length [10:56:18.999] list <- base::list [10:56:18.999] seq.int <- base::seq.int [10:56:18.999] signalCondition <- base::signalCondition [10:56:18.999] sys.calls <- base::sys.calls [10:56:18.999] `[[` <- base::`[[` [10:56:18.999] `+` <- base::`+` [10:56:18.999] `<<-` <- base::`<<-` [10:56:18.999] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:18.999] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:18.999] 3L)] [10:56:18.999] } [10:56:18.999] function(cond) { [10:56:18.999] is_error <- inherits(cond, "error") [10:56:18.999] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:18.999] NULL) [10:56:18.999] if (is_error) { [10:56:18.999] sessionInformation <- function() { [10:56:18.999] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:18.999] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:18.999] search = base::search(), system = base::Sys.info()) [10:56:18.999] } [10:56:18.999] ...future.conditions[[length(...future.conditions) + [10:56:18.999] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:18.999] cond$call), session = sessionInformation(), [10:56:18.999] timestamp = base::Sys.time(), signaled = 0L) [10:56:18.999] signalCondition(cond) [10:56:18.999] } [10:56:18.999] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:18.999] signal <- FALSE && inherits(cond, character(0)) [10:56:18.999] ...future.conditions[[length(...future.conditions) + [10:56:18.999] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:18.999] if (FALSE && !signal) { [10:56:18.999] muffleCondition <- function (cond, pattern = "^muffle") [10:56:18.999] { [10:56:18.999] inherits <- base::inherits [10:56:18.999] invokeRestart <- base::invokeRestart [10:56:18.999] is.null <- base::is.null [10:56:18.999] muffled <- FALSE [10:56:18.999] if (inherits(cond, "message")) { [10:56:18.999] muffled <- grepl(pattern, "muffleMessage") [10:56:18.999] if (muffled) [10:56:18.999] invokeRestart("muffleMessage") [10:56:18.999] } [10:56:18.999] else if (inherits(cond, "warning")) { [10:56:18.999] muffled <- grepl(pattern, "muffleWarning") [10:56:18.999] if (muffled) [10:56:18.999] invokeRestart("muffleWarning") [10:56:18.999] } [10:56:18.999] else if (inherits(cond, "condition")) { [10:56:18.999] if (!is.null(pattern)) { [10:56:18.999] computeRestarts <- base::computeRestarts [10:56:18.999] grepl <- base::grepl [10:56:18.999] restarts <- computeRestarts(cond) [10:56:18.999] for (restart in restarts) { [10:56:18.999] name <- restart$name [10:56:18.999] if (is.null(name)) [10:56:18.999] next [10:56:18.999] if (!grepl(pattern, name)) [10:56:18.999] next [10:56:18.999] invokeRestart(restart) [10:56:18.999] muffled <- TRUE [10:56:18.999] break [10:56:18.999] } [10:56:18.999] } [10:56:18.999] } [10:56:18.999] invisible(muffled) [10:56:18.999] } [10:56:18.999] muffleCondition(cond, pattern = "^muffle") [10:56:18.999] } [10:56:18.999] } [10:56:18.999] else { [10:56:18.999] if (TRUE) { [10:56:18.999] muffleCondition <- function (cond, pattern = "^muffle") [10:56:18.999] { [10:56:18.999] inherits <- base::inherits [10:56:18.999] invokeRestart <- base::invokeRestart [10:56:18.999] is.null <- base::is.null [10:56:18.999] muffled <- FALSE [10:56:18.999] if (inherits(cond, "message")) { [10:56:18.999] muffled <- grepl(pattern, "muffleMessage") [10:56:18.999] if (muffled) [10:56:18.999] invokeRestart("muffleMessage") [10:56:18.999] } [10:56:18.999] else if (inherits(cond, "warning")) { [10:56:18.999] muffled <- grepl(pattern, "muffleWarning") [10:56:18.999] if (muffled) [10:56:18.999] invokeRestart("muffleWarning") [10:56:18.999] } [10:56:18.999] else if (inherits(cond, "condition")) { [10:56:18.999] if (!is.null(pattern)) { [10:56:18.999] computeRestarts <- base::computeRestarts [10:56:18.999] grepl <- base::grepl [10:56:18.999] restarts <- computeRestarts(cond) [10:56:18.999] for (restart in restarts) { [10:56:18.999] name <- restart$name [10:56:18.999] if (is.null(name)) [10:56:18.999] next [10:56:18.999] if (!grepl(pattern, name)) [10:56:18.999] next [10:56:18.999] invokeRestart(restart) [10:56:18.999] muffled <- TRUE [10:56:18.999] break [10:56:18.999] } [10:56:18.999] } [10:56:18.999] } [10:56:18.999] invisible(muffled) [10:56:18.999] } [10:56:18.999] muffleCondition(cond, pattern = "^muffle") [10:56:18.999] } [10:56:18.999] } [10:56:18.999] } [10:56:18.999] })) [10:56:18.999] }, error = function(ex) { [10:56:18.999] base::structure(base::list(value = NULL, visible = NULL, [10:56:18.999] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:18.999] ...future.rng), started = ...future.startTime, [10:56:18.999] finished = Sys.time(), session_uuid = NA_character_, [10:56:18.999] version = "1.8"), class = "FutureResult") [10:56:18.999] }, finally = { [10:56:18.999] if (!identical(...future.workdir, getwd())) [10:56:18.999] setwd(...future.workdir) [10:56:18.999] { [10:56:18.999] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:18.999] ...future.oldOptions$nwarnings <- NULL [10:56:18.999] } [10:56:18.999] base::options(...future.oldOptions) [10:56:18.999] if (.Platform$OS.type == "windows") { [10:56:18.999] old_names <- names(...future.oldEnvVars) [10:56:18.999] envs <- base::Sys.getenv() [10:56:18.999] names <- names(envs) [10:56:18.999] common <- intersect(names, old_names) [10:56:18.999] added <- setdiff(names, old_names) [10:56:18.999] removed <- setdiff(old_names, names) [10:56:18.999] changed <- common[...future.oldEnvVars[common] != [10:56:18.999] envs[common]] [10:56:18.999] NAMES <- toupper(changed) [10:56:18.999] args <- list() [10:56:18.999] for (kk in seq_along(NAMES)) { [10:56:18.999] name <- changed[[kk]] [10:56:18.999] NAME <- NAMES[[kk]] [10:56:18.999] if (name != NAME && is.element(NAME, old_names)) [10:56:18.999] next [10:56:18.999] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:18.999] } [10:56:18.999] NAMES <- toupper(added) [10:56:18.999] for (kk in seq_along(NAMES)) { [10:56:18.999] name <- added[[kk]] [10:56:18.999] NAME <- NAMES[[kk]] [10:56:18.999] if (name != NAME && is.element(NAME, old_names)) [10:56:18.999] next [10:56:18.999] args[[name]] <- "" [10:56:18.999] } [10:56:18.999] NAMES <- toupper(removed) [10:56:18.999] for (kk in seq_along(NAMES)) { [10:56:18.999] name <- removed[[kk]] [10:56:18.999] NAME <- NAMES[[kk]] [10:56:18.999] if (name != NAME && is.element(NAME, old_names)) [10:56:18.999] next [10:56:18.999] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:18.999] } [10:56:18.999] if (length(args) > 0) [10:56:18.999] base::do.call(base::Sys.setenv, args = args) [10:56:18.999] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:18.999] } [10:56:18.999] else { [10:56:18.999] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:18.999] } [10:56:18.999] { [10:56:18.999] if (base::length(...future.futureOptionsAdded) > [10:56:18.999] 0L) { [10:56:18.999] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:18.999] base::names(opts) <- ...future.futureOptionsAdded [10:56:18.999] base::options(opts) [10:56:18.999] } [10:56:18.999] { [10:56:18.999] NULL [10:56:18.999] options(future.plan = NULL) [10:56:18.999] if (is.na(NA_character_)) [10:56:18.999] Sys.unsetenv("R_FUTURE_PLAN") [10:56:18.999] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:18.999] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:18.999] .init = FALSE) [10:56:18.999] } [10:56:18.999] } [10:56:18.999] } [10:56:18.999] }) [10:56:18.999] if (TRUE) { [10:56:18.999] base::sink(type = "output", split = FALSE) [10:56:18.999] if (TRUE) { [10:56:18.999] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:18.999] } [10:56:18.999] else { [10:56:18.999] ...future.result["stdout"] <- base::list(NULL) [10:56:18.999] } [10:56:18.999] base::close(...future.stdout) [10:56:18.999] ...future.stdout <- NULL [10:56:18.999] } [10:56:18.999] ...future.result$conditions <- ...future.conditions [10:56:18.999] ...future.result$finished <- base::Sys.time() [10:56:18.999] ...future.result [10:56:18.999] } [10:56:19.003] - Launch lazy future ... done [10:56:19.004] run() for 'MiraiFuture' ... done [10:56:19.004] getGlobalsAndPackages() ... [10:56:19.004] Searching for globals... [10:56:19.007] - globals found: [6] 'FUN', '[[', 'x', 'ii', '...', '.Internal' [10:56:19.007] Searching for globals ... DONE [10:56:19.007] Resolving globals: FALSE [10:56:19.007] Tweak future expression to call with '...' arguments ... [10:56:19.007] { [10:56:19.007] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [10:56:19.007] } [10:56:19.008] Tweak future expression to call with '...' arguments ... DONE [10:56:19.009] The total size of the 4 globals is 2.69 KiB (2752 bytes) [10:56:19.009] The total size of the 4 globals exported for future expression ('FUN(x[[ii]], ...)') is 2.69 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'FUN' (2.13 KiB of class 'function'), 'x' (456 bytes of class 'list') and 'ii' (56 bytes of class 'numeric') [10:56:19.009] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [10:56:19.009] [10:56:19.010] getGlobalsAndPackages() ... DONE [10:56:19.010] run() for 'Future' ... [10:56:19.010] - state: 'created' [10:56:19.010] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:19.013] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:19.013] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:19.013] - Field: 'label' [10:56:19.013] - Field: 'local' [10:56:19.013] - Field: 'owner' [10:56:19.013] - Field: 'envir' [10:56:19.014] - Field: 'packages' [10:56:19.014] - Field: 'gc' [10:56:19.014] - Field: 'conditions' [10:56:19.014] - Field: 'expr' [10:56:19.014] - Field: 'uuid' [10:56:19.014] - Field: 'seed' [10:56:19.015] - Field: 'version' [10:56:19.015] - Field: 'result' [10:56:19.015] - Field: 'asynchronous' [10:56:19.015] - Field: 'calls' [10:56:19.015] - Field: 'globals' [10:56:19.016] - Field: 'stdout' [10:56:19.016] - Field: 'earlySignal' [10:56:19.016] - Field: 'lazy' [10:56:19.016] - Field: 'state' [10:56:19.016] - Field: '.cluster' [10:56:19.016] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:19.017] - Launch lazy future ... [10:56:19.018] Packages needed by the future expression (n = 0): [10:56:19.018] Packages needed by future strategies (n = 0): [10:56:19.019] { [10:56:19.019] { [10:56:19.019] { [10:56:19.019] ...future.startTime <- base::Sys.time() [10:56:19.019] { [10:56:19.019] { [10:56:19.019] { [10:56:19.019] base::local({ [10:56:19.019] has_future <- base::requireNamespace("future", [10:56:19.019] quietly = TRUE) [10:56:19.019] if (has_future) { [10:56:19.019] ns <- base::getNamespace("future") [10:56:19.019] version <- ns[[".package"]][["version"]] [10:56:19.019] if (is.null(version)) [10:56:19.019] version <- utils::packageVersion("future") [10:56:19.019] } [10:56:19.019] else { [10:56:19.019] version <- NULL [10:56:19.019] } [10:56:19.019] if (!has_future || version < "1.8.0") { [10:56:19.019] info <- base::c(r_version = base::gsub("R version ", [10:56:19.019] "", base::R.version$version.string), [10:56:19.019] platform = base::sprintf("%s (%s-bit)", [10:56:19.019] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:19.019] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:19.019] "release", "version")], collapse = " "), [10:56:19.019] hostname = base::Sys.info()[["nodename"]]) [10:56:19.019] info <- base::sprintf("%s: %s", base::names(info), [10:56:19.019] info) [10:56:19.019] info <- base::paste(info, collapse = "; ") [10:56:19.019] if (!has_future) { [10:56:19.019] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:19.019] info) [10:56:19.019] } [10:56:19.019] else { [10:56:19.019] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:19.019] info, version) [10:56:19.019] } [10:56:19.019] base::stop(msg) [10:56:19.019] } [10:56:19.019] }) [10:56:19.019] } [10:56:19.019] ...future.strategy.old <- future::plan("list") [10:56:19.019] options(future.plan = NULL) [10:56:19.019] Sys.unsetenv("R_FUTURE_PLAN") [10:56:19.019] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:19.019] } [10:56:19.019] ...future.workdir <- getwd() [10:56:19.019] } [10:56:19.019] ...future.oldOptions <- base::as.list(base::.Options) [10:56:19.019] ...future.oldEnvVars <- base::Sys.getenv() [10:56:19.019] } [10:56:19.019] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:19.019] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:19.019] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:19.019] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:19.019] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:19.019] future.stdout.windows.reencode = NULL, width = 80L) [10:56:19.019] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:19.019] base::names(...future.oldOptions)) [10:56:19.019] } [10:56:19.019] if (FALSE) { [10:56:19.019] } [10:56:19.019] else { [10:56:19.019] if (TRUE) { [10:56:19.019] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:19.019] open = "w") [10:56:19.019] } [10:56:19.019] else { [10:56:19.019] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:19.019] windows = "NUL", "/dev/null"), open = "w") [10:56:19.019] } [10:56:19.019] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:19.019] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:19.019] base::sink(type = "output", split = FALSE) [10:56:19.019] base::close(...future.stdout) [10:56:19.019] }, add = TRUE) [10:56:19.019] } [10:56:19.019] ...future.frame <- base::sys.nframe() [10:56:19.019] ...future.conditions <- base::list() [10:56:19.019] ...future.rng <- base::globalenv()$.Random.seed [10:56:19.019] if (FALSE) { [10:56:19.019] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:19.019] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:19.019] } [10:56:19.019] ...future.result <- base::tryCatch({ [10:56:19.019] base::withCallingHandlers({ [10:56:19.019] ...future.value <- base::withVisible(base::local({ [10:56:19.019] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [10:56:19.019] })) [10:56:19.019] future::FutureResult(value = ...future.value$value, [10:56:19.019] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:19.019] ...future.rng), globalenv = if (FALSE) [10:56:19.019] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:19.019] ...future.globalenv.names)) [10:56:19.019] else NULL, started = ...future.startTime, version = "1.8") [10:56:19.019] }, condition = base::local({ [10:56:19.019] c <- base::c [10:56:19.019] inherits <- base::inherits [10:56:19.019] invokeRestart <- base::invokeRestart [10:56:19.019] length <- base::length [10:56:19.019] list <- base::list [10:56:19.019] seq.int <- base::seq.int [10:56:19.019] signalCondition <- base::signalCondition [10:56:19.019] sys.calls <- base::sys.calls [10:56:19.019] `[[` <- base::`[[` [10:56:19.019] `+` <- base::`+` [10:56:19.019] `<<-` <- base::`<<-` [10:56:19.019] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:19.019] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:19.019] 3L)] [10:56:19.019] } [10:56:19.019] function(cond) { [10:56:19.019] is_error <- inherits(cond, "error") [10:56:19.019] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:19.019] NULL) [10:56:19.019] if (is_error) { [10:56:19.019] sessionInformation <- function() { [10:56:19.019] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:19.019] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:19.019] search = base::search(), system = base::Sys.info()) [10:56:19.019] } [10:56:19.019] ...future.conditions[[length(...future.conditions) + [10:56:19.019] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:19.019] cond$call), session = sessionInformation(), [10:56:19.019] timestamp = base::Sys.time(), signaled = 0L) [10:56:19.019] signalCondition(cond) [10:56:19.019] } [10:56:19.019] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:19.019] signal <- FALSE && inherits(cond, character(0)) [10:56:19.019] ...future.conditions[[length(...future.conditions) + [10:56:19.019] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:19.019] if (FALSE && !signal) { [10:56:19.019] muffleCondition <- function (cond, pattern = "^muffle") [10:56:19.019] { [10:56:19.019] inherits <- base::inherits [10:56:19.019] invokeRestart <- base::invokeRestart [10:56:19.019] is.null <- base::is.null [10:56:19.019] muffled <- FALSE [10:56:19.019] if (inherits(cond, "message")) { [10:56:19.019] muffled <- grepl(pattern, "muffleMessage") [10:56:19.019] if (muffled) [10:56:19.019] invokeRestart("muffleMessage") [10:56:19.019] } [10:56:19.019] else if (inherits(cond, "warning")) { [10:56:19.019] muffled <- grepl(pattern, "muffleWarning") [10:56:19.019] if (muffled) [10:56:19.019] invokeRestart("muffleWarning") [10:56:19.019] } [10:56:19.019] else if (inherits(cond, "condition")) { [10:56:19.019] if (!is.null(pattern)) { [10:56:19.019] computeRestarts <- base::computeRestarts [10:56:19.019] grepl <- base::grepl [10:56:19.019] restarts <- computeRestarts(cond) [10:56:19.019] for (restart in restarts) { [10:56:19.019] name <- restart$name [10:56:19.019] if (is.null(name)) [10:56:19.019] next [10:56:19.019] if (!grepl(pattern, name)) [10:56:19.019] next [10:56:19.019] invokeRestart(restart) [10:56:19.019] muffled <- TRUE [10:56:19.019] break [10:56:19.019] } [10:56:19.019] } [10:56:19.019] } [10:56:19.019] invisible(muffled) [10:56:19.019] } [10:56:19.019] muffleCondition(cond, pattern = "^muffle") [10:56:19.019] } [10:56:19.019] } [10:56:19.019] else { [10:56:19.019] if (TRUE) { [10:56:19.019] muffleCondition <- function (cond, pattern = "^muffle") [10:56:19.019] { [10:56:19.019] inherits <- base::inherits [10:56:19.019] invokeRestart <- base::invokeRestart [10:56:19.019] is.null <- base::is.null [10:56:19.019] muffled <- FALSE [10:56:19.019] if (inherits(cond, "message")) { [10:56:19.019] muffled <- grepl(pattern, "muffleMessage") [10:56:19.019] if (muffled) [10:56:19.019] invokeRestart("muffleMessage") [10:56:19.019] } [10:56:19.019] else if (inherits(cond, "warning")) { [10:56:19.019] muffled <- grepl(pattern, "muffleWarning") [10:56:19.019] if (muffled) [10:56:19.019] invokeRestart("muffleWarning") [10:56:19.019] } [10:56:19.019] else if (inherits(cond, "condition")) { [10:56:19.019] if (!is.null(pattern)) { [10:56:19.019] computeRestarts <- base::computeRestarts [10:56:19.019] grepl <- base::grepl [10:56:19.019] restarts <- computeRestarts(cond) [10:56:19.019] for (restart in restarts) { [10:56:19.019] name <- restart$name [10:56:19.019] if (is.null(name)) [10:56:19.019] next [10:56:19.019] if (!grepl(pattern, name)) [10:56:19.019] next [10:56:19.019] invokeRestart(restart) [10:56:19.019] muffled <- TRUE [10:56:19.019] break [10:56:19.019] } [10:56:19.019] } [10:56:19.019] } [10:56:19.019] invisible(muffled) [10:56:19.019] } [10:56:19.019] muffleCondition(cond, pattern = "^muffle") [10:56:19.019] } [10:56:19.019] } [10:56:19.019] } [10:56:19.019] })) [10:56:19.019] }, error = function(ex) { [10:56:19.019] base::structure(base::list(value = NULL, visible = NULL, [10:56:19.019] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:19.019] ...future.rng), started = ...future.startTime, [10:56:19.019] finished = Sys.time(), session_uuid = NA_character_, [10:56:19.019] version = "1.8"), class = "FutureResult") [10:56:19.019] }, finally = { [10:56:19.019] if (!identical(...future.workdir, getwd())) [10:56:19.019] setwd(...future.workdir) [10:56:19.019] { [10:56:19.019] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:19.019] ...future.oldOptions$nwarnings <- NULL [10:56:19.019] } [10:56:19.019] base::options(...future.oldOptions) [10:56:19.019] if (.Platform$OS.type == "windows") { [10:56:19.019] old_names <- names(...future.oldEnvVars) [10:56:19.019] envs <- base::Sys.getenv() [10:56:19.019] names <- names(envs) [10:56:19.019] common <- intersect(names, old_names) [10:56:19.019] added <- setdiff(names, old_names) [10:56:19.019] removed <- setdiff(old_names, names) [10:56:19.019] changed <- common[...future.oldEnvVars[common] != [10:56:19.019] envs[common]] [10:56:19.019] NAMES <- toupper(changed) [10:56:19.019] args <- list() [10:56:19.019] for (kk in seq_along(NAMES)) { [10:56:19.019] name <- changed[[kk]] [10:56:19.019] NAME <- NAMES[[kk]] [10:56:19.019] if (name != NAME && is.element(NAME, old_names)) [10:56:19.019] next [10:56:19.019] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:19.019] } [10:56:19.019] NAMES <- toupper(added) [10:56:19.019] for (kk in seq_along(NAMES)) { [10:56:19.019] name <- added[[kk]] [10:56:19.019] NAME <- NAMES[[kk]] [10:56:19.019] if (name != NAME && is.element(NAME, old_names)) [10:56:19.019] next [10:56:19.019] args[[name]] <- "" [10:56:19.019] } [10:56:19.019] NAMES <- toupper(removed) [10:56:19.019] for (kk in seq_along(NAMES)) { [10:56:19.019] name <- removed[[kk]] [10:56:19.019] NAME <- NAMES[[kk]] [10:56:19.019] if (name != NAME && is.element(NAME, old_names)) [10:56:19.019] next [10:56:19.019] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:19.019] } [10:56:19.019] if (length(args) > 0) [10:56:19.019] base::do.call(base::Sys.setenv, args = args) [10:56:19.019] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:19.019] } [10:56:19.019] else { [10:56:19.019] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:19.019] } [10:56:19.019] { [10:56:19.019] if (base::length(...future.futureOptionsAdded) > [10:56:19.019] 0L) { [10:56:19.019] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:19.019] base::names(opts) <- ...future.futureOptionsAdded [10:56:19.019] base::options(opts) [10:56:19.019] } [10:56:19.019] { [10:56:19.019] NULL [10:56:19.019] options(future.plan = NULL) [10:56:19.019] if (is.na(NA_character_)) [10:56:19.019] Sys.unsetenv("R_FUTURE_PLAN") [10:56:19.019] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:19.019] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:19.019] .init = FALSE) [10:56:19.019] } [10:56:19.019] } [10:56:19.019] } [10:56:19.019] }) [10:56:19.019] if (TRUE) { [10:56:19.019] base::sink(type = "output", split = FALSE) [10:56:19.019] if (TRUE) { [10:56:19.019] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:19.019] } [10:56:19.019] else { [10:56:19.019] ...future.result["stdout"] <- base::list(NULL) [10:56:19.019] } [10:56:19.019] base::close(...future.stdout) [10:56:19.019] ...future.stdout <- NULL [10:56:19.019] } [10:56:19.019] ...future.result$conditions <- ...future.conditions [10:56:19.019] ...future.result$finished <- base::Sys.time() [10:56:19.019] ...future.result [10:56:19.019] } [10:56:19.022] - Launch lazy future ... done [10:56:19.023] run() for 'MiraiFuture' ... done [10:56:19.023] getGlobalsAndPackages() ... [10:56:19.023] Searching for globals... [10:56:19.026] - globals found: [6] 'FUN', '[[', 'x', 'ii', '...', '.Internal' [10:56:19.026] Searching for globals ... DONE [10:56:19.026] Resolving globals: FALSE [10:56:19.026] Tweak future expression to call with '...' arguments ... [10:56:19.026] { [10:56:19.026] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [10:56:19.026] } [10:56:19.027] Tweak future expression to call with '...' arguments ... DONE [10:56:19.027] The total size of the 4 globals is 2.69 KiB (2752 bytes) [10:56:19.028] The total size of the 4 globals exported for future expression ('FUN(x[[ii]], ...)') is 2.69 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'FUN' (2.13 KiB of class 'function'), 'x' (456 bytes of class 'list') and 'ii' (56 bytes of class 'numeric') [10:56:19.028] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [10:56:19.028] [10:56:19.028] getGlobalsAndPackages() ... DONE [10:56:19.029] run() for 'Future' ... [10:56:19.029] - state: 'created' [10:56:19.029] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:19.031] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:19.031] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:19.032] - Field: 'label' [10:56:19.032] - Field: 'local' [10:56:19.032] - Field: 'owner' [10:56:19.032] - Field: 'envir' [10:56:19.032] - Field: 'packages' [10:56:19.033] - Field: 'gc' [10:56:19.033] - Field: 'conditions' [10:56:19.033] - Field: 'expr' [10:56:19.033] - Field: 'uuid' [10:56:19.033] - Field: 'seed' [10:56:19.033] - Field: 'version' [10:56:19.034] - Field: 'result' [10:56:19.034] - Field: 'asynchronous' [10:56:19.034] - Field: 'calls' [10:56:19.034] - Field: 'globals' [10:56:19.034] - Field: 'stdout' [10:56:19.034] - Field: 'earlySignal' [10:56:19.035] - Field: 'lazy' [10:56:19.035] - Field: 'state' [10:56:19.035] - Field: '.cluster' [10:56:19.035] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:19.035] - Launch lazy future ... [10:56:19.035] Packages needed by the future expression (n = 0): [10:56:19.036] Packages needed by future strategies (n = 0): [10:56:19.036] { [10:56:19.036] { [10:56:19.036] { [10:56:19.036] ...future.startTime <- base::Sys.time() [10:56:19.036] { [10:56:19.036] { [10:56:19.036] { [10:56:19.036] base::local({ [10:56:19.036] has_future <- base::requireNamespace("future", [10:56:19.036] quietly = TRUE) [10:56:19.036] if (has_future) { [10:56:19.036] ns <- base::getNamespace("future") [10:56:19.036] version <- ns[[".package"]][["version"]] [10:56:19.036] if (is.null(version)) [10:56:19.036] version <- utils::packageVersion("future") [10:56:19.036] } [10:56:19.036] else { [10:56:19.036] version <- NULL [10:56:19.036] } [10:56:19.036] if (!has_future || version < "1.8.0") { [10:56:19.036] info <- base::c(r_version = base::gsub("R version ", [10:56:19.036] "", base::R.version$version.string), [10:56:19.036] platform = base::sprintf("%s (%s-bit)", [10:56:19.036] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:19.036] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:19.036] "release", "version")], collapse = " "), [10:56:19.036] hostname = base::Sys.info()[["nodename"]]) [10:56:19.036] info <- base::sprintf("%s: %s", base::names(info), [10:56:19.036] info) [10:56:19.036] info <- base::paste(info, collapse = "; ") [10:56:19.036] if (!has_future) { [10:56:19.036] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:19.036] info) [10:56:19.036] } [10:56:19.036] else { [10:56:19.036] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:19.036] info, version) [10:56:19.036] } [10:56:19.036] base::stop(msg) [10:56:19.036] } [10:56:19.036] }) [10:56:19.036] } [10:56:19.036] ...future.strategy.old <- future::plan("list") [10:56:19.036] options(future.plan = NULL) [10:56:19.036] Sys.unsetenv("R_FUTURE_PLAN") [10:56:19.036] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:19.036] } [10:56:19.036] ...future.workdir <- getwd() [10:56:19.036] } [10:56:19.036] ...future.oldOptions <- base::as.list(base::.Options) [10:56:19.036] ...future.oldEnvVars <- base::Sys.getenv() [10:56:19.036] } [10:56:19.036] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:19.036] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:19.036] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:19.036] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:19.036] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:19.036] future.stdout.windows.reencode = NULL, width = 80L) [10:56:19.036] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:19.036] base::names(...future.oldOptions)) [10:56:19.036] } [10:56:19.036] if (FALSE) { [10:56:19.036] } [10:56:19.036] else { [10:56:19.036] if (TRUE) { [10:56:19.036] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:19.036] open = "w") [10:56:19.036] } [10:56:19.036] else { [10:56:19.036] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:19.036] windows = "NUL", "/dev/null"), open = "w") [10:56:19.036] } [10:56:19.036] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:19.036] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:19.036] base::sink(type = "output", split = FALSE) [10:56:19.036] base::close(...future.stdout) [10:56:19.036] }, add = TRUE) [10:56:19.036] } [10:56:19.036] ...future.frame <- base::sys.nframe() [10:56:19.036] ...future.conditions <- base::list() [10:56:19.036] ...future.rng <- base::globalenv()$.Random.seed [10:56:19.036] if (FALSE) { [10:56:19.036] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:19.036] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:19.036] } [10:56:19.036] ...future.result <- base::tryCatch({ [10:56:19.036] base::withCallingHandlers({ [10:56:19.036] ...future.value <- base::withVisible(base::local({ [10:56:19.036] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [10:56:19.036] })) [10:56:19.036] future::FutureResult(value = ...future.value$value, [10:56:19.036] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:19.036] ...future.rng), globalenv = if (FALSE) [10:56:19.036] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:19.036] ...future.globalenv.names)) [10:56:19.036] else NULL, started = ...future.startTime, version = "1.8") [10:56:19.036] }, condition = base::local({ [10:56:19.036] c <- base::c [10:56:19.036] inherits <- base::inherits [10:56:19.036] invokeRestart <- base::invokeRestart [10:56:19.036] length <- base::length [10:56:19.036] list <- base::list [10:56:19.036] seq.int <- base::seq.int [10:56:19.036] signalCondition <- base::signalCondition [10:56:19.036] sys.calls <- base::sys.calls [10:56:19.036] `[[` <- base::`[[` [10:56:19.036] `+` <- base::`+` [10:56:19.036] `<<-` <- base::`<<-` [10:56:19.036] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:19.036] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:19.036] 3L)] [10:56:19.036] } [10:56:19.036] function(cond) { [10:56:19.036] is_error <- inherits(cond, "error") [10:56:19.036] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:19.036] NULL) [10:56:19.036] if (is_error) { [10:56:19.036] sessionInformation <- function() { [10:56:19.036] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:19.036] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:19.036] search = base::search(), system = base::Sys.info()) [10:56:19.036] } [10:56:19.036] ...future.conditions[[length(...future.conditions) + [10:56:19.036] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:19.036] cond$call), session = sessionInformation(), [10:56:19.036] timestamp = base::Sys.time(), signaled = 0L) [10:56:19.036] signalCondition(cond) [10:56:19.036] } [10:56:19.036] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:19.036] signal <- FALSE && inherits(cond, character(0)) [10:56:19.036] ...future.conditions[[length(...future.conditions) + [10:56:19.036] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:19.036] if (FALSE && !signal) { [10:56:19.036] muffleCondition <- function (cond, pattern = "^muffle") [10:56:19.036] { [10:56:19.036] inherits <- base::inherits [10:56:19.036] invokeRestart <- base::invokeRestart [10:56:19.036] is.null <- base::is.null [10:56:19.036] muffled <- FALSE [10:56:19.036] if (inherits(cond, "message")) { [10:56:19.036] muffled <- grepl(pattern, "muffleMessage") [10:56:19.036] if (muffled) [10:56:19.036] invokeRestart("muffleMessage") [10:56:19.036] } [10:56:19.036] else if (inherits(cond, "warning")) { [10:56:19.036] muffled <- grepl(pattern, "muffleWarning") [10:56:19.036] if (muffled) [10:56:19.036] invokeRestart("muffleWarning") [10:56:19.036] } [10:56:19.036] else if (inherits(cond, "condition")) { [10:56:19.036] if (!is.null(pattern)) { [10:56:19.036] computeRestarts <- base::computeRestarts [10:56:19.036] grepl <- base::grepl [10:56:19.036] restarts <- computeRestarts(cond) [10:56:19.036] for (restart in restarts) { [10:56:19.036] name <- restart$name [10:56:19.036] if (is.null(name)) [10:56:19.036] next [10:56:19.036] if (!grepl(pattern, name)) [10:56:19.036] next [10:56:19.036] invokeRestart(restart) [10:56:19.036] muffled <- TRUE [10:56:19.036] break [10:56:19.036] } [10:56:19.036] } [10:56:19.036] } [10:56:19.036] invisible(muffled) [10:56:19.036] } [10:56:19.036] muffleCondition(cond, pattern = "^muffle") [10:56:19.036] } [10:56:19.036] } [10:56:19.036] else { [10:56:19.036] if (TRUE) { [10:56:19.036] muffleCondition <- function (cond, pattern = "^muffle") [10:56:19.036] { [10:56:19.036] inherits <- base::inherits [10:56:19.036] invokeRestart <- base::invokeRestart [10:56:19.036] is.null <- base::is.null [10:56:19.036] muffled <- FALSE [10:56:19.036] if (inherits(cond, "message")) { [10:56:19.036] muffled <- grepl(pattern, "muffleMessage") [10:56:19.036] if (muffled) [10:56:19.036] invokeRestart("muffleMessage") [10:56:19.036] } [10:56:19.036] else if (inherits(cond, "warning")) { [10:56:19.036] muffled <- grepl(pattern, "muffleWarning") [10:56:19.036] if (muffled) [10:56:19.036] invokeRestart("muffleWarning") [10:56:19.036] } [10:56:19.036] else if (inherits(cond, "condition")) { [10:56:19.036] if (!is.null(pattern)) { [10:56:19.036] computeRestarts <- base::computeRestarts [10:56:19.036] grepl <- base::grepl [10:56:19.036] restarts <- computeRestarts(cond) [10:56:19.036] for (restart in restarts) { [10:56:19.036] name <- restart$name [10:56:19.036] if (is.null(name)) [10:56:19.036] next [10:56:19.036] if (!grepl(pattern, name)) [10:56:19.036] next [10:56:19.036] invokeRestart(restart) [10:56:19.036] muffled <- TRUE [10:56:19.036] break [10:56:19.036] } [10:56:19.036] } [10:56:19.036] } [10:56:19.036] invisible(muffled) [10:56:19.036] } [10:56:19.036] muffleCondition(cond, pattern = "^muffle") [10:56:19.036] } [10:56:19.036] } [10:56:19.036] } [10:56:19.036] })) [10:56:19.036] }, error = function(ex) { [10:56:19.036] base::structure(base::list(value = NULL, visible = NULL, [10:56:19.036] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:19.036] ...future.rng), started = ...future.startTime, [10:56:19.036] finished = Sys.time(), session_uuid = NA_character_, [10:56:19.036] version = "1.8"), class = "FutureResult") [10:56:19.036] }, finally = { [10:56:19.036] if (!identical(...future.workdir, getwd())) [10:56:19.036] setwd(...future.workdir) [10:56:19.036] { [10:56:19.036] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:19.036] ...future.oldOptions$nwarnings <- NULL [10:56:19.036] } [10:56:19.036] base::options(...future.oldOptions) [10:56:19.036] if (.Platform$OS.type == "windows") { [10:56:19.036] old_names <- names(...future.oldEnvVars) [10:56:19.036] envs <- base::Sys.getenv() [10:56:19.036] names <- names(envs) [10:56:19.036] common <- intersect(names, old_names) [10:56:19.036] added <- setdiff(names, old_names) [10:56:19.036] removed <- setdiff(old_names, names) [10:56:19.036] changed <- common[...future.oldEnvVars[common] != [10:56:19.036] envs[common]] [10:56:19.036] NAMES <- toupper(changed) [10:56:19.036] args <- list() [10:56:19.036] for (kk in seq_along(NAMES)) { [10:56:19.036] name <- changed[[kk]] [10:56:19.036] NAME <- NAMES[[kk]] [10:56:19.036] if (name != NAME && is.element(NAME, old_names)) [10:56:19.036] next [10:56:19.036] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:19.036] } [10:56:19.036] NAMES <- toupper(added) [10:56:19.036] for (kk in seq_along(NAMES)) { [10:56:19.036] name <- added[[kk]] [10:56:19.036] NAME <- NAMES[[kk]] [10:56:19.036] if (name != NAME && is.element(NAME, old_names)) [10:56:19.036] next [10:56:19.036] args[[name]] <- "" [10:56:19.036] } [10:56:19.036] NAMES <- toupper(removed) [10:56:19.036] for (kk in seq_along(NAMES)) { [10:56:19.036] name <- removed[[kk]] [10:56:19.036] NAME <- NAMES[[kk]] [10:56:19.036] if (name != NAME && is.element(NAME, old_names)) [10:56:19.036] next [10:56:19.036] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:19.036] } [10:56:19.036] if (length(args) > 0) [10:56:19.036] base::do.call(base::Sys.setenv, args = args) [10:56:19.036] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:19.036] } [10:56:19.036] else { [10:56:19.036] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:19.036] } [10:56:19.036] { [10:56:19.036] if (base::length(...future.futureOptionsAdded) > [10:56:19.036] 0L) { [10:56:19.036] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:19.036] base::names(opts) <- ...future.futureOptionsAdded [10:56:19.036] base::options(opts) [10:56:19.036] } [10:56:19.036] { [10:56:19.036] NULL [10:56:19.036] options(future.plan = NULL) [10:56:19.036] if (is.na(NA_character_)) [10:56:19.036] Sys.unsetenv("R_FUTURE_PLAN") [10:56:19.036] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:19.036] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:19.036] .init = FALSE) [10:56:19.036] } [10:56:19.036] } [10:56:19.036] } [10:56:19.036] }) [10:56:19.036] if (TRUE) { [10:56:19.036] base::sink(type = "output", split = FALSE) [10:56:19.036] if (TRUE) { [10:56:19.036] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:19.036] } [10:56:19.036] else { [10:56:19.036] ...future.result["stdout"] <- base::list(NULL) [10:56:19.036] } [10:56:19.036] base::close(...future.stdout) [10:56:19.036] ...future.stdout <- NULL [10:56:19.036] } [10:56:19.036] ...future.result$conditions <- ...future.conditions [10:56:19.036] ...future.result$finished <- base::Sys.time() [10:56:19.036] ...future.result [10:56:19.036] } [10:56:19.040] - Launch lazy future ... done [10:56:19.040] run() for 'MiraiFuture' ... done [10:56:19.041] getGlobalsAndPackages() ... [10:56:19.041] Searching for globals... [10:56:19.043] - globals found: [6] 'FUN', '[[', 'x', 'ii', '...', '.Internal' [10:56:19.043] Searching for globals ... DONE [10:56:19.044] Resolving globals: FALSE [10:56:19.044] Tweak future expression to call with '...' arguments ... [10:56:19.044] { [10:56:19.044] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [10:56:19.044] } [10:56:19.044] Tweak future expression to call with '...' arguments ... DONE [10:56:19.045] The total size of the 4 globals is 2.69 KiB (2752 bytes) [10:56:19.045] The total size of the 4 globals exported for future expression ('FUN(x[[ii]], ...)') is 2.69 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'FUN' (2.13 KiB of class 'function'), 'x' (456 bytes of class 'list') and 'ii' (56 bytes of class 'numeric') [10:56:19.046] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [10:56:19.046] [10:56:19.046] getGlobalsAndPackages() ... DONE [10:56:19.046] run() for 'Future' ... [10:56:19.046] - state: 'created' [10:56:19.047] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:19.049] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:19.049] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:19.049] - Field: 'label' [10:56:19.050] - Field: 'local' [10:56:19.050] - Field: 'owner' [10:56:19.050] - Field: 'envir' [10:56:19.050] - Field: 'packages' [10:56:19.050] - Field: 'gc' [10:56:19.050] - Field: 'conditions' [10:56:19.051] - Field: 'expr' [10:56:19.051] - Field: 'uuid' [10:56:19.051] - Field: 'seed' [10:56:19.051] - Field: 'version' [10:56:19.051] - Field: 'result' [10:56:19.051] - Field: 'asynchronous' [10:56:19.052] - Field: 'calls' [10:56:19.053] - Field: 'globals' [10:56:19.053] - Field: 'stdout' [10:56:19.053] - Field: 'earlySignal' [10:56:19.053] - Field: 'lazy' [10:56:19.054] - Field: 'state' [10:56:19.054] - Field: '.cluster' [10:56:19.054] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:19.054] - Launch lazy future ... [10:56:19.054] Packages needed by the future expression (n = 0): [10:56:19.055] Packages needed by future strategies (n = 0): [10:56:19.055] { [10:56:19.055] { [10:56:19.055] { [10:56:19.055] ...future.startTime <- base::Sys.time() [10:56:19.055] { [10:56:19.055] { [10:56:19.055] { [10:56:19.055] base::local({ [10:56:19.055] has_future <- base::requireNamespace("future", [10:56:19.055] quietly = TRUE) [10:56:19.055] if (has_future) { [10:56:19.055] ns <- base::getNamespace("future") [10:56:19.055] version <- ns[[".package"]][["version"]] [10:56:19.055] if (is.null(version)) [10:56:19.055] version <- utils::packageVersion("future") [10:56:19.055] } [10:56:19.055] else { [10:56:19.055] version <- NULL [10:56:19.055] } [10:56:19.055] if (!has_future || version < "1.8.0") { [10:56:19.055] info <- base::c(r_version = base::gsub("R version ", [10:56:19.055] "", base::R.version$version.string), [10:56:19.055] platform = base::sprintf("%s (%s-bit)", [10:56:19.055] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:19.055] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:19.055] "release", "version")], collapse = " "), [10:56:19.055] hostname = base::Sys.info()[["nodename"]]) [10:56:19.055] info <- base::sprintf("%s: %s", base::names(info), [10:56:19.055] info) [10:56:19.055] info <- base::paste(info, collapse = "; ") [10:56:19.055] if (!has_future) { [10:56:19.055] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:19.055] info) [10:56:19.055] } [10:56:19.055] else { [10:56:19.055] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:19.055] info, version) [10:56:19.055] } [10:56:19.055] base::stop(msg) [10:56:19.055] } [10:56:19.055] }) [10:56:19.055] } [10:56:19.055] ...future.strategy.old <- future::plan("list") [10:56:19.055] options(future.plan = NULL) [10:56:19.055] Sys.unsetenv("R_FUTURE_PLAN") [10:56:19.055] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:19.055] } [10:56:19.055] ...future.workdir <- getwd() [10:56:19.055] } [10:56:19.055] ...future.oldOptions <- base::as.list(base::.Options) [10:56:19.055] ...future.oldEnvVars <- base::Sys.getenv() [10:56:19.055] } [10:56:19.055] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:19.055] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:19.055] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:19.055] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:19.055] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:19.055] future.stdout.windows.reencode = NULL, width = 80L) [10:56:19.055] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:19.055] base::names(...future.oldOptions)) [10:56:19.055] } [10:56:19.055] if (FALSE) { [10:56:19.055] } [10:56:19.055] else { [10:56:19.055] if (TRUE) { [10:56:19.055] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:19.055] open = "w") [10:56:19.055] } [10:56:19.055] else { [10:56:19.055] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:19.055] windows = "NUL", "/dev/null"), open = "w") [10:56:19.055] } [10:56:19.055] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:19.055] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:19.055] base::sink(type = "output", split = FALSE) [10:56:19.055] base::close(...future.stdout) [10:56:19.055] }, add = TRUE) [10:56:19.055] } [10:56:19.055] ...future.frame <- base::sys.nframe() [10:56:19.055] ...future.conditions <- base::list() [10:56:19.055] ...future.rng <- base::globalenv()$.Random.seed [10:56:19.055] if (FALSE) { [10:56:19.055] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:19.055] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:19.055] } [10:56:19.055] ...future.result <- base::tryCatch({ [10:56:19.055] base::withCallingHandlers({ [10:56:19.055] ...future.value <- base::withVisible(base::local({ [10:56:19.055] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [10:56:19.055] })) [10:56:19.055] future::FutureResult(value = ...future.value$value, [10:56:19.055] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:19.055] ...future.rng), globalenv = if (FALSE) [10:56:19.055] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:19.055] ...future.globalenv.names)) [10:56:19.055] else NULL, started = ...future.startTime, version = "1.8") [10:56:19.055] }, condition = base::local({ [10:56:19.055] c <- base::c [10:56:19.055] inherits <- base::inherits [10:56:19.055] invokeRestart <- base::invokeRestart [10:56:19.055] length <- base::length [10:56:19.055] list <- base::list [10:56:19.055] seq.int <- base::seq.int [10:56:19.055] signalCondition <- base::signalCondition [10:56:19.055] sys.calls <- base::sys.calls [10:56:19.055] `[[` <- base::`[[` [10:56:19.055] `+` <- base::`+` [10:56:19.055] `<<-` <- base::`<<-` [10:56:19.055] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:19.055] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:19.055] 3L)] [10:56:19.055] } [10:56:19.055] function(cond) { [10:56:19.055] is_error <- inherits(cond, "error") [10:56:19.055] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:19.055] NULL) [10:56:19.055] if (is_error) { [10:56:19.055] sessionInformation <- function() { [10:56:19.055] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:19.055] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:19.055] search = base::search(), system = base::Sys.info()) [10:56:19.055] } [10:56:19.055] ...future.conditions[[length(...future.conditions) + [10:56:19.055] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:19.055] cond$call), session = sessionInformation(), [10:56:19.055] timestamp = base::Sys.time(), signaled = 0L) [10:56:19.055] signalCondition(cond) [10:56:19.055] } [10:56:19.055] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:19.055] signal <- FALSE && inherits(cond, character(0)) [10:56:19.055] ...future.conditions[[length(...future.conditions) + [10:56:19.055] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:19.055] if (FALSE && !signal) { [10:56:19.055] muffleCondition <- function (cond, pattern = "^muffle") [10:56:19.055] { [10:56:19.055] inherits <- base::inherits [10:56:19.055] invokeRestart <- base::invokeRestart [10:56:19.055] is.null <- base::is.null [10:56:19.055] muffled <- FALSE [10:56:19.055] if (inherits(cond, "message")) { [10:56:19.055] muffled <- grepl(pattern, "muffleMessage") [10:56:19.055] if (muffled) [10:56:19.055] invokeRestart("muffleMessage") [10:56:19.055] } [10:56:19.055] else if (inherits(cond, "warning")) { [10:56:19.055] muffled <- grepl(pattern, "muffleWarning") [10:56:19.055] if (muffled) [10:56:19.055] invokeRestart("muffleWarning") [10:56:19.055] } [10:56:19.055] else if (inherits(cond, "condition")) { [10:56:19.055] if (!is.null(pattern)) { [10:56:19.055] computeRestarts <- base::computeRestarts [10:56:19.055] grepl <- base::grepl [10:56:19.055] restarts <- computeRestarts(cond) [10:56:19.055] for (restart in restarts) { [10:56:19.055] name <- restart$name [10:56:19.055] if (is.null(name)) [10:56:19.055] next [10:56:19.055] if (!grepl(pattern, name)) [10:56:19.055] next [10:56:19.055] invokeRestart(restart) [10:56:19.055] muffled <- TRUE [10:56:19.055] break [10:56:19.055] } [10:56:19.055] } [10:56:19.055] } [10:56:19.055] invisible(muffled) [10:56:19.055] } [10:56:19.055] muffleCondition(cond, pattern = "^muffle") [10:56:19.055] } [10:56:19.055] } [10:56:19.055] else { [10:56:19.055] if (TRUE) { [10:56:19.055] muffleCondition <- function (cond, pattern = "^muffle") [10:56:19.055] { [10:56:19.055] inherits <- base::inherits [10:56:19.055] invokeRestart <- base::invokeRestart [10:56:19.055] is.null <- base::is.null [10:56:19.055] muffled <- FALSE [10:56:19.055] if (inherits(cond, "message")) { [10:56:19.055] muffled <- grepl(pattern, "muffleMessage") [10:56:19.055] if (muffled) [10:56:19.055] invokeRestart("muffleMessage") [10:56:19.055] } [10:56:19.055] else if (inherits(cond, "warning")) { [10:56:19.055] muffled <- grepl(pattern, "muffleWarning") [10:56:19.055] if (muffled) [10:56:19.055] invokeRestart("muffleWarning") [10:56:19.055] } [10:56:19.055] else if (inherits(cond, "condition")) { [10:56:19.055] if (!is.null(pattern)) { [10:56:19.055] computeRestarts <- base::computeRestarts [10:56:19.055] grepl <- base::grepl [10:56:19.055] restarts <- computeRestarts(cond) [10:56:19.055] for (restart in restarts) { [10:56:19.055] name <- restart$name [10:56:19.055] if (is.null(name)) [10:56:19.055] next [10:56:19.055] if (!grepl(pattern, name)) [10:56:19.055] next [10:56:19.055] invokeRestart(restart) [10:56:19.055] muffled <- TRUE [10:56:19.055] break [10:56:19.055] } [10:56:19.055] } [10:56:19.055] } [10:56:19.055] invisible(muffled) [10:56:19.055] } [10:56:19.055] muffleCondition(cond, pattern = "^muffle") [10:56:19.055] } [10:56:19.055] } [10:56:19.055] } [10:56:19.055] })) [10:56:19.055] }, error = function(ex) { [10:56:19.055] base::structure(base::list(value = NULL, visible = NULL, [10:56:19.055] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:19.055] ...future.rng), started = ...future.startTime, [10:56:19.055] finished = Sys.time(), session_uuid = NA_character_, [10:56:19.055] version = "1.8"), class = "FutureResult") [10:56:19.055] }, finally = { [10:56:19.055] if (!identical(...future.workdir, getwd())) [10:56:19.055] setwd(...future.workdir) [10:56:19.055] { [10:56:19.055] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:19.055] ...future.oldOptions$nwarnings <- NULL [10:56:19.055] } [10:56:19.055] base::options(...future.oldOptions) [10:56:19.055] if (.Platform$OS.type == "windows") { [10:56:19.055] old_names <- names(...future.oldEnvVars) [10:56:19.055] envs <- base::Sys.getenv() [10:56:19.055] names <- names(envs) [10:56:19.055] common <- intersect(names, old_names) [10:56:19.055] added <- setdiff(names, old_names) [10:56:19.055] removed <- setdiff(old_names, names) [10:56:19.055] changed <- common[...future.oldEnvVars[common] != [10:56:19.055] envs[common]] [10:56:19.055] NAMES <- toupper(changed) [10:56:19.055] args <- list() [10:56:19.055] for (kk in seq_along(NAMES)) { [10:56:19.055] name <- changed[[kk]] [10:56:19.055] NAME <- NAMES[[kk]] [10:56:19.055] if (name != NAME && is.element(NAME, old_names)) [10:56:19.055] next [10:56:19.055] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:19.055] } [10:56:19.055] NAMES <- toupper(added) [10:56:19.055] for (kk in seq_along(NAMES)) { [10:56:19.055] name <- added[[kk]] [10:56:19.055] NAME <- NAMES[[kk]] [10:56:19.055] if (name != NAME && is.element(NAME, old_names)) [10:56:19.055] next [10:56:19.055] args[[name]] <- "" [10:56:19.055] } [10:56:19.055] NAMES <- toupper(removed) [10:56:19.055] for (kk in seq_along(NAMES)) { [10:56:19.055] name <- removed[[kk]] [10:56:19.055] NAME <- NAMES[[kk]] [10:56:19.055] if (name != NAME && is.element(NAME, old_names)) [10:56:19.055] next [10:56:19.055] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:19.055] } [10:56:19.055] if (length(args) > 0) [10:56:19.055] base::do.call(base::Sys.setenv, args = args) [10:56:19.055] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:19.055] } [10:56:19.055] else { [10:56:19.055] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:19.055] } [10:56:19.055] { [10:56:19.055] if (base::length(...future.futureOptionsAdded) > [10:56:19.055] 0L) { [10:56:19.055] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:19.055] base::names(opts) <- ...future.futureOptionsAdded [10:56:19.055] base::options(opts) [10:56:19.055] } [10:56:19.055] { [10:56:19.055] NULL [10:56:19.055] options(future.plan = NULL) [10:56:19.055] if (is.na(NA_character_)) [10:56:19.055] Sys.unsetenv("R_FUTURE_PLAN") [10:56:19.055] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:19.055] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:19.055] .init = FALSE) [10:56:19.055] } [10:56:19.055] } [10:56:19.055] } [10:56:19.055] }) [10:56:19.055] if (TRUE) { [10:56:19.055] base::sink(type = "output", split = FALSE) [10:56:19.055] if (TRUE) { [10:56:19.055] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:19.055] } [10:56:19.055] else { [10:56:19.055] ...future.result["stdout"] <- base::list(NULL) [10:56:19.055] } [10:56:19.055] base::close(...future.stdout) [10:56:19.055] ...future.stdout <- NULL [10:56:19.055] } [10:56:19.055] ...future.result$conditions <- ...future.conditions [10:56:19.055] ...future.result$finished <- base::Sys.time() [10:56:19.055] ...future.result [10:56:19.055] } [10:56:19.059] - Launch lazy future ... done [10:56:19.059] run() for 'MiraiFuture' ... done > str(list(y = y)) List of 1 $ y:List of 4 ..$ a: int [1:2] 0 0 ..$ b: num [1:2] 0 0 ..$ c: chr [1:2] "" "" ..$ c:List of 2 .. ..$ : NULL .. ..$ : NULL > stopifnot(identical(y, y0)) > > > message("- flapply(x, FUN = future:::hpaste, ...) ...") - flapply(x, FUN = future:::hpaste, ...) ... > > x <- list(a = c("hello", b = 1:100)) > str(list(x = x)) List of 1 $ x:List of 1 ..$ a: Named chr [1:101] "hello" "1" "2" "3" ... .. ..- attr(*, "names")= chr [1:101] "" "b1" "b2" "b3" ... > > y0 <- lapply(x, FUN = future:::hpaste, collapse = "; ", maxHead = 3L) > str(list(y0 = y0)) List of 1 $ y0:List of 1 ..$ a: chr "hello; 1; 2; ...; 100" > > y <- flapply(x, FUN = future:::hpaste, collapse = "; ", maxHead = 3L) [10:56:19.067] getGlobalsAndPackages() ... [10:56:19.067] Searching for globals... [10:56:19.078] - globals found: [26] 'FUN', '[[', 'x', 'ii', '...', 'if', 'missing', 'is.finite', '{', 'is.null', '<-', 'paste', 'length', '==', 'return', '>', '+', '[', 'seq_len', 'rev', 'c', '&&', '!', ':', '(', '-' [10:56:19.078] Searching for globals ... DONE [10:56:19.078] Resolving globals: FALSE [10:56:19.079] Tweak future expression to call with '...' arguments ... [10:56:19.079] { [10:56:19.079] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [10:56:19.079] } [10:56:19.079] Tweak future expression to call with '...' arguments ... DONE [10:56:19.081] The total size of the 4 globals is 82.66 KiB (84648 bytes) [10:56:19.082] The total size of the 4 globals exported for future expression ('FUN(x[[ii]], ...)') is 82.66 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'FUN' (69.62 KiB of class 'function'), 'x' (12.83 KiB of class 'list') and 'future.call.arguments' (168 bytes of class 'list') [10:56:19.082] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [10:56:19.082] - packages: [1] 'future' [10:56:19.083] getGlobalsAndPackages() ... DONE [10:56:19.083] run() for 'Future' ... [10:56:19.083] - state: 'created' [10:56:19.083] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:19.086] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:19.086] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:19.086] - Field: 'label' [10:56:19.086] - Field: 'local' [10:56:19.086] - Field: 'owner' [10:56:19.087] - Field: 'envir' [10:56:19.087] - Field: 'packages' [10:56:19.087] - Field: 'gc' [10:56:19.087] - Field: 'conditions' [10:56:19.087] - Field: 'expr' [10:56:19.087] - Field: 'uuid' [10:56:19.088] - Field: 'seed' [10:56:19.088] - Field: 'version' [10:56:19.088] - Field: 'result' [10:56:19.088] - Field: 'asynchronous' [10:56:19.088] - Field: 'calls' [10:56:19.088] - Field: 'globals' [10:56:19.089] - Field: 'stdout' [10:56:19.089] - Field: 'earlySignal' [10:56:19.089] - Field: 'lazy' [10:56:19.089] - Field: 'state' [10:56:19.089] - Field: '.cluster' [10:56:19.089] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:19.090] - Launch lazy future ... [10:56:19.090] Packages needed by the future expression (n = 1): 'future' [10:56:19.090] Packages needed by future strategies (n = 0): [10:56:19.091] { [10:56:19.091] { [10:56:19.091] { [10:56:19.091] ...future.startTime <- base::Sys.time() [10:56:19.091] { [10:56:19.091] { [10:56:19.091] { [10:56:19.091] { [10:56:19.091] base::local({ [10:56:19.091] has_future <- base::requireNamespace("future", [10:56:19.091] quietly = TRUE) [10:56:19.091] if (has_future) { [10:56:19.091] ns <- base::getNamespace("future") [10:56:19.091] version <- ns[[".package"]][["version"]] [10:56:19.091] if (is.null(version)) [10:56:19.091] version <- utils::packageVersion("future") [10:56:19.091] } [10:56:19.091] else { [10:56:19.091] version <- NULL [10:56:19.091] } [10:56:19.091] if (!has_future || version < "1.8.0") { [10:56:19.091] info <- base::c(r_version = base::gsub("R version ", [10:56:19.091] "", base::R.version$version.string), [10:56:19.091] platform = base::sprintf("%s (%s-bit)", [10:56:19.091] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:19.091] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:19.091] "release", "version")], collapse = " "), [10:56:19.091] hostname = base::Sys.info()[["nodename"]]) [10:56:19.091] info <- base::sprintf("%s: %s", base::names(info), [10:56:19.091] info) [10:56:19.091] info <- base::paste(info, collapse = "; ") [10:56:19.091] if (!has_future) { [10:56:19.091] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:19.091] info) [10:56:19.091] } [10:56:19.091] else { [10:56:19.091] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:19.091] info, version) [10:56:19.091] } [10:56:19.091] base::stop(msg) [10:56:19.091] } [10:56:19.091] }) [10:56:19.091] } [10:56:19.091] base::local({ [10:56:19.091] for (pkg in "future") { [10:56:19.091] base::loadNamespace(pkg) [10:56:19.091] base::library(pkg, character.only = TRUE) [10:56:19.091] } [10:56:19.091] }) [10:56:19.091] } [10:56:19.091] ...future.strategy.old <- future::plan("list") [10:56:19.091] options(future.plan = NULL) [10:56:19.091] Sys.unsetenv("R_FUTURE_PLAN") [10:56:19.091] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:19.091] } [10:56:19.091] ...future.workdir <- getwd() [10:56:19.091] } [10:56:19.091] ...future.oldOptions <- base::as.list(base::.Options) [10:56:19.091] ...future.oldEnvVars <- base::Sys.getenv() [10:56:19.091] } [10:56:19.091] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:19.091] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:19.091] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:19.091] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:19.091] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:19.091] future.stdout.windows.reencode = NULL, width = 80L) [10:56:19.091] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:19.091] base::names(...future.oldOptions)) [10:56:19.091] } [10:56:19.091] if (FALSE) { [10:56:19.091] } [10:56:19.091] else { [10:56:19.091] if (TRUE) { [10:56:19.091] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:19.091] open = "w") [10:56:19.091] } [10:56:19.091] else { [10:56:19.091] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:19.091] windows = "NUL", "/dev/null"), open = "w") [10:56:19.091] } [10:56:19.091] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:19.091] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:19.091] base::sink(type = "output", split = FALSE) [10:56:19.091] base::close(...future.stdout) [10:56:19.091] }, add = TRUE) [10:56:19.091] } [10:56:19.091] ...future.frame <- base::sys.nframe() [10:56:19.091] ...future.conditions <- base::list() [10:56:19.091] ...future.rng <- base::globalenv()$.Random.seed [10:56:19.091] if (FALSE) { [10:56:19.091] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:19.091] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:19.091] } [10:56:19.091] ...future.result <- base::tryCatch({ [10:56:19.091] base::withCallingHandlers({ [10:56:19.091] ...future.value <- base::withVisible(base::local({ [10:56:19.091] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [10:56:19.091] })) [10:56:19.091] future::FutureResult(value = ...future.value$value, [10:56:19.091] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:19.091] ...future.rng), globalenv = if (FALSE) [10:56:19.091] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:19.091] ...future.globalenv.names)) [10:56:19.091] else NULL, started = ...future.startTime, version = "1.8") [10:56:19.091] }, condition = base::local({ [10:56:19.091] c <- base::c [10:56:19.091] inherits <- base::inherits [10:56:19.091] invokeRestart <- base::invokeRestart [10:56:19.091] length <- base::length [10:56:19.091] list <- base::list [10:56:19.091] seq.int <- base::seq.int [10:56:19.091] signalCondition <- base::signalCondition [10:56:19.091] sys.calls <- base::sys.calls [10:56:19.091] `[[` <- base::`[[` [10:56:19.091] `+` <- base::`+` [10:56:19.091] `<<-` <- base::`<<-` [10:56:19.091] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:19.091] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:19.091] 3L)] [10:56:19.091] } [10:56:19.091] function(cond) { [10:56:19.091] is_error <- inherits(cond, "error") [10:56:19.091] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:19.091] NULL) [10:56:19.091] if (is_error) { [10:56:19.091] sessionInformation <- function() { [10:56:19.091] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:19.091] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:19.091] search = base::search(), system = base::Sys.info()) [10:56:19.091] } [10:56:19.091] ...future.conditions[[length(...future.conditions) + [10:56:19.091] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:19.091] cond$call), session = sessionInformation(), [10:56:19.091] timestamp = base::Sys.time(), signaled = 0L) [10:56:19.091] signalCondition(cond) [10:56:19.091] } [10:56:19.091] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:19.091] signal <- FALSE && inherits(cond, character(0)) [10:56:19.091] ...future.conditions[[length(...future.conditions) + [10:56:19.091] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:19.091] if (FALSE && !signal) { [10:56:19.091] muffleCondition <- function (cond, pattern = "^muffle") [10:56:19.091] { [10:56:19.091] inherits <- base::inherits [10:56:19.091] invokeRestart <- base::invokeRestart [10:56:19.091] is.null <- base::is.null [10:56:19.091] muffled <- FALSE [10:56:19.091] if (inherits(cond, "message")) { [10:56:19.091] muffled <- grepl(pattern, "muffleMessage") [10:56:19.091] if (muffled) [10:56:19.091] invokeRestart("muffleMessage") [10:56:19.091] } [10:56:19.091] else if (inherits(cond, "warning")) { [10:56:19.091] muffled <- grepl(pattern, "muffleWarning") [10:56:19.091] if (muffled) [10:56:19.091] invokeRestart("muffleWarning") [10:56:19.091] } [10:56:19.091] else if (inherits(cond, "condition")) { [10:56:19.091] if (!is.null(pattern)) { [10:56:19.091] computeRestarts <- base::computeRestarts [10:56:19.091] grepl <- base::grepl [10:56:19.091] restarts <- computeRestarts(cond) [10:56:19.091] for (restart in restarts) { [10:56:19.091] name <- restart$name [10:56:19.091] if (is.null(name)) [10:56:19.091] next [10:56:19.091] if (!grepl(pattern, name)) [10:56:19.091] next [10:56:19.091] invokeRestart(restart) [10:56:19.091] muffled <- TRUE [10:56:19.091] break [10:56:19.091] } [10:56:19.091] } [10:56:19.091] } [10:56:19.091] invisible(muffled) [10:56:19.091] } [10:56:19.091] muffleCondition(cond, pattern = "^muffle") [10:56:19.091] } [10:56:19.091] } [10:56:19.091] else { [10:56:19.091] if (TRUE) { [10:56:19.091] muffleCondition <- function (cond, pattern = "^muffle") [10:56:19.091] { [10:56:19.091] inherits <- base::inherits [10:56:19.091] invokeRestart <- base::invokeRestart [10:56:19.091] is.null <- base::is.null [10:56:19.091] muffled <- FALSE [10:56:19.091] if (inherits(cond, "message")) { [10:56:19.091] muffled <- grepl(pattern, "muffleMessage") [10:56:19.091] if (muffled) [10:56:19.091] invokeRestart("muffleMessage") [10:56:19.091] } [10:56:19.091] else if (inherits(cond, "warning")) { [10:56:19.091] muffled <- grepl(pattern, "muffleWarning") [10:56:19.091] if (muffled) [10:56:19.091] invokeRestart("muffleWarning") [10:56:19.091] } [10:56:19.091] else if (inherits(cond, "condition")) { [10:56:19.091] if (!is.null(pattern)) { [10:56:19.091] computeRestarts <- base::computeRestarts [10:56:19.091] grepl <- base::grepl [10:56:19.091] restarts <- computeRestarts(cond) [10:56:19.091] for (restart in restarts) { [10:56:19.091] name <- restart$name [10:56:19.091] if (is.null(name)) [10:56:19.091] next [10:56:19.091] if (!grepl(pattern, name)) [10:56:19.091] next [10:56:19.091] invokeRestart(restart) [10:56:19.091] muffled <- TRUE [10:56:19.091] break [10:56:19.091] } [10:56:19.091] } [10:56:19.091] } [10:56:19.091] invisible(muffled) [10:56:19.091] } [10:56:19.091] muffleCondition(cond, pattern = "^muffle") [10:56:19.091] } [10:56:19.091] } [10:56:19.091] } [10:56:19.091] })) [10:56:19.091] }, error = function(ex) { [10:56:19.091] base::structure(base::list(value = NULL, visible = NULL, [10:56:19.091] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:19.091] ...future.rng), started = ...future.startTime, [10:56:19.091] finished = Sys.time(), session_uuid = NA_character_, [10:56:19.091] version = "1.8"), class = "FutureResult") [10:56:19.091] }, finally = { [10:56:19.091] if (!identical(...future.workdir, getwd())) [10:56:19.091] setwd(...future.workdir) [10:56:19.091] { [10:56:19.091] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:19.091] ...future.oldOptions$nwarnings <- NULL [10:56:19.091] } [10:56:19.091] base::options(...future.oldOptions) [10:56:19.091] if (.Platform$OS.type == "windows") { [10:56:19.091] old_names <- names(...future.oldEnvVars) [10:56:19.091] envs <- base::Sys.getenv() [10:56:19.091] names <- names(envs) [10:56:19.091] common <- intersect(names, old_names) [10:56:19.091] added <- setdiff(names, old_names) [10:56:19.091] removed <- setdiff(old_names, names) [10:56:19.091] changed <- common[...future.oldEnvVars[common] != [10:56:19.091] envs[common]] [10:56:19.091] NAMES <- toupper(changed) [10:56:19.091] args <- list() [10:56:19.091] for (kk in seq_along(NAMES)) { [10:56:19.091] name <- changed[[kk]] [10:56:19.091] NAME <- NAMES[[kk]] [10:56:19.091] if (name != NAME && is.element(NAME, old_names)) [10:56:19.091] next [10:56:19.091] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:19.091] } [10:56:19.091] NAMES <- toupper(added) [10:56:19.091] for (kk in seq_along(NAMES)) { [10:56:19.091] name <- added[[kk]] [10:56:19.091] NAME <- NAMES[[kk]] [10:56:19.091] if (name != NAME && is.element(NAME, old_names)) [10:56:19.091] next [10:56:19.091] args[[name]] <- "" [10:56:19.091] } [10:56:19.091] NAMES <- toupper(removed) [10:56:19.091] for (kk in seq_along(NAMES)) { [10:56:19.091] name <- removed[[kk]] [10:56:19.091] NAME <- NAMES[[kk]] [10:56:19.091] if (name != NAME && is.element(NAME, old_names)) [10:56:19.091] next [10:56:19.091] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:19.091] } [10:56:19.091] if (length(args) > 0) [10:56:19.091] base::do.call(base::Sys.setenv, args = args) [10:56:19.091] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:19.091] } [10:56:19.091] else { [10:56:19.091] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:19.091] } [10:56:19.091] { [10:56:19.091] if (base::length(...future.futureOptionsAdded) > [10:56:19.091] 0L) { [10:56:19.091] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:19.091] base::names(opts) <- ...future.futureOptionsAdded [10:56:19.091] base::options(opts) [10:56:19.091] } [10:56:19.091] { [10:56:19.091] NULL [10:56:19.091] options(future.plan = NULL) [10:56:19.091] if (is.na(NA_character_)) [10:56:19.091] Sys.unsetenv("R_FUTURE_PLAN") [10:56:19.091] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:19.091] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:19.091] .init = FALSE) [10:56:19.091] } [10:56:19.091] } [10:56:19.091] } [10:56:19.091] }) [10:56:19.091] if (TRUE) { [10:56:19.091] base::sink(type = "output", split = FALSE) [10:56:19.091] if (TRUE) { [10:56:19.091] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:19.091] } [10:56:19.091] else { [10:56:19.091] ...future.result["stdout"] <- base::list(NULL) [10:56:19.091] } [10:56:19.091] base::close(...future.stdout) [10:56:19.091] ...future.stdout <- NULL [10:56:19.091] } [10:56:19.091] ...future.result$conditions <- ...future.conditions [10:56:19.091] ...future.result$finished <- base::Sys.time() [10:56:19.091] ...future.result [10:56:19.091] } [10:56:19.094] - Launch lazy future ... done [10:56:19.095] run() for 'MiraiFuture' ... done > str(list(y = y)) List of 1 $ y:List of 1 ..$ a: chr "hello; 1; 2; ...; 100" > stopifnot(identical(y, y0)) > > > message("- flapply(x, FUN = listenv::listenv, ...) ...") - flapply(x, FUN = listenv::listenv, ...) ... > > x <- list() > > y <- listenv() > y$A <- 3L > x$a <- y > > y <- listenv() > y$A <- 3L > y$B <- c("hello", b = 1:100) > x$b <- y > > print(x) $a A 'listenv' vector with 1 element ('A'). $b A 'listenv' vector with 2 elements ('A', 'B'). > > y0 <- lapply(x, FUN = listenv::mapping) > str(list(y0 = y0)) List of 1 $ y0:List of 2 ..$ a: Named chr "A" .. ..- attr(*, "names")= chr "A" ..$ b: Named chr [1:2] "A" "B" .. ..- attr(*, "names")= chr [1:2] "A" "B" > > y <- flapply(x, FUN = listenv::mapping) [10:56:19.107] getGlobalsAndPackages() ... [10:56:19.107] Searching for globals... [10:56:19.109] - globals found: [8] 'FUN', '[[', 'x', 'ii', '...', '{', 'get', 'parent.env' [10:56:19.110] Searching for globals ... DONE [10:56:19.110] Resolving globals: FALSE [10:56:19.110] Tweak future expression to call with '...' arguments ... [10:56:19.110] { [10:56:19.110] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [10:56:19.110] } [10:56:19.110] Tweak future expression to call with '...' arguments ... DONE [10:56:19.111] The total size of the 4 globals is 17.95 KiB (18384 bytes) [10:56:19.112] The total size of the 4 globals exported for future expression ('FUN(x[[ii]], ...)') is 17.95 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'x' (13.05 KiB of class 'list'), 'FUN' (4.85 KiB of class 'function') and 'ii' (56 bytes of class 'numeric') [10:56:19.112] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [10:56:19.112] - packages: [1] 'listenv' [10:56:19.112] getGlobalsAndPackages() ... DONE [10:56:19.113] run() for 'Future' ... [10:56:19.113] - state: 'created' [10:56:19.113] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:19.116] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:19.116] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:19.116] - Field: 'label' [10:56:19.116] - Field: 'local' [10:56:19.116] - Field: 'owner' [10:56:19.116] - Field: 'envir' [10:56:19.117] - Field: 'packages' [10:56:19.117] - Field: 'gc' [10:56:19.117] - Field: 'conditions' [10:56:19.117] - Field: 'expr' [10:56:19.117] - Field: 'uuid' [10:56:19.118] - Field: 'seed' [10:56:19.118] - Field: 'version' [10:56:19.118] - Field: 'result' [10:56:19.118] - Field: 'asynchronous' [10:56:19.118] - Field: 'calls' [10:56:19.118] - Field: 'globals' [10:56:19.119] - Field: 'stdout' [10:56:19.120] - Field: 'earlySignal' [10:56:19.120] - Field: 'lazy' [10:56:19.120] - Field: 'state' [10:56:19.121] - Field: '.cluster' [10:56:19.121] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:19.121] - Launch lazy future ... [10:56:19.121] Packages needed by the future expression (n = 1): 'listenv' [10:56:19.121] Packages needed by future strategies (n = 0): [10:56:19.122] { [10:56:19.122] { [10:56:19.122] { [10:56:19.122] ...future.startTime <- base::Sys.time() [10:56:19.122] { [10:56:19.122] { [10:56:19.122] { [10:56:19.122] { [10:56:19.122] base::local({ [10:56:19.122] has_future <- base::requireNamespace("future", [10:56:19.122] quietly = TRUE) [10:56:19.122] if (has_future) { [10:56:19.122] ns <- base::getNamespace("future") [10:56:19.122] version <- ns[[".package"]][["version"]] [10:56:19.122] if (is.null(version)) [10:56:19.122] version <- utils::packageVersion("future") [10:56:19.122] } [10:56:19.122] else { [10:56:19.122] version <- NULL [10:56:19.122] } [10:56:19.122] if (!has_future || version < "1.8.0") { [10:56:19.122] info <- base::c(r_version = base::gsub("R version ", [10:56:19.122] "", base::R.version$version.string), [10:56:19.122] platform = base::sprintf("%s (%s-bit)", [10:56:19.122] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:19.122] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:19.122] "release", "version")], collapse = " "), [10:56:19.122] hostname = base::Sys.info()[["nodename"]]) [10:56:19.122] info <- base::sprintf("%s: %s", base::names(info), [10:56:19.122] info) [10:56:19.122] info <- base::paste(info, collapse = "; ") [10:56:19.122] if (!has_future) { [10:56:19.122] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:19.122] info) [10:56:19.122] } [10:56:19.122] else { [10:56:19.122] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:19.122] info, version) [10:56:19.122] } [10:56:19.122] base::stop(msg) [10:56:19.122] } [10:56:19.122] }) [10:56:19.122] } [10:56:19.122] base::local({ [10:56:19.122] for (pkg in "listenv") { [10:56:19.122] base::loadNamespace(pkg) [10:56:19.122] base::library(pkg, character.only = TRUE) [10:56:19.122] } [10:56:19.122] }) [10:56:19.122] } [10:56:19.122] ...future.strategy.old <- future::plan("list") [10:56:19.122] options(future.plan = NULL) [10:56:19.122] Sys.unsetenv("R_FUTURE_PLAN") [10:56:19.122] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:19.122] } [10:56:19.122] ...future.workdir <- getwd() [10:56:19.122] } [10:56:19.122] ...future.oldOptions <- base::as.list(base::.Options) [10:56:19.122] ...future.oldEnvVars <- base::Sys.getenv() [10:56:19.122] } [10:56:19.122] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:19.122] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:19.122] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:19.122] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:19.122] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:19.122] future.stdout.windows.reencode = NULL, width = 80L) [10:56:19.122] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:19.122] base::names(...future.oldOptions)) [10:56:19.122] } [10:56:19.122] if (FALSE) { [10:56:19.122] } [10:56:19.122] else { [10:56:19.122] if (TRUE) { [10:56:19.122] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:19.122] open = "w") [10:56:19.122] } [10:56:19.122] else { [10:56:19.122] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:19.122] windows = "NUL", "/dev/null"), open = "w") [10:56:19.122] } [10:56:19.122] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:19.122] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:19.122] base::sink(type = "output", split = FALSE) [10:56:19.122] base::close(...future.stdout) [10:56:19.122] }, add = TRUE) [10:56:19.122] } [10:56:19.122] ...future.frame <- base::sys.nframe() [10:56:19.122] ...future.conditions <- base::list() [10:56:19.122] ...future.rng <- base::globalenv()$.Random.seed [10:56:19.122] if (FALSE) { [10:56:19.122] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:19.122] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:19.122] } [10:56:19.122] ...future.result <- base::tryCatch({ [10:56:19.122] base::withCallingHandlers({ [10:56:19.122] ...future.value <- base::withVisible(base::local({ [10:56:19.122] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [10:56:19.122] })) [10:56:19.122] future::FutureResult(value = ...future.value$value, [10:56:19.122] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:19.122] ...future.rng), globalenv = if (FALSE) [10:56:19.122] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:19.122] ...future.globalenv.names)) [10:56:19.122] else NULL, started = ...future.startTime, version = "1.8") [10:56:19.122] }, condition = base::local({ [10:56:19.122] c <- base::c [10:56:19.122] inherits <- base::inherits [10:56:19.122] invokeRestart <- base::invokeRestart [10:56:19.122] length <- base::length [10:56:19.122] list <- base::list [10:56:19.122] seq.int <- base::seq.int [10:56:19.122] signalCondition <- base::signalCondition [10:56:19.122] sys.calls <- base::sys.calls [10:56:19.122] `[[` <- base::`[[` [10:56:19.122] `+` <- base::`+` [10:56:19.122] `<<-` <- base::`<<-` [10:56:19.122] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:19.122] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:19.122] 3L)] [10:56:19.122] } [10:56:19.122] function(cond) { [10:56:19.122] is_error <- inherits(cond, "error") [10:56:19.122] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:19.122] NULL) [10:56:19.122] if (is_error) { [10:56:19.122] sessionInformation <- function() { [10:56:19.122] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:19.122] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:19.122] search = base::search(), system = base::Sys.info()) [10:56:19.122] } [10:56:19.122] ...future.conditions[[length(...future.conditions) + [10:56:19.122] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:19.122] cond$call), session = sessionInformation(), [10:56:19.122] timestamp = base::Sys.time(), signaled = 0L) [10:56:19.122] signalCondition(cond) [10:56:19.122] } [10:56:19.122] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:19.122] signal <- FALSE && inherits(cond, character(0)) [10:56:19.122] ...future.conditions[[length(...future.conditions) + [10:56:19.122] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:19.122] if (FALSE && !signal) { [10:56:19.122] muffleCondition <- function (cond, pattern = "^muffle") [10:56:19.122] { [10:56:19.122] inherits <- base::inherits [10:56:19.122] invokeRestart <- base::invokeRestart [10:56:19.122] is.null <- base::is.null [10:56:19.122] muffled <- FALSE [10:56:19.122] if (inherits(cond, "message")) { [10:56:19.122] muffled <- grepl(pattern, "muffleMessage") [10:56:19.122] if (muffled) [10:56:19.122] invokeRestart("muffleMessage") [10:56:19.122] } [10:56:19.122] else if (inherits(cond, "warning")) { [10:56:19.122] muffled <- grepl(pattern, "muffleWarning") [10:56:19.122] if (muffled) [10:56:19.122] invokeRestart("muffleWarning") [10:56:19.122] } [10:56:19.122] else if (inherits(cond, "condition")) { [10:56:19.122] if (!is.null(pattern)) { [10:56:19.122] computeRestarts <- base::computeRestarts [10:56:19.122] grepl <- base::grepl [10:56:19.122] restarts <- computeRestarts(cond) [10:56:19.122] for (restart in restarts) { [10:56:19.122] name <- restart$name [10:56:19.122] if (is.null(name)) [10:56:19.122] next [10:56:19.122] if (!grepl(pattern, name)) [10:56:19.122] next [10:56:19.122] invokeRestart(restart) [10:56:19.122] muffled <- TRUE [10:56:19.122] break [10:56:19.122] } [10:56:19.122] } [10:56:19.122] } [10:56:19.122] invisible(muffled) [10:56:19.122] } [10:56:19.122] muffleCondition(cond, pattern = "^muffle") [10:56:19.122] } [10:56:19.122] } [10:56:19.122] else { [10:56:19.122] if (TRUE) { [10:56:19.122] muffleCondition <- function (cond, pattern = "^muffle") [10:56:19.122] { [10:56:19.122] inherits <- base::inherits [10:56:19.122] invokeRestart <- base::invokeRestart [10:56:19.122] is.null <- base::is.null [10:56:19.122] muffled <- FALSE [10:56:19.122] if (inherits(cond, "message")) { [10:56:19.122] muffled <- grepl(pattern, "muffleMessage") [10:56:19.122] if (muffled) [10:56:19.122] invokeRestart("muffleMessage") [10:56:19.122] } [10:56:19.122] else if (inherits(cond, "warning")) { [10:56:19.122] muffled <- grepl(pattern, "muffleWarning") [10:56:19.122] if (muffled) [10:56:19.122] invokeRestart("muffleWarning") [10:56:19.122] } [10:56:19.122] else if (inherits(cond, "condition")) { [10:56:19.122] if (!is.null(pattern)) { [10:56:19.122] computeRestarts <- base::computeRestarts [10:56:19.122] grepl <- base::grepl [10:56:19.122] restarts <- computeRestarts(cond) [10:56:19.122] for (restart in restarts) { [10:56:19.122] name <- restart$name [10:56:19.122] if (is.null(name)) [10:56:19.122] next [10:56:19.122] if (!grepl(pattern, name)) [10:56:19.122] next [10:56:19.122] invokeRestart(restart) [10:56:19.122] muffled <- TRUE [10:56:19.122] break [10:56:19.122] } [10:56:19.122] } [10:56:19.122] } [10:56:19.122] invisible(muffled) [10:56:19.122] } [10:56:19.122] muffleCondition(cond, pattern = "^muffle") [10:56:19.122] } [10:56:19.122] } [10:56:19.122] } [10:56:19.122] })) [10:56:19.122] }, error = function(ex) { [10:56:19.122] base::structure(base::list(value = NULL, visible = NULL, [10:56:19.122] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:19.122] ...future.rng), started = ...future.startTime, [10:56:19.122] finished = Sys.time(), session_uuid = NA_character_, [10:56:19.122] version = "1.8"), class = "FutureResult") [10:56:19.122] }, finally = { [10:56:19.122] if (!identical(...future.workdir, getwd())) [10:56:19.122] setwd(...future.workdir) [10:56:19.122] { [10:56:19.122] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:19.122] ...future.oldOptions$nwarnings <- NULL [10:56:19.122] } [10:56:19.122] base::options(...future.oldOptions) [10:56:19.122] if (.Platform$OS.type == "windows") { [10:56:19.122] old_names <- names(...future.oldEnvVars) [10:56:19.122] envs <- base::Sys.getenv() [10:56:19.122] names <- names(envs) [10:56:19.122] common <- intersect(names, old_names) [10:56:19.122] added <- setdiff(names, old_names) [10:56:19.122] removed <- setdiff(old_names, names) [10:56:19.122] changed <- common[...future.oldEnvVars[common] != [10:56:19.122] envs[common]] [10:56:19.122] NAMES <- toupper(changed) [10:56:19.122] args <- list() [10:56:19.122] for (kk in seq_along(NAMES)) { [10:56:19.122] name <- changed[[kk]] [10:56:19.122] NAME <- NAMES[[kk]] [10:56:19.122] if (name != NAME && is.element(NAME, old_names)) [10:56:19.122] next [10:56:19.122] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:19.122] } [10:56:19.122] NAMES <- toupper(added) [10:56:19.122] for (kk in seq_along(NAMES)) { [10:56:19.122] name <- added[[kk]] [10:56:19.122] NAME <- NAMES[[kk]] [10:56:19.122] if (name != NAME && is.element(NAME, old_names)) [10:56:19.122] next [10:56:19.122] args[[name]] <- "" [10:56:19.122] } [10:56:19.122] NAMES <- toupper(removed) [10:56:19.122] for (kk in seq_along(NAMES)) { [10:56:19.122] name <- removed[[kk]] [10:56:19.122] NAME <- NAMES[[kk]] [10:56:19.122] if (name != NAME && is.element(NAME, old_names)) [10:56:19.122] next [10:56:19.122] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:19.122] } [10:56:19.122] if (length(args) > 0) [10:56:19.122] base::do.call(base::Sys.setenv, args = args) [10:56:19.122] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:19.122] } [10:56:19.122] else { [10:56:19.122] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:19.122] } [10:56:19.122] { [10:56:19.122] if (base::length(...future.futureOptionsAdded) > [10:56:19.122] 0L) { [10:56:19.122] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:19.122] base::names(opts) <- ...future.futureOptionsAdded [10:56:19.122] base::options(opts) [10:56:19.122] } [10:56:19.122] { [10:56:19.122] NULL [10:56:19.122] options(future.plan = NULL) [10:56:19.122] if (is.na(NA_character_)) [10:56:19.122] Sys.unsetenv("R_FUTURE_PLAN") [10:56:19.122] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:19.122] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:19.122] .init = FALSE) [10:56:19.122] } [10:56:19.122] } [10:56:19.122] } [10:56:19.122] }) [10:56:19.122] if (TRUE) { [10:56:19.122] base::sink(type = "output", split = FALSE) [10:56:19.122] if (TRUE) { [10:56:19.122] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:19.122] } [10:56:19.122] else { [10:56:19.122] ...future.result["stdout"] <- base::list(NULL) [10:56:19.122] } [10:56:19.122] base::close(...future.stdout) [10:56:19.122] ...future.stdout <- NULL [10:56:19.122] } [10:56:19.122] ...future.result$conditions <- ...future.conditions [10:56:19.122] ...future.result$finished <- base::Sys.time() [10:56:19.122] ...future.result [10:56:19.122] } [10:56:19.126] - Launch lazy future ... done [10:56:19.126] run() for 'MiraiFuture' ... done [10:56:19.126] getGlobalsAndPackages() ... [10:56:19.127] Searching for globals... [10:56:19.129] - globals found: [8] 'FUN', '[[', 'x', 'ii', '...', '{', 'get', 'parent.env' [10:56:19.129] Searching for globals ... DONE [10:56:19.129] Resolving globals: FALSE [10:56:19.130] Tweak future expression to call with '...' arguments ... [10:56:19.130] { [10:56:19.130] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [10:56:19.130] } [10:56:19.130] Tweak future expression to call with '...' arguments ... DONE [10:56:19.131] The total size of the 4 globals is 17.95 KiB (18384 bytes) [10:56:19.131] The total size of the 4 globals exported for future expression ('FUN(x[[ii]], ...)') is 17.95 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'x' (13.05 KiB of class 'list'), 'FUN' (4.85 KiB of class 'function') and 'ii' (56 bytes of class 'numeric') [10:56:19.132] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [10:56:19.132] - packages: [1] 'listenv' [10:56:19.132] getGlobalsAndPackages() ... DONE [10:56:19.132] run() for 'Future' ... [10:56:19.133] - state: 'created' [10:56:19.133] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:19.135] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:19.135] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:19.135] - Field: 'label' [10:56:19.136] - Field: 'local' [10:56:19.136] - Field: 'owner' [10:56:19.136] - Field: 'envir' [10:56:19.136] - Field: 'packages' [10:56:19.136] - Field: 'gc' [10:56:19.136] - Field: 'conditions' [10:56:19.137] - Field: 'expr' [10:56:19.137] - Field: 'uuid' [10:56:19.137] - Field: 'seed' [10:56:19.137] - Field: 'version' [10:56:19.137] - Field: 'result' [10:56:19.137] - Field: 'asynchronous' [10:56:19.138] - Field: 'calls' [10:56:19.138] - Field: 'globals' [10:56:19.138] - Field: 'stdout' [10:56:19.138] - Field: 'earlySignal' [10:56:19.139] - Field: 'lazy' [10:56:19.139] - Field: 'state' [10:56:19.139] - Field: '.cluster' [10:56:19.139] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:19.139] - Launch lazy future ... [10:56:19.140] Packages needed by the future expression (n = 1): 'listenv' [10:56:19.140] Packages needed by future strategies (n = 0): [10:56:19.141] { [10:56:19.141] { [10:56:19.141] { [10:56:19.141] ...future.startTime <- base::Sys.time() [10:56:19.141] { [10:56:19.141] { [10:56:19.141] { [10:56:19.141] { [10:56:19.141] base::local({ [10:56:19.141] has_future <- base::requireNamespace("future", [10:56:19.141] quietly = TRUE) [10:56:19.141] if (has_future) { [10:56:19.141] ns <- base::getNamespace("future") [10:56:19.141] version <- ns[[".package"]][["version"]] [10:56:19.141] if (is.null(version)) [10:56:19.141] version <- utils::packageVersion("future") [10:56:19.141] } [10:56:19.141] else { [10:56:19.141] version <- NULL [10:56:19.141] } [10:56:19.141] if (!has_future || version < "1.8.0") { [10:56:19.141] info <- base::c(r_version = base::gsub("R version ", [10:56:19.141] "", base::R.version$version.string), [10:56:19.141] platform = base::sprintf("%s (%s-bit)", [10:56:19.141] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:19.141] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:19.141] "release", "version")], collapse = " "), [10:56:19.141] hostname = base::Sys.info()[["nodename"]]) [10:56:19.141] info <- base::sprintf("%s: %s", base::names(info), [10:56:19.141] info) [10:56:19.141] info <- base::paste(info, collapse = "; ") [10:56:19.141] if (!has_future) { [10:56:19.141] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:19.141] info) [10:56:19.141] } [10:56:19.141] else { [10:56:19.141] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:19.141] info, version) [10:56:19.141] } [10:56:19.141] base::stop(msg) [10:56:19.141] } [10:56:19.141] }) [10:56:19.141] } [10:56:19.141] base::local({ [10:56:19.141] for (pkg in "listenv") { [10:56:19.141] base::loadNamespace(pkg) [10:56:19.141] base::library(pkg, character.only = TRUE) [10:56:19.141] } [10:56:19.141] }) [10:56:19.141] } [10:56:19.141] ...future.strategy.old <- future::plan("list") [10:56:19.141] options(future.plan = NULL) [10:56:19.141] Sys.unsetenv("R_FUTURE_PLAN") [10:56:19.141] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:19.141] } [10:56:19.141] ...future.workdir <- getwd() [10:56:19.141] } [10:56:19.141] ...future.oldOptions <- base::as.list(base::.Options) [10:56:19.141] ...future.oldEnvVars <- base::Sys.getenv() [10:56:19.141] } [10:56:19.141] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:19.141] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:19.141] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:19.141] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:19.141] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:19.141] future.stdout.windows.reencode = NULL, width = 80L) [10:56:19.141] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:19.141] base::names(...future.oldOptions)) [10:56:19.141] } [10:56:19.141] if (FALSE) { [10:56:19.141] } [10:56:19.141] else { [10:56:19.141] if (TRUE) { [10:56:19.141] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:19.141] open = "w") [10:56:19.141] } [10:56:19.141] else { [10:56:19.141] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:19.141] windows = "NUL", "/dev/null"), open = "w") [10:56:19.141] } [10:56:19.141] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:19.141] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:19.141] base::sink(type = "output", split = FALSE) [10:56:19.141] base::close(...future.stdout) [10:56:19.141] }, add = TRUE) [10:56:19.141] } [10:56:19.141] ...future.frame <- base::sys.nframe() [10:56:19.141] ...future.conditions <- base::list() [10:56:19.141] ...future.rng <- base::globalenv()$.Random.seed [10:56:19.141] if (FALSE) { [10:56:19.141] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:19.141] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:19.141] } [10:56:19.141] ...future.result <- base::tryCatch({ [10:56:19.141] base::withCallingHandlers({ [10:56:19.141] ...future.value <- base::withVisible(base::local({ [10:56:19.141] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [10:56:19.141] })) [10:56:19.141] future::FutureResult(value = ...future.value$value, [10:56:19.141] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:19.141] ...future.rng), globalenv = if (FALSE) [10:56:19.141] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:19.141] ...future.globalenv.names)) [10:56:19.141] else NULL, started = ...future.startTime, version = "1.8") [10:56:19.141] }, condition = base::local({ [10:56:19.141] c <- base::c [10:56:19.141] inherits <- base::inherits [10:56:19.141] invokeRestart <- base::invokeRestart [10:56:19.141] length <- base::length [10:56:19.141] list <- base::list [10:56:19.141] seq.int <- base::seq.int [10:56:19.141] signalCondition <- base::signalCondition [10:56:19.141] sys.calls <- base::sys.calls [10:56:19.141] `[[` <- base::`[[` [10:56:19.141] `+` <- base::`+` [10:56:19.141] `<<-` <- base::`<<-` [10:56:19.141] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:19.141] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:19.141] 3L)] [10:56:19.141] } [10:56:19.141] function(cond) { [10:56:19.141] is_error <- inherits(cond, "error") [10:56:19.141] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:19.141] NULL) [10:56:19.141] if (is_error) { [10:56:19.141] sessionInformation <- function() { [10:56:19.141] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:19.141] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:19.141] search = base::search(), system = base::Sys.info()) [10:56:19.141] } [10:56:19.141] ...future.conditions[[length(...future.conditions) + [10:56:19.141] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:19.141] cond$call), session = sessionInformation(), [10:56:19.141] timestamp = base::Sys.time(), signaled = 0L) [10:56:19.141] signalCondition(cond) [10:56:19.141] } [10:56:19.141] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:19.141] signal <- FALSE && inherits(cond, character(0)) [10:56:19.141] ...future.conditions[[length(...future.conditions) + [10:56:19.141] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:19.141] if (FALSE && !signal) { [10:56:19.141] muffleCondition <- function (cond, pattern = "^muffle") [10:56:19.141] { [10:56:19.141] inherits <- base::inherits [10:56:19.141] invokeRestart <- base::invokeRestart [10:56:19.141] is.null <- base::is.null [10:56:19.141] muffled <- FALSE [10:56:19.141] if (inherits(cond, "message")) { [10:56:19.141] muffled <- grepl(pattern, "muffleMessage") [10:56:19.141] if (muffled) [10:56:19.141] invokeRestart("muffleMessage") [10:56:19.141] } [10:56:19.141] else if (inherits(cond, "warning")) { [10:56:19.141] muffled <- grepl(pattern, "muffleWarning") [10:56:19.141] if (muffled) [10:56:19.141] invokeRestart("muffleWarning") [10:56:19.141] } [10:56:19.141] else if (inherits(cond, "condition")) { [10:56:19.141] if (!is.null(pattern)) { [10:56:19.141] computeRestarts <- base::computeRestarts [10:56:19.141] grepl <- base::grepl [10:56:19.141] restarts <- computeRestarts(cond) [10:56:19.141] for (restart in restarts) { [10:56:19.141] name <- restart$name [10:56:19.141] if (is.null(name)) [10:56:19.141] next [10:56:19.141] if (!grepl(pattern, name)) [10:56:19.141] next [10:56:19.141] invokeRestart(restart) [10:56:19.141] muffled <- TRUE [10:56:19.141] break [10:56:19.141] } [10:56:19.141] } [10:56:19.141] } [10:56:19.141] invisible(muffled) [10:56:19.141] } [10:56:19.141] muffleCondition(cond, pattern = "^muffle") [10:56:19.141] } [10:56:19.141] } [10:56:19.141] else { [10:56:19.141] if (TRUE) { [10:56:19.141] muffleCondition <- function (cond, pattern = "^muffle") [10:56:19.141] { [10:56:19.141] inherits <- base::inherits [10:56:19.141] invokeRestart <- base::invokeRestart [10:56:19.141] is.null <- base::is.null [10:56:19.141] muffled <- FALSE [10:56:19.141] if (inherits(cond, "message")) { [10:56:19.141] muffled <- grepl(pattern, "muffleMessage") [10:56:19.141] if (muffled) [10:56:19.141] invokeRestart("muffleMessage") [10:56:19.141] } [10:56:19.141] else if (inherits(cond, "warning")) { [10:56:19.141] muffled <- grepl(pattern, "muffleWarning") [10:56:19.141] if (muffled) [10:56:19.141] invokeRestart("muffleWarning") [10:56:19.141] } [10:56:19.141] else if (inherits(cond, "condition")) { [10:56:19.141] if (!is.null(pattern)) { [10:56:19.141] computeRestarts <- base::computeRestarts [10:56:19.141] grepl <- base::grepl [10:56:19.141] restarts <- computeRestarts(cond) [10:56:19.141] for (restart in restarts) { [10:56:19.141] name <- restart$name [10:56:19.141] if (is.null(name)) [10:56:19.141] next [10:56:19.141] if (!grepl(pattern, name)) [10:56:19.141] next [10:56:19.141] invokeRestart(restart) [10:56:19.141] muffled <- TRUE [10:56:19.141] break [10:56:19.141] } [10:56:19.141] } [10:56:19.141] } [10:56:19.141] invisible(muffled) [10:56:19.141] } [10:56:19.141] muffleCondition(cond, pattern = "^muffle") [10:56:19.141] } [10:56:19.141] } [10:56:19.141] } [10:56:19.141] })) [10:56:19.141] }, error = function(ex) { [10:56:19.141] base::structure(base::list(value = NULL, visible = NULL, [10:56:19.141] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:19.141] ...future.rng), started = ...future.startTime, [10:56:19.141] finished = Sys.time(), session_uuid = NA_character_, [10:56:19.141] version = "1.8"), class = "FutureResult") [10:56:19.141] }, finally = { [10:56:19.141] if (!identical(...future.workdir, getwd())) [10:56:19.141] setwd(...future.workdir) [10:56:19.141] { [10:56:19.141] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:19.141] ...future.oldOptions$nwarnings <- NULL [10:56:19.141] } [10:56:19.141] base::options(...future.oldOptions) [10:56:19.141] if (.Platform$OS.type == "windows") { [10:56:19.141] old_names <- names(...future.oldEnvVars) [10:56:19.141] envs <- base::Sys.getenv() [10:56:19.141] names <- names(envs) [10:56:19.141] common <- intersect(names, old_names) [10:56:19.141] added <- setdiff(names, old_names) [10:56:19.141] removed <- setdiff(old_names, names) [10:56:19.141] changed <- common[...future.oldEnvVars[common] != [10:56:19.141] envs[common]] [10:56:19.141] NAMES <- toupper(changed) [10:56:19.141] args <- list() [10:56:19.141] for (kk in seq_along(NAMES)) { [10:56:19.141] name <- changed[[kk]] [10:56:19.141] NAME <- NAMES[[kk]] [10:56:19.141] if (name != NAME && is.element(NAME, old_names)) [10:56:19.141] next [10:56:19.141] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:19.141] } [10:56:19.141] NAMES <- toupper(added) [10:56:19.141] for (kk in seq_along(NAMES)) { [10:56:19.141] name <- added[[kk]] [10:56:19.141] NAME <- NAMES[[kk]] [10:56:19.141] if (name != NAME && is.element(NAME, old_names)) [10:56:19.141] next [10:56:19.141] args[[name]] <- "" [10:56:19.141] } [10:56:19.141] NAMES <- toupper(removed) [10:56:19.141] for (kk in seq_along(NAMES)) { [10:56:19.141] name <- removed[[kk]] [10:56:19.141] NAME <- NAMES[[kk]] [10:56:19.141] if (name != NAME && is.element(NAME, old_names)) [10:56:19.141] next [10:56:19.141] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:19.141] } [10:56:19.141] if (length(args) > 0) [10:56:19.141] base::do.call(base::Sys.setenv, args = args) [10:56:19.141] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:19.141] } [10:56:19.141] else { [10:56:19.141] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:19.141] } [10:56:19.141] { [10:56:19.141] if (base::length(...future.futureOptionsAdded) > [10:56:19.141] 0L) { [10:56:19.141] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:19.141] base::names(opts) <- ...future.futureOptionsAdded [10:56:19.141] base::options(opts) [10:56:19.141] } [10:56:19.141] { [10:56:19.141] NULL [10:56:19.141] options(future.plan = NULL) [10:56:19.141] if (is.na(NA_character_)) [10:56:19.141] Sys.unsetenv("R_FUTURE_PLAN") [10:56:19.141] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:19.141] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:19.141] .init = FALSE) [10:56:19.141] } [10:56:19.141] } [10:56:19.141] } [10:56:19.141] }) [10:56:19.141] if (TRUE) { [10:56:19.141] base::sink(type = "output", split = FALSE) [10:56:19.141] if (TRUE) { [10:56:19.141] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:19.141] } [10:56:19.141] else { [10:56:19.141] ...future.result["stdout"] <- base::list(NULL) [10:56:19.141] } [10:56:19.141] base::close(...future.stdout) [10:56:19.141] ...future.stdout <- NULL [10:56:19.141] } [10:56:19.141] ...future.result$conditions <- ...future.conditions [10:56:19.141] ...future.result$finished <- base::Sys.time() [10:56:19.141] ...future.result [10:56:19.141] } [10:56:19.145] - Launch lazy future ... done [10:56:19.146] run() for 'MiraiFuture' ... done > str(list(y = y)) List of 1 $ y:List of 2 ..$ a: Named chr "A" .. ..- attr(*, "names")= chr "A" ..$ b: Named chr [1:2] "A" "B" .. ..- attr(*, "names")= chr [1:2] "A" "B" > stopifnot(identical(y, y0)) > > > message("*** Tricky use cases related to globals ... DONE") *** Tricky use cases related to globals ... DONE > > source("incl/end.R") > > proc.time() user system elapsed 0.48 0.09 1.25