R Under development (unstable) (2024-07-02 r86866 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 [13:31:13.077] plan(): Setting new future strategy stack: [13:31:13.078] List of future strategies: [13:31:13.078] 1. mirai_multisession: [13:31:13.078] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:31:13.078] - tweaked: FALSE [13:31:13.078] - call: future::plan(future.mirai::mirai_multisession) [13:31:13.091] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:31:13.091] < mirai [$data] > [13:31:13.096] getGlobalsAndPackages() ... [13:31:13.096] Not searching for globals [13:31:13.096] - globals: [0] [13:31:13.097] getGlobalsAndPackages() ... DONE [13:31:13.097] getGlobalsAndPackages() ... [13:31:13.097] [13:31:13.098] - globals: [0] [13:31:13.098] getGlobalsAndPackages() ... DONE [13:31:13.348] Packages needed by the future expression (n = 0): [13:31:13.348] Packages needed by future strategies (n = 0): [13:31:13.350] { [13:31:13.350] { [13:31:13.350] { [13:31:13.350] ...future.startTime <- base::Sys.time() [13:31:13.350] { [13:31:13.350] { [13:31:13.350] { [13:31:13.350] base::local({ [13:31:13.350] has_future <- base::requireNamespace("future", [13:31:13.350] quietly = TRUE) [13:31:13.350] if (has_future) { [13:31:13.350] ns <- base::getNamespace("future") [13:31:13.350] version <- ns[[".package"]][["version"]] [13:31:13.350] if (is.null(version)) [13:31:13.350] version <- utils::packageVersion("future") [13:31:13.350] } [13:31:13.350] else { [13:31:13.350] version <- NULL [13:31:13.350] } [13:31:13.350] if (!has_future || version < "1.8.0") { [13:31:13.350] info <- base::c(r_version = base::gsub("R version ", [13:31:13.350] "", base::R.version$version.string), [13:31:13.350] platform = base::sprintf("%s (%s-bit)", [13:31:13.350] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:13.350] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:13.350] "release", "version")], collapse = " "), [13:31:13.350] hostname = base::Sys.info()[["nodename"]]) [13:31:13.350] info <- base::sprintf("%s: %s", base::names(info), [13:31:13.350] info) [13:31:13.350] info <- base::paste(info, collapse = "; ") [13:31:13.350] if (!has_future) { [13:31:13.350] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:13.350] info) [13:31:13.350] } [13:31:13.350] else { [13:31:13.350] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:13.350] info, version) [13:31:13.350] } [13:31:13.350] base::stop(msg) [13:31:13.350] } [13:31:13.350] }) [13:31:13.350] } [13:31:13.350] ...future.strategy.old <- future::plan("list") [13:31:13.350] options(future.plan = NULL) [13:31:13.350] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.350] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:13.350] } [13:31:13.350] ...future.workdir <- getwd() [13:31:13.350] } [13:31:13.350] ...future.oldOptions <- base::as.list(base::.Options) [13:31:13.350] ...future.oldEnvVars <- base::Sys.getenv() [13:31:13.350] } [13:31:13.350] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:13.350] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:13.350] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:13.350] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:13.350] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:13.350] future.stdout.windows.reencode = NULL, width = 80L) [13:31:13.350] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:13.350] base::names(...future.oldOptions)) [13:31:13.350] } [13:31:13.350] if (FALSE) { [13:31:13.350] } [13:31:13.350] else { [13:31:13.350] if (TRUE) { [13:31:13.350] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:13.350] open = "w") [13:31:13.350] } [13:31:13.350] else { [13:31:13.350] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:13.350] windows = "NUL", "/dev/null"), open = "w") [13:31:13.350] } [13:31:13.350] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:13.350] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:13.350] base::sink(type = "output", split = FALSE) [13:31:13.350] base::close(...future.stdout) [13:31:13.350] }, add = TRUE) [13:31:13.350] } [13:31:13.350] ...future.frame <- base::sys.nframe() [13:31:13.350] ...future.conditions <- base::list() [13:31:13.350] ...future.rng <- base::globalenv()$.Random.seed [13:31:13.350] if (FALSE) { [13:31:13.350] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:13.350] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:13.350] } [13:31:13.350] ...future.result <- base::tryCatch({ [13:31:13.350] base::withCallingHandlers({ [13:31:13.350] ...future.value <- base::withVisible(base::local(NA)) [13:31:13.350] future::FutureResult(value = ...future.value$value, [13:31:13.350] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.350] ...future.rng), globalenv = if (FALSE) [13:31:13.350] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:13.350] ...future.globalenv.names)) [13:31:13.350] else NULL, started = ...future.startTime, version = "1.8") [13:31:13.350] }, condition = base::local({ [13:31:13.350] c <- base::c [13:31:13.350] inherits <- base::inherits [13:31:13.350] invokeRestart <- base::invokeRestart [13:31:13.350] length <- base::length [13:31:13.350] list <- base::list [13:31:13.350] seq.int <- base::seq.int [13:31:13.350] signalCondition <- base::signalCondition [13:31:13.350] sys.calls <- base::sys.calls [13:31:13.350] `[[` <- base::`[[` [13:31:13.350] `+` <- base::`+` [13:31:13.350] `<<-` <- base::`<<-` [13:31:13.350] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:13.350] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:13.350] 3L)] [13:31:13.350] } [13:31:13.350] function(cond) { [13:31:13.350] is_error <- inherits(cond, "error") [13:31:13.350] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:13.350] NULL) [13:31:13.350] if (is_error) { [13:31:13.350] sessionInformation <- function() { [13:31:13.350] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:13.350] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:13.350] search = base::search(), system = base::Sys.info()) [13:31:13.350] } [13:31:13.350] ...future.conditions[[length(...future.conditions) + [13:31:13.350] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:13.350] cond$call), session = sessionInformation(), [13:31:13.350] timestamp = base::Sys.time(), signaled = 0L) [13:31:13.350] signalCondition(cond) [13:31:13.350] } [13:31:13.350] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:13.350] signal <- FALSE && inherits(cond, character(0)) [13:31:13.350] ...future.conditions[[length(...future.conditions) + [13:31:13.350] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:13.350] if (FALSE && !signal) { [13:31:13.350] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.350] { [13:31:13.350] inherits <- base::inherits [13:31:13.350] invokeRestart <- base::invokeRestart [13:31:13.350] is.null <- base::is.null [13:31:13.350] muffled <- FALSE [13:31:13.350] if (inherits(cond, "message")) { [13:31:13.350] muffled <- grepl(pattern, "muffleMessage") [13:31:13.350] if (muffled) [13:31:13.350] invokeRestart("muffleMessage") [13:31:13.350] } [13:31:13.350] else if (inherits(cond, "warning")) { [13:31:13.350] muffled <- grepl(pattern, "muffleWarning") [13:31:13.350] if (muffled) [13:31:13.350] invokeRestart("muffleWarning") [13:31:13.350] } [13:31:13.350] else if (inherits(cond, "condition")) { [13:31:13.350] if (!is.null(pattern)) { [13:31:13.350] computeRestarts <- base::computeRestarts [13:31:13.350] grepl <- base::grepl [13:31:13.350] restarts <- computeRestarts(cond) [13:31:13.350] for (restart in restarts) { [13:31:13.350] name <- restart$name [13:31:13.350] if (is.null(name)) [13:31:13.350] next [13:31:13.350] if (!grepl(pattern, name)) [13:31:13.350] next [13:31:13.350] invokeRestart(restart) [13:31:13.350] muffled <- TRUE [13:31:13.350] break [13:31:13.350] } [13:31:13.350] } [13:31:13.350] } [13:31:13.350] invisible(muffled) [13:31:13.350] } [13:31:13.350] muffleCondition(cond, pattern = "^muffle") [13:31:13.350] } [13:31:13.350] } [13:31:13.350] else { [13:31:13.350] if (TRUE) { [13:31:13.350] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.350] { [13:31:13.350] inherits <- base::inherits [13:31:13.350] invokeRestart <- base::invokeRestart [13:31:13.350] is.null <- base::is.null [13:31:13.350] muffled <- FALSE [13:31:13.350] if (inherits(cond, "message")) { [13:31:13.350] muffled <- grepl(pattern, "muffleMessage") [13:31:13.350] if (muffled) [13:31:13.350] invokeRestart("muffleMessage") [13:31:13.350] } [13:31:13.350] else if (inherits(cond, "warning")) { [13:31:13.350] muffled <- grepl(pattern, "muffleWarning") [13:31:13.350] if (muffled) [13:31:13.350] invokeRestart("muffleWarning") [13:31:13.350] } [13:31:13.350] else if (inherits(cond, "condition")) { [13:31:13.350] if (!is.null(pattern)) { [13:31:13.350] computeRestarts <- base::computeRestarts [13:31:13.350] grepl <- base::grepl [13:31:13.350] restarts <- computeRestarts(cond) [13:31:13.350] for (restart in restarts) { [13:31:13.350] name <- restart$name [13:31:13.350] if (is.null(name)) [13:31:13.350] next [13:31:13.350] if (!grepl(pattern, name)) [13:31:13.350] next [13:31:13.350] invokeRestart(restart) [13:31:13.350] muffled <- TRUE [13:31:13.350] break [13:31:13.350] } [13:31:13.350] } [13:31:13.350] } [13:31:13.350] invisible(muffled) [13:31:13.350] } [13:31:13.350] muffleCondition(cond, pattern = "^muffle") [13:31:13.350] } [13:31:13.350] } [13:31:13.350] } [13:31:13.350] })) [13:31:13.350] }, error = function(ex) { [13:31:13.350] base::structure(base::list(value = NULL, visible = NULL, [13:31:13.350] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.350] ...future.rng), started = ...future.startTime, [13:31:13.350] finished = Sys.time(), session_uuid = NA_character_, [13:31:13.350] version = "1.8"), class = "FutureResult") [13:31:13.350] }, finally = { [13:31:13.350] if (!identical(...future.workdir, getwd())) [13:31:13.350] setwd(...future.workdir) [13:31:13.350] { [13:31:13.350] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:13.350] ...future.oldOptions$nwarnings <- NULL [13:31:13.350] } [13:31:13.350] base::options(...future.oldOptions) [13:31:13.350] if (.Platform$OS.type == "windows") { [13:31:13.350] old_names <- names(...future.oldEnvVars) [13:31:13.350] envs <- base::Sys.getenv() [13:31:13.350] names <- names(envs) [13:31:13.350] common <- intersect(names, old_names) [13:31:13.350] added <- setdiff(names, old_names) [13:31:13.350] removed <- setdiff(old_names, names) [13:31:13.350] changed <- common[...future.oldEnvVars[common] != [13:31:13.350] envs[common]] [13:31:13.350] NAMES <- toupper(changed) [13:31:13.350] args <- list() [13:31:13.350] for (kk in seq_along(NAMES)) { [13:31:13.350] name <- changed[[kk]] [13:31:13.350] NAME <- NAMES[[kk]] [13:31:13.350] if (name != NAME && is.element(NAME, old_names)) [13:31:13.350] next [13:31:13.350] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.350] } [13:31:13.350] NAMES <- toupper(added) [13:31:13.350] for (kk in seq_along(NAMES)) { [13:31:13.350] name <- added[[kk]] [13:31:13.350] NAME <- NAMES[[kk]] [13:31:13.350] if (name != NAME && is.element(NAME, old_names)) [13:31:13.350] next [13:31:13.350] args[[name]] <- "" [13:31:13.350] } [13:31:13.350] NAMES <- toupper(removed) [13:31:13.350] for (kk in seq_along(NAMES)) { [13:31:13.350] name <- removed[[kk]] [13:31:13.350] NAME <- NAMES[[kk]] [13:31:13.350] if (name != NAME && is.element(NAME, old_names)) [13:31:13.350] next [13:31:13.350] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.350] } [13:31:13.350] if (length(args) > 0) [13:31:13.350] base::do.call(base::Sys.setenv, args = args) [13:31:13.350] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:13.350] } [13:31:13.350] else { [13:31:13.350] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:13.350] } [13:31:13.350] { [13:31:13.350] if (base::length(...future.futureOptionsAdded) > [13:31:13.350] 0L) { [13:31:13.350] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:13.350] base::names(opts) <- ...future.futureOptionsAdded [13:31:13.350] base::options(opts) [13:31:13.350] } [13:31:13.350] { [13:31:13.350] NULL [13:31:13.350] options(future.plan = NULL) [13:31:13.350] if (is.na(NA_character_)) [13:31:13.350] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.350] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:13.350] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:13.350] .init = FALSE) [13:31:13.350] } [13:31:13.350] } [13:31:13.350] } [13:31:13.350] }) [13:31:13.350] if (TRUE) { [13:31:13.350] base::sink(type = "output", split = FALSE) [13:31:13.350] if (TRUE) { [13:31:13.350] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:13.350] } [13:31:13.350] else { [13:31:13.350] ...future.result["stdout"] <- base::list(NULL) [13:31:13.350] } [13:31:13.350] base::close(...future.stdout) [13:31:13.350] ...future.stdout <- NULL [13:31:13.350] } [13:31:13.350] ...future.result$conditions <- ...future.conditions [13:31:13.350] ...future.result$finished <- base::Sys.time() [13:31:13.350] ...future.result [13:31:13.350] } [13:31:13.465] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:31:13.465] plan(): nbrOfWorkers() = 2 > library("listenv") > > plan(mirai_multisession) [13:31:13.471] plan(): Setting new future strategy stack: [13:31:13.471] List of future strategies: [13:31:13.471] 1. mirai_multisession: [13:31:13.471] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:31:13.471] - tweaked: FALSE [13:31:13.471] - call: plan(mirai_multisession) [13:31:13.484] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:31:13.484] < mirai [$data] > [13:31:13.487] getGlobalsAndPackages() ... [13:31:13.487] Not searching for globals [13:31:13.487] - globals: [0] [13:31:13.487] getGlobalsAndPackages() ... DONE [13:31:13.487] getGlobalsAndPackages() ... [13:31:13.488] [13:31:13.488] - globals: [0] [13:31:13.488] getGlobalsAndPackages() ... DONE [13:31:13.488] Packages needed by the future expression (n = 0): [13:31:13.489] Packages needed by future strategies (n = 0): [13:31:13.489] { [13:31:13.489] { [13:31:13.489] { [13:31:13.489] ...future.startTime <- base::Sys.time() [13:31:13.489] { [13:31:13.489] { [13:31:13.489] { [13:31:13.489] base::local({ [13:31:13.489] has_future <- base::requireNamespace("future", [13:31:13.489] quietly = TRUE) [13:31:13.489] if (has_future) { [13:31:13.489] ns <- base::getNamespace("future") [13:31:13.489] version <- ns[[".package"]][["version"]] [13:31:13.489] if (is.null(version)) [13:31:13.489] version <- utils::packageVersion("future") [13:31:13.489] } [13:31:13.489] else { [13:31:13.489] version <- NULL [13:31:13.489] } [13:31:13.489] if (!has_future || version < "1.8.0") { [13:31:13.489] info <- base::c(r_version = base::gsub("R version ", [13:31:13.489] "", base::R.version$version.string), [13:31:13.489] platform = base::sprintf("%s (%s-bit)", [13:31:13.489] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:13.489] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:13.489] "release", "version")], collapse = " "), [13:31:13.489] hostname = base::Sys.info()[["nodename"]]) [13:31:13.489] info <- base::sprintf("%s: %s", base::names(info), [13:31:13.489] info) [13:31:13.489] info <- base::paste(info, collapse = "; ") [13:31:13.489] if (!has_future) { [13:31:13.489] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:13.489] info) [13:31:13.489] } [13:31:13.489] else { [13:31:13.489] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:13.489] info, version) [13:31:13.489] } [13:31:13.489] base::stop(msg) [13:31:13.489] } [13:31:13.489] }) [13:31:13.489] } [13:31:13.489] ...future.strategy.old <- future::plan("list") [13:31:13.489] options(future.plan = NULL) [13:31:13.489] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.489] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:13.489] } [13:31:13.489] ...future.workdir <- getwd() [13:31:13.489] } [13:31:13.489] ...future.oldOptions <- base::as.list(base::.Options) [13:31:13.489] ...future.oldEnvVars <- base::Sys.getenv() [13:31:13.489] } [13:31:13.489] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:13.489] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:13.489] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:13.489] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:13.489] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:13.489] future.stdout.windows.reencode = NULL, width = 80L) [13:31:13.489] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:13.489] base::names(...future.oldOptions)) [13:31:13.489] } [13:31:13.489] if (FALSE) { [13:31:13.489] } [13:31:13.489] else { [13:31:13.489] if (TRUE) { [13:31:13.489] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:13.489] open = "w") [13:31:13.489] } [13:31:13.489] else { [13:31:13.489] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:13.489] windows = "NUL", "/dev/null"), open = "w") [13:31:13.489] } [13:31:13.489] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:13.489] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:13.489] base::sink(type = "output", split = FALSE) [13:31:13.489] base::close(...future.stdout) [13:31:13.489] }, add = TRUE) [13:31:13.489] } [13:31:13.489] ...future.frame <- base::sys.nframe() [13:31:13.489] ...future.conditions <- base::list() [13:31:13.489] ...future.rng <- base::globalenv()$.Random.seed [13:31:13.489] if (FALSE) { [13:31:13.489] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:13.489] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:13.489] } [13:31:13.489] ...future.result <- base::tryCatch({ [13:31:13.489] base::withCallingHandlers({ [13:31:13.489] ...future.value <- base::withVisible(base::local(NA)) [13:31:13.489] future::FutureResult(value = ...future.value$value, [13:31:13.489] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.489] ...future.rng), globalenv = if (FALSE) [13:31:13.489] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:13.489] ...future.globalenv.names)) [13:31:13.489] else NULL, started = ...future.startTime, version = "1.8") [13:31:13.489] }, condition = base::local({ [13:31:13.489] c <- base::c [13:31:13.489] inherits <- base::inherits [13:31:13.489] invokeRestart <- base::invokeRestart [13:31:13.489] length <- base::length [13:31:13.489] list <- base::list [13:31:13.489] seq.int <- base::seq.int [13:31:13.489] signalCondition <- base::signalCondition [13:31:13.489] sys.calls <- base::sys.calls [13:31:13.489] `[[` <- base::`[[` [13:31:13.489] `+` <- base::`+` [13:31:13.489] `<<-` <- base::`<<-` [13:31:13.489] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:13.489] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:13.489] 3L)] [13:31:13.489] } [13:31:13.489] function(cond) { [13:31:13.489] is_error <- inherits(cond, "error") [13:31:13.489] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:13.489] NULL) [13:31:13.489] if (is_error) { [13:31:13.489] sessionInformation <- function() { [13:31:13.489] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:13.489] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:13.489] search = base::search(), system = base::Sys.info()) [13:31:13.489] } [13:31:13.489] ...future.conditions[[length(...future.conditions) + [13:31:13.489] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:13.489] cond$call), session = sessionInformation(), [13:31:13.489] timestamp = base::Sys.time(), signaled = 0L) [13:31:13.489] signalCondition(cond) [13:31:13.489] } [13:31:13.489] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:13.489] signal <- FALSE && inherits(cond, character(0)) [13:31:13.489] ...future.conditions[[length(...future.conditions) + [13:31:13.489] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:13.489] if (FALSE && !signal) { [13:31:13.489] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.489] { [13:31:13.489] inherits <- base::inherits [13:31:13.489] invokeRestart <- base::invokeRestart [13:31:13.489] is.null <- base::is.null [13:31:13.489] muffled <- FALSE [13:31:13.489] if (inherits(cond, "message")) { [13:31:13.489] muffled <- grepl(pattern, "muffleMessage") [13:31:13.489] if (muffled) [13:31:13.489] invokeRestart("muffleMessage") [13:31:13.489] } [13:31:13.489] else if (inherits(cond, "warning")) { [13:31:13.489] muffled <- grepl(pattern, "muffleWarning") [13:31:13.489] if (muffled) [13:31:13.489] invokeRestart("muffleWarning") [13:31:13.489] } [13:31:13.489] else if (inherits(cond, "condition")) { [13:31:13.489] if (!is.null(pattern)) { [13:31:13.489] computeRestarts <- base::computeRestarts [13:31:13.489] grepl <- base::grepl [13:31:13.489] restarts <- computeRestarts(cond) [13:31:13.489] for (restart in restarts) { [13:31:13.489] name <- restart$name [13:31:13.489] if (is.null(name)) [13:31:13.489] next [13:31:13.489] if (!grepl(pattern, name)) [13:31:13.489] next [13:31:13.489] invokeRestart(restart) [13:31:13.489] muffled <- TRUE [13:31:13.489] break [13:31:13.489] } [13:31:13.489] } [13:31:13.489] } [13:31:13.489] invisible(muffled) [13:31:13.489] } [13:31:13.489] muffleCondition(cond, pattern = "^muffle") [13:31:13.489] } [13:31:13.489] } [13:31:13.489] else { [13:31:13.489] if (TRUE) { [13:31:13.489] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.489] { [13:31:13.489] inherits <- base::inherits [13:31:13.489] invokeRestart <- base::invokeRestart [13:31:13.489] is.null <- base::is.null [13:31:13.489] muffled <- FALSE [13:31:13.489] if (inherits(cond, "message")) { [13:31:13.489] muffled <- grepl(pattern, "muffleMessage") [13:31:13.489] if (muffled) [13:31:13.489] invokeRestart("muffleMessage") [13:31:13.489] } [13:31:13.489] else if (inherits(cond, "warning")) { [13:31:13.489] muffled <- grepl(pattern, "muffleWarning") [13:31:13.489] if (muffled) [13:31:13.489] invokeRestart("muffleWarning") [13:31:13.489] } [13:31:13.489] else if (inherits(cond, "condition")) { [13:31:13.489] if (!is.null(pattern)) { [13:31:13.489] computeRestarts <- base::computeRestarts [13:31:13.489] grepl <- base::grepl [13:31:13.489] restarts <- computeRestarts(cond) [13:31:13.489] for (restart in restarts) { [13:31:13.489] name <- restart$name [13:31:13.489] if (is.null(name)) [13:31:13.489] next [13:31:13.489] if (!grepl(pattern, name)) [13:31:13.489] next [13:31:13.489] invokeRestart(restart) [13:31:13.489] muffled <- TRUE [13:31:13.489] break [13:31:13.489] } [13:31:13.489] } [13:31:13.489] } [13:31:13.489] invisible(muffled) [13:31:13.489] } [13:31:13.489] muffleCondition(cond, pattern = "^muffle") [13:31:13.489] } [13:31:13.489] } [13:31:13.489] } [13:31:13.489] })) [13:31:13.489] }, error = function(ex) { [13:31:13.489] base::structure(base::list(value = NULL, visible = NULL, [13:31:13.489] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.489] ...future.rng), started = ...future.startTime, [13:31:13.489] finished = Sys.time(), session_uuid = NA_character_, [13:31:13.489] version = "1.8"), class = "FutureResult") [13:31:13.489] }, finally = { [13:31:13.489] if (!identical(...future.workdir, getwd())) [13:31:13.489] setwd(...future.workdir) [13:31:13.489] { [13:31:13.489] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:13.489] ...future.oldOptions$nwarnings <- NULL [13:31:13.489] } [13:31:13.489] base::options(...future.oldOptions) [13:31:13.489] if (.Platform$OS.type == "windows") { [13:31:13.489] old_names <- names(...future.oldEnvVars) [13:31:13.489] envs <- base::Sys.getenv() [13:31:13.489] names <- names(envs) [13:31:13.489] common <- intersect(names, old_names) [13:31:13.489] added <- setdiff(names, old_names) [13:31:13.489] removed <- setdiff(old_names, names) [13:31:13.489] changed <- common[...future.oldEnvVars[common] != [13:31:13.489] envs[common]] [13:31:13.489] NAMES <- toupper(changed) [13:31:13.489] args <- list() [13:31:13.489] for (kk in seq_along(NAMES)) { [13:31:13.489] name <- changed[[kk]] [13:31:13.489] NAME <- NAMES[[kk]] [13:31:13.489] if (name != NAME && is.element(NAME, old_names)) [13:31:13.489] next [13:31:13.489] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.489] } [13:31:13.489] NAMES <- toupper(added) [13:31:13.489] for (kk in seq_along(NAMES)) { [13:31:13.489] name <- added[[kk]] [13:31:13.489] NAME <- NAMES[[kk]] [13:31:13.489] if (name != NAME && is.element(NAME, old_names)) [13:31:13.489] next [13:31:13.489] args[[name]] <- "" [13:31:13.489] } [13:31:13.489] NAMES <- toupper(removed) [13:31:13.489] for (kk in seq_along(NAMES)) { [13:31:13.489] name <- removed[[kk]] [13:31:13.489] NAME <- NAMES[[kk]] [13:31:13.489] if (name != NAME && is.element(NAME, old_names)) [13:31:13.489] next [13:31:13.489] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.489] } [13:31:13.489] if (length(args) > 0) [13:31:13.489] base::do.call(base::Sys.setenv, args = args) [13:31:13.489] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:13.489] } [13:31:13.489] else { [13:31:13.489] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:13.489] } [13:31:13.489] { [13:31:13.489] if (base::length(...future.futureOptionsAdded) > [13:31:13.489] 0L) { [13:31:13.489] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:13.489] base::names(opts) <- ...future.futureOptionsAdded [13:31:13.489] base::options(opts) [13:31:13.489] } [13:31:13.489] { [13:31:13.489] NULL [13:31:13.489] options(future.plan = NULL) [13:31:13.489] if (is.na(NA_character_)) [13:31:13.489] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.489] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:13.489] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:13.489] .init = FALSE) [13:31:13.489] } [13:31:13.489] } [13:31:13.489] } [13:31:13.489] }) [13:31:13.489] if (TRUE) { [13:31:13.489] base::sink(type = "output", split = FALSE) [13:31:13.489] if (TRUE) { [13:31:13.489] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:13.489] } [13:31:13.489] else { [13:31:13.489] ...future.result["stdout"] <- base::list(NULL) [13:31:13.489] } [13:31:13.489] base::close(...future.stdout) [13:31:13.489] ...future.stdout <- NULL [13:31:13.489] } [13:31:13.489] ...future.result$conditions <- ...future.conditions [13:31:13.489] ...future.result$finished <- base::Sys.time() [13:31:13.489] ...future.result [13:31:13.489] } [13:31:13.605] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:31:13.605] 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 } [13:31:13.607] getGlobalsAndPackages() ... [13:31:13.607] Searching for globals... [13:31:13.616] - globals found: [4] '{', 'stopifnot', 'is.numeric', 'col' [13:31:13.616] Searching for globals ... DONE [13:31:13.616] Resolving globals: FALSE [13:31:13.617] The total size of the 1 globals is 56 bytes (56 bytes) [13:31:13.618] 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') [13:31:13.618] - globals: [1] 'col' [13:31:13.618] [13:31:13.618] getGlobalsAndPackages() ... DONE [13:31:13.619] run() for 'Future' ... [13:31:13.619] - state: 'created' [13:31:13.619] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:13.622] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:13.622] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:13.622] - Field: 'label' [13:31:13.622] - Field: 'local' [13:31:13.622] - Field: 'owner' [13:31:13.623] - Field: 'envir' [13:31:13.623] - Field: 'packages' [13:31:13.623] - Field: 'gc' [13:31:13.623] - Field: 'conditions' [13:31:13.623] - Field: 'expr' [13:31:13.623] - Field: 'uuid' [13:31:13.624] - Field: 'seed' [13:31:13.624] - Field: 'version' [13:31:13.624] - Field: 'result' [13:31:13.624] - Field: 'asynchronous' [13:31:13.624] - Field: 'calls' [13:31:13.624] - Field: 'globals' [13:31:13.625] - Field: 'stdout' [13:31:13.625] - Field: 'earlySignal' [13:31:13.625] - Field: 'lazy' [13:31:13.625] - Field: 'state' [13:31:13.625] - Field: '.cluster' [13:31:13.625] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:13.626] - Launch lazy future ... [13:31:13.626] Packages needed by the future expression (n = 0): [13:31:13.626] Packages needed by future strategies (n = 0): [13:31:13.627] { [13:31:13.627] { [13:31:13.627] { [13:31:13.627] ...future.startTime <- base::Sys.time() [13:31:13.627] { [13:31:13.627] { [13:31:13.627] { [13:31:13.627] base::local({ [13:31:13.627] has_future <- base::requireNamespace("future", [13:31:13.627] quietly = TRUE) [13:31:13.627] if (has_future) { [13:31:13.627] ns <- base::getNamespace("future") [13:31:13.627] version <- ns[[".package"]][["version"]] [13:31:13.627] if (is.null(version)) [13:31:13.627] version <- utils::packageVersion("future") [13:31:13.627] } [13:31:13.627] else { [13:31:13.627] version <- NULL [13:31:13.627] } [13:31:13.627] if (!has_future || version < "1.8.0") { [13:31:13.627] info <- base::c(r_version = base::gsub("R version ", [13:31:13.627] "", base::R.version$version.string), [13:31:13.627] platform = base::sprintf("%s (%s-bit)", [13:31:13.627] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:13.627] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:13.627] "release", "version")], collapse = " "), [13:31:13.627] hostname = base::Sys.info()[["nodename"]]) [13:31:13.627] info <- base::sprintf("%s: %s", base::names(info), [13:31:13.627] info) [13:31:13.627] info <- base::paste(info, collapse = "; ") [13:31:13.627] if (!has_future) { [13:31:13.627] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:13.627] info) [13:31:13.627] } [13:31:13.627] else { [13:31:13.627] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:13.627] info, version) [13:31:13.627] } [13:31:13.627] base::stop(msg) [13:31:13.627] } [13:31:13.627] }) [13:31:13.627] } [13:31:13.627] ...future.strategy.old <- future::plan("list") [13:31:13.627] options(future.plan = NULL) [13:31:13.627] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.627] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:13.627] } [13:31:13.627] ...future.workdir <- getwd() [13:31:13.627] } [13:31:13.627] ...future.oldOptions <- base::as.list(base::.Options) [13:31:13.627] ...future.oldEnvVars <- base::Sys.getenv() [13:31:13.627] } [13:31:13.627] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:13.627] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:13.627] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:13.627] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:13.627] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:13.627] future.stdout.windows.reencode = NULL, width = 80L) [13:31:13.627] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:13.627] base::names(...future.oldOptions)) [13:31:13.627] } [13:31:13.627] if (FALSE) { [13:31:13.627] } [13:31:13.627] else { [13:31:13.627] if (TRUE) { [13:31:13.627] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:13.627] open = "w") [13:31:13.627] } [13:31:13.627] else { [13:31:13.627] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:13.627] windows = "NUL", "/dev/null"), open = "w") [13:31:13.627] } [13:31:13.627] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:13.627] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:13.627] base::sink(type = "output", split = FALSE) [13:31:13.627] base::close(...future.stdout) [13:31:13.627] }, add = TRUE) [13:31:13.627] } [13:31:13.627] ...future.frame <- base::sys.nframe() [13:31:13.627] ...future.conditions <- base::list() [13:31:13.627] ...future.rng <- base::globalenv()$.Random.seed [13:31:13.627] if (FALSE) { [13:31:13.627] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:13.627] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:13.627] } [13:31:13.627] ...future.result <- base::tryCatch({ [13:31:13.627] base::withCallingHandlers({ [13:31:13.627] ...future.value <- base::withVisible(base::local({ [13:31:13.627] stopifnot(is.numeric(col)) [13:31:13.627] col [13:31:13.627] })) [13:31:13.627] future::FutureResult(value = ...future.value$value, [13:31:13.627] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.627] ...future.rng), globalenv = if (FALSE) [13:31:13.627] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:13.627] ...future.globalenv.names)) [13:31:13.627] else NULL, started = ...future.startTime, version = "1.8") [13:31:13.627] }, condition = base::local({ [13:31:13.627] c <- base::c [13:31:13.627] inherits <- base::inherits [13:31:13.627] invokeRestart <- base::invokeRestart [13:31:13.627] length <- base::length [13:31:13.627] list <- base::list [13:31:13.627] seq.int <- base::seq.int [13:31:13.627] signalCondition <- base::signalCondition [13:31:13.627] sys.calls <- base::sys.calls [13:31:13.627] `[[` <- base::`[[` [13:31:13.627] `+` <- base::`+` [13:31:13.627] `<<-` <- base::`<<-` [13:31:13.627] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:13.627] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:13.627] 3L)] [13:31:13.627] } [13:31:13.627] function(cond) { [13:31:13.627] is_error <- inherits(cond, "error") [13:31:13.627] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:13.627] NULL) [13:31:13.627] if (is_error) { [13:31:13.627] sessionInformation <- function() { [13:31:13.627] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:13.627] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:13.627] search = base::search(), system = base::Sys.info()) [13:31:13.627] } [13:31:13.627] ...future.conditions[[length(...future.conditions) + [13:31:13.627] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:13.627] cond$call), session = sessionInformation(), [13:31:13.627] timestamp = base::Sys.time(), signaled = 0L) [13:31:13.627] signalCondition(cond) [13:31:13.627] } [13:31:13.627] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:13.627] signal <- FALSE && inherits(cond, character(0)) [13:31:13.627] ...future.conditions[[length(...future.conditions) + [13:31:13.627] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:13.627] if (FALSE && !signal) { [13:31:13.627] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.627] { [13:31:13.627] inherits <- base::inherits [13:31:13.627] invokeRestart <- base::invokeRestart [13:31:13.627] is.null <- base::is.null [13:31:13.627] muffled <- FALSE [13:31:13.627] if (inherits(cond, "message")) { [13:31:13.627] muffled <- grepl(pattern, "muffleMessage") [13:31:13.627] if (muffled) [13:31:13.627] invokeRestart("muffleMessage") [13:31:13.627] } [13:31:13.627] else if (inherits(cond, "warning")) { [13:31:13.627] muffled <- grepl(pattern, "muffleWarning") [13:31:13.627] if (muffled) [13:31:13.627] invokeRestart("muffleWarning") [13:31:13.627] } [13:31:13.627] else if (inherits(cond, "condition")) { [13:31:13.627] if (!is.null(pattern)) { [13:31:13.627] computeRestarts <- base::computeRestarts [13:31:13.627] grepl <- base::grepl [13:31:13.627] restarts <- computeRestarts(cond) [13:31:13.627] for (restart in restarts) { [13:31:13.627] name <- restart$name [13:31:13.627] if (is.null(name)) [13:31:13.627] next [13:31:13.627] if (!grepl(pattern, name)) [13:31:13.627] next [13:31:13.627] invokeRestart(restart) [13:31:13.627] muffled <- TRUE [13:31:13.627] break [13:31:13.627] } [13:31:13.627] } [13:31:13.627] } [13:31:13.627] invisible(muffled) [13:31:13.627] } [13:31:13.627] muffleCondition(cond, pattern = "^muffle") [13:31:13.627] } [13:31:13.627] } [13:31:13.627] else { [13:31:13.627] if (TRUE) { [13:31:13.627] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.627] { [13:31:13.627] inherits <- base::inherits [13:31:13.627] invokeRestart <- base::invokeRestart [13:31:13.627] is.null <- base::is.null [13:31:13.627] muffled <- FALSE [13:31:13.627] if (inherits(cond, "message")) { [13:31:13.627] muffled <- grepl(pattern, "muffleMessage") [13:31:13.627] if (muffled) [13:31:13.627] invokeRestart("muffleMessage") [13:31:13.627] } [13:31:13.627] else if (inherits(cond, "warning")) { [13:31:13.627] muffled <- grepl(pattern, "muffleWarning") [13:31:13.627] if (muffled) [13:31:13.627] invokeRestart("muffleWarning") [13:31:13.627] } [13:31:13.627] else if (inherits(cond, "condition")) { [13:31:13.627] if (!is.null(pattern)) { [13:31:13.627] computeRestarts <- base::computeRestarts [13:31:13.627] grepl <- base::grepl [13:31:13.627] restarts <- computeRestarts(cond) [13:31:13.627] for (restart in restarts) { [13:31:13.627] name <- restart$name [13:31:13.627] if (is.null(name)) [13:31:13.627] next [13:31:13.627] if (!grepl(pattern, name)) [13:31:13.627] next [13:31:13.627] invokeRestart(restart) [13:31:13.627] muffled <- TRUE [13:31:13.627] break [13:31:13.627] } [13:31:13.627] } [13:31:13.627] } [13:31:13.627] invisible(muffled) [13:31:13.627] } [13:31:13.627] muffleCondition(cond, pattern = "^muffle") [13:31:13.627] } [13:31:13.627] } [13:31:13.627] } [13:31:13.627] })) [13:31:13.627] }, error = function(ex) { [13:31:13.627] base::structure(base::list(value = NULL, visible = NULL, [13:31:13.627] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.627] ...future.rng), started = ...future.startTime, [13:31:13.627] finished = Sys.time(), session_uuid = NA_character_, [13:31:13.627] version = "1.8"), class = "FutureResult") [13:31:13.627] }, finally = { [13:31:13.627] if (!identical(...future.workdir, getwd())) [13:31:13.627] setwd(...future.workdir) [13:31:13.627] { [13:31:13.627] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:13.627] ...future.oldOptions$nwarnings <- NULL [13:31:13.627] } [13:31:13.627] base::options(...future.oldOptions) [13:31:13.627] if (.Platform$OS.type == "windows") { [13:31:13.627] old_names <- names(...future.oldEnvVars) [13:31:13.627] envs <- base::Sys.getenv() [13:31:13.627] names <- names(envs) [13:31:13.627] common <- intersect(names, old_names) [13:31:13.627] added <- setdiff(names, old_names) [13:31:13.627] removed <- setdiff(old_names, names) [13:31:13.627] changed <- common[...future.oldEnvVars[common] != [13:31:13.627] envs[common]] [13:31:13.627] NAMES <- toupper(changed) [13:31:13.627] args <- list() [13:31:13.627] for (kk in seq_along(NAMES)) { [13:31:13.627] name <- changed[[kk]] [13:31:13.627] NAME <- NAMES[[kk]] [13:31:13.627] if (name != NAME && is.element(NAME, old_names)) [13:31:13.627] next [13:31:13.627] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.627] } [13:31:13.627] NAMES <- toupper(added) [13:31:13.627] for (kk in seq_along(NAMES)) { [13:31:13.627] name <- added[[kk]] [13:31:13.627] NAME <- NAMES[[kk]] [13:31:13.627] if (name != NAME && is.element(NAME, old_names)) [13:31:13.627] next [13:31:13.627] args[[name]] <- "" [13:31:13.627] } [13:31:13.627] NAMES <- toupper(removed) [13:31:13.627] for (kk in seq_along(NAMES)) { [13:31:13.627] name <- removed[[kk]] [13:31:13.627] NAME <- NAMES[[kk]] [13:31:13.627] if (name != NAME && is.element(NAME, old_names)) [13:31:13.627] next [13:31:13.627] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.627] } [13:31:13.627] if (length(args) > 0) [13:31:13.627] base::do.call(base::Sys.setenv, args = args) [13:31:13.627] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:13.627] } [13:31:13.627] else { [13:31:13.627] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:13.627] } [13:31:13.627] { [13:31:13.627] if (base::length(...future.futureOptionsAdded) > [13:31:13.627] 0L) { [13:31:13.627] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:13.627] base::names(opts) <- ...future.futureOptionsAdded [13:31:13.627] base::options(opts) [13:31:13.627] } [13:31:13.627] { [13:31:13.627] NULL [13:31:13.627] options(future.plan = NULL) [13:31:13.627] if (is.na(NA_character_)) [13:31:13.627] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.627] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:13.627] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:13.627] .init = FALSE) [13:31:13.627] } [13:31:13.627] } [13:31:13.627] } [13:31:13.627] }) [13:31:13.627] if (TRUE) { [13:31:13.627] base::sink(type = "output", split = FALSE) [13:31:13.627] if (TRUE) { [13:31:13.627] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:13.627] } [13:31:13.627] else { [13:31:13.627] ...future.result["stdout"] <- base::list(NULL) [13:31:13.627] } [13:31:13.627] base::close(...future.stdout) [13:31:13.627] ...future.stdout <- NULL [13:31:13.627] } [13:31:13.627] ...future.result$conditions <- ...future.conditions [13:31:13.627] ...future.result$finished <- base::Sys.time() [13:31:13.627] ...future.result [13:31:13.627] } [13:31:13.630] - Launch lazy future ... done [13:31:13.630] 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) [13:31:13.646] getGlobalsAndPackages() ... [13:31:13.647] Searching for globals... [13:31:13.649] - globals found: [6] 'FUN', '[[', 'x', 'ii', '...', '.Internal' [13:31:13.650] Searching for globals ... DONE [13:31:13.650] Resolving globals: FALSE [13:31:13.650] Tweak future expression to call with '...' arguments ... [13:31:13.650] { [13:31:13.650] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:13.650] } [13:31:13.650] Tweak future expression to call with '...' arguments ... DONE [13:31:13.651] The total size of the 4 globals is 2.69 KiB (2752 bytes) [13:31:13.652] 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') [13:31:13.652] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:31:13.652] [13:31:13.652] getGlobalsAndPackages() ... DONE [13:31:13.653] run() for 'Future' ... [13:31:13.653] - state: 'created' [13:31:13.653] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:13.655] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:13.656] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:13.656] - Field: 'label' [13:31:13.656] - Field: 'local' [13:31:13.656] - Field: 'owner' [13:31:13.656] - Field: 'envir' [13:31:13.656] - Field: 'packages' [13:31:13.657] - Field: 'gc' [13:31:13.657] - Field: 'conditions' [13:31:13.657] - Field: 'expr' [13:31:13.657] - Field: 'uuid' [13:31:13.657] - Field: 'seed' [13:31:13.657] - Field: 'version' [13:31:13.658] - Field: 'result' [13:31:13.658] - Field: 'asynchronous' [13:31:13.658] - Field: 'calls' [13:31:13.658] - Field: 'globals' [13:31:13.658] - Field: 'stdout' [13:31:13.658] - Field: 'earlySignal' [13:31:13.659] - Field: 'lazy' [13:31:13.659] - Field: 'state' [13:31:13.659] - Field: '.cluster' [13:31:13.659] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:13.659] - Launch lazy future ... [13:31:13.659] Packages needed by the future expression (n = 0): [13:31:13.660] Packages needed by future strategies (n = 0): [13:31:13.660] { [13:31:13.660] { [13:31:13.660] { [13:31:13.660] ...future.startTime <- base::Sys.time() [13:31:13.660] { [13:31:13.660] { [13:31:13.660] { [13:31:13.660] base::local({ [13:31:13.660] has_future <- base::requireNamespace("future", [13:31:13.660] quietly = TRUE) [13:31:13.660] if (has_future) { [13:31:13.660] ns <- base::getNamespace("future") [13:31:13.660] version <- ns[[".package"]][["version"]] [13:31:13.660] if (is.null(version)) [13:31:13.660] version <- utils::packageVersion("future") [13:31:13.660] } [13:31:13.660] else { [13:31:13.660] version <- NULL [13:31:13.660] } [13:31:13.660] if (!has_future || version < "1.8.0") { [13:31:13.660] info <- base::c(r_version = base::gsub("R version ", [13:31:13.660] "", base::R.version$version.string), [13:31:13.660] platform = base::sprintf("%s (%s-bit)", [13:31:13.660] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:13.660] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:13.660] "release", "version")], collapse = " "), [13:31:13.660] hostname = base::Sys.info()[["nodename"]]) [13:31:13.660] info <- base::sprintf("%s: %s", base::names(info), [13:31:13.660] info) [13:31:13.660] info <- base::paste(info, collapse = "; ") [13:31:13.660] if (!has_future) { [13:31:13.660] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:13.660] info) [13:31:13.660] } [13:31:13.660] else { [13:31:13.660] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:13.660] info, version) [13:31:13.660] } [13:31:13.660] base::stop(msg) [13:31:13.660] } [13:31:13.660] }) [13:31:13.660] } [13:31:13.660] ...future.strategy.old <- future::plan("list") [13:31:13.660] options(future.plan = NULL) [13:31:13.660] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.660] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:13.660] } [13:31:13.660] ...future.workdir <- getwd() [13:31:13.660] } [13:31:13.660] ...future.oldOptions <- base::as.list(base::.Options) [13:31:13.660] ...future.oldEnvVars <- base::Sys.getenv() [13:31:13.660] } [13:31:13.660] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:13.660] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:13.660] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:13.660] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:13.660] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:13.660] future.stdout.windows.reencode = NULL, width = 80L) [13:31:13.660] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:13.660] base::names(...future.oldOptions)) [13:31:13.660] } [13:31:13.660] if (FALSE) { [13:31:13.660] } [13:31:13.660] else { [13:31:13.660] if (TRUE) { [13:31:13.660] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:13.660] open = "w") [13:31:13.660] } [13:31:13.660] else { [13:31:13.660] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:13.660] windows = "NUL", "/dev/null"), open = "w") [13:31:13.660] } [13:31:13.660] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:13.660] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:13.660] base::sink(type = "output", split = FALSE) [13:31:13.660] base::close(...future.stdout) [13:31:13.660] }, add = TRUE) [13:31:13.660] } [13:31:13.660] ...future.frame <- base::sys.nframe() [13:31:13.660] ...future.conditions <- base::list() [13:31:13.660] ...future.rng <- base::globalenv()$.Random.seed [13:31:13.660] if (FALSE) { [13:31:13.660] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:13.660] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:13.660] } [13:31:13.660] ...future.result <- base::tryCatch({ [13:31:13.660] base::withCallingHandlers({ [13:31:13.660] ...future.value <- base::withVisible(base::local({ [13:31:13.660] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:13.660] })) [13:31:13.660] future::FutureResult(value = ...future.value$value, [13:31:13.660] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.660] ...future.rng), globalenv = if (FALSE) [13:31:13.660] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:13.660] ...future.globalenv.names)) [13:31:13.660] else NULL, started = ...future.startTime, version = "1.8") [13:31:13.660] }, condition = base::local({ [13:31:13.660] c <- base::c [13:31:13.660] inherits <- base::inherits [13:31:13.660] invokeRestart <- base::invokeRestart [13:31:13.660] length <- base::length [13:31:13.660] list <- base::list [13:31:13.660] seq.int <- base::seq.int [13:31:13.660] signalCondition <- base::signalCondition [13:31:13.660] sys.calls <- base::sys.calls [13:31:13.660] `[[` <- base::`[[` [13:31:13.660] `+` <- base::`+` [13:31:13.660] `<<-` <- base::`<<-` [13:31:13.660] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:13.660] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:13.660] 3L)] [13:31:13.660] } [13:31:13.660] function(cond) { [13:31:13.660] is_error <- inherits(cond, "error") [13:31:13.660] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:13.660] NULL) [13:31:13.660] if (is_error) { [13:31:13.660] sessionInformation <- function() { [13:31:13.660] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:13.660] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:13.660] search = base::search(), system = base::Sys.info()) [13:31:13.660] } [13:31:13.660] ...future.conditions[[length(...future.conditions) + [13:31:13.660] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:13.660] cond$call), session = sessionInformation(), [13:31:13.660] timestamp = base::Sys.time(), signaled = 0L) [13:31:13.660] signalCondition(cond) [13:31:13.660] } [13:31:13.660] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:13.660] signal <- FALSE && inherits(cond, character(0)) [13:31:13.660] ...future.conditions[[length(...future.conditions) + [13:31:13.660] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:13.660] if (FALSE && !signal) { [13:31:13.660] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.660] { [13:31:13.660] inherits <- base::inherits [13:31:13.660] invokeRestart <- base::invokeRestart [13:31:13.660] is.null <- base::is.null [13:31:13.660] muffled <- FALSE [13:31:13.660] if (inherits(cond, "message")) { [13:31:13.660] muffled <- grepl(pattern, "muffleMessage") [13:31:13.660] if (muffled) [13:31:13.660] invokeRestart("muffleMessage") [13:31:13.660] } [13:31:13.660] else if (inherits(cond, "warning")) { [13:31:13.660] muffled <- grepl(pattern, "muffleWarning") [13:31:13.660] if (muffled) [13:31:13.660] invokeRestart("muffleWarning") [13:31:13.660] } [13:31:13.660] else if (inherits(cond, "condition")) { [13:31:13.660] if (!is.null(pattern)) { [13:31:13.660] computeRestarts <- base::computeRestarts [13:31:13.660] grepl <- base::grepl [13:31:13.660] restarts <- computeRestarts(cond) [13:31:13.660] for (restart in restarts) { [13:31:13.660] name <- restart$name [13:31:13.660] if (is.null(name)) [13:31:13.660] next [13:31:13.660] if (!grepl(pattern, name)) [13:31:13.660] next [13:31:13.660] invokeRestart(restart) [13:31:13.660] muffled <- TRUE [13:31:13.660] break [13:31:13.660] } [13:31:13.660] } [13:31:13.660] } [13:31:13.660] invisible(muffled) [13:31:13.660] } [13:31:13.660] muffleCondition(cond, pattern = "^muffle") [13:31:13.660] } [13:31:13.660] } [13:31:13.660] else { [13:31:13.660] if (TRUE) { [13:31:13.660] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.660] { [13:31:13.660] inherits <- base::inherits [13:31:13.660] invokeRestart <- base::invokeRestart [13:31:13.660] is.null <- base::is.null [13:31:13.660] muffled <- FALSE [13:31:13.660] if (inherits(cond, "message")) { [13:31:13.660] muffled <- grepl(pattern, "muffleMessage") [13:31:13.660] if (muffled) [13:31:13.660] invokeRestart("muffleMessage") [13:31:13.660] } [13:31:13.660] else if (inherits(cond, "warning")) { [13:31:13.660] muffled <- grepl(pattern, "muffleWarning") [13:31:13.660] if (muffled) [13:31:13.660] invokeRestart("muffleWarning") [13:31:13.660] } [13:31:13.660] else if (inherits(cond, "condition")) { [13:31:13.660] if (!is.null(pattern)) { [13:31:13.660] computeRestarts <- base::computeRestarts [13:31:13.660] grepl <- base::grepl [13:31:13.660] restarts <- computeRestarts(cond) [13:31:13.660] for (restart in restarts) { [13:31:13.660] name <- restart$name [13:31:13.660] if (is.null(name)) [13:31:13.660] next [13:31:13.660] if (!grepl(pattern, name)) [13:31:13.660] next [13:31:13.660] invokeRestart(restart) [13:31:13.660] muffled <- TRUE [13:31:13.660] break [13:31:13.660] } [13:31:13.660] } [13:31:13.660] } [13:31:13.660] invisible(muffled) [13:31:13.660] } [13:31:13.660] muffleCondition(cond, pattern = "^muffle") [13:31:13.660] } [13:31:13.660] } [13:31:13.660] } [13:31:13.660] })) [13:31:13.660] }, error = function(ex) { [13:31:13.660] base::structure(base::list(value = NULL, visible = NULL, [13:31:13.660] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.660] ...future.rng), started = ...future.startTime, [13:31:13.660] finished = Sys.time(), session_uuid = NA_character_, [13:31:13.660] version = "1.8"), class = "FutureResult") [13:31:13.660] }, finally = { [13:31:13.660] if (!identical(...future.workdir, getwd())) [13:31:13.660] setwd(...future.workdir) [13:31:13.660] { [13:31:13.660] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:13.660] ...future.oldOptions$nwarnings <- NULL [13:31:13.660] } [13:31:13.660] base::options(...future.oldOptions) [13:31:13.660] if (.Platform$OS.type == "windows") { [13:31:13.660] old_names <- names(...future.oldEnvVars) [13:31:13.660] envs <- base::Sys.getenv() [13:31:13.660] names <- names(envs) [13:31:13.660] common <- intersect(names, old_names) [13:31:13.660] added <- setdiff(names, old_names) [13:31:13.660] removed <- setdiff(old_names, names) [13:31:13.660] changed <- common[...future.oldEnvVars[common] != [13:31:13.660] envs[common]] [13:31:13.660] NAMES <- toupper(changed) [13:31:13.660] args <- list() [13:31:13.660] for (kk in seq_along(NAMES)) { [13:31:13.660] name <- changed[[kk]] [13:31:13.660] NAME <- NAMES[[kk]] [13:31:13.660] if (name != NAME && is.element(NAME, old_names)) [13:31:13.660] next [13:31:13.660] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.660] } [13:31:13.660] NAMES <- toupper(added) [13:31:13.660] for (kk in seq_along(NAMES)) { [13:31:13.660] name <- added[[kk]] [13:31:13.660] NAME <- NAMES[[kk]] [13:31:13.660] if (name != NAME && is.element(NAME, old_names)) [13:31:13.660] next [13:31:13.660] args[[name]] <- "" [13:31:13.660] } [13:31:13.660] NAMES <- toupper(removed) [13:31:13.660] for (kk in seq_along(NAMES)) { [13:31:13.660] name <- removed[[kk]] [13:31:13.660] NAME <- NAMES[[kk]] [13:31:13.660] if (name != NAME && is.element(NAME, old_names)) [13:31:13.660] next [13:31:13.660] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.660] } [13:31:13.660] if (length(args) > 0) [13:31:13.660] base::do.call(base::Sys.setenv, args = args) [13:31:13.660] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:13.660] } [13:31:13.660] else { [13:31:13.660] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:13.660] } [13:31:13.660] { [13:31:13.660] if (base::length(...future.futureOptionsAdded) > [13:31:13.660] 0L) { [13:31:13.660] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:13.660] base::names(opts) <- ...future.futureOptionsAdded [13:31:13.660] base::options(opts) [13:31:13.660] } [13:31:13.660] { [13:31:13.660] NULL [13:31:13.660] options(future.plan = NULL) [13:31:13.660] if (is.na(NA_character_)) [13:31:13.660] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.660] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:13.660] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:13.660] .init = FALSE) [13:31:13.660] } [13:31:13.660] } [13:31:13.660] } [13:31:13.660] }) [13:31:13.660] if (TRUE) { [13:31:13.660] base::sink(type = "output", split = FALSE) [13:31:13.660] if (TRUE) { [13:31:13.660] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:13.660] } [13:31:13.660] else { [13:31:13.660] ...future.result["stdout"] <- base::list(NULL) [13:31:13.660] } [13:31:13.660] base::close(...future.stdout) [13:31:13.660] ...future.stdout <- NULL [13:31:13.660] } [13:31:13.660] ...future.result$conditions <- ...future.conditions [13:31:13.660] ...future.result$finished <- base::Sys.time() [13:31:13.660] ...future.result [13:31:13.660] } [13:31:13.664] - Launch lazy future ... done [13:31:13.664] run() for 'MiraiFuture' ... done [13:31:13.665] getGlobalsAndPackages() ... [13:31:13.665] Searching for globals... [13:31:13.667] - globals found: [6] 'FUN', '[[', 'x', 'ii', '...', '.Internal' [13:31:13.667] Searching for globals ... DONE [13:31:13.667] Resolving globals: FALSE [13:31:13.668] Tweak future expression to call with '...' arguments ... [13:31:13.668] { [13:31:13.668] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:13.668] } [13:31:13.668] Tweak future expression to call with '...' arguments ... DONE [13:31:13.669] The total size of the 4 globals is 2.69 KiB (2752 bytes) [13:31:13.669] 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') [13:31:13.670] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:31:13.670] [13:31:13.670] getGlobalsAndPackages() ... DONE [13:31:13.670] run() for 'Future' ... [13:31:13.670] - state: 'created' [13:31:13.671] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:13.673] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:13.673] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:13.673] - Field: 'label' [13:31:13.673] - Field: 'local' [13:31:13.674] - Field: 'owner' [13:31:13.674] - Field: 'envir' [13:31:13.674] - Field: 'packages' [13:31:13.674] - Field: 'gc' [13:31:13.674] - Field: 'conditions' [13:31:13.674] - Field: 'expr' [13:31:13.675] - Field: 'uuid' [13:31:13.675] - Field: 'seed' [13:31:13.675] - Field: 'version' [13:31:13.675] - Field: 'result' [13:31:13.675] - Field: 'asynchronous' [13:31:13.675] - Field: 'calls' [13:31:13.676] - Field: 'globals' [13:31:13.676] - Field: 'stdout' [13:31:13.676] - Field: 'earlySignal' [13:31:13.677] - Field: 'lazy' [13:31:13.677] - Field: 'state' [13:31:13.677] - Field: '.cluster' [13:31:13.678] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:13.678] - Launch lazy future ... [13:31:13.678] Packages needed by the future expression (n = 0): [13:31:13.678] Packages needed by future strategies (n = 0): [13:31:13.679] { [13:31:13.679] { [13:31:13.679] { [13:31:13.679] ...future.startTime <- base::Sys.time() [13:31:13.679] { [13:31:13.679] { [13:31:13.679] { [13:31:13.679] base::local({ [13:31:13.679] has_future <- base::requireNamespace("future", [13:31:13.679] quietly = TRUE) [13:31:13.679] if (has_future) { [13:31:13.679] ns <- base::getNamespace("future") [13:31:13.679] version <- ns[[".package"]][["version"]] [13:31:13.679] if (is.null(version)) [13:31:13.679] version <- utils::packageVersion("future") [13:31:13.679] } [13:31:13.679] else { [13:31:13.679] version <- NULL [13:31:13.679] } [13:31:13.679] if (!has_future || version < "1.8.0") { [13:31:13.679] info <- base::c(r_version = base::gsub("R version ", [13:31:13.679] "", base::R.version$version.string), [13:31:13.679] platform = base::sprintf("%s (%s-bit)", [13:31:13.679] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:13.679] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:13.679] "release", "version")], collapse = " "), [13:31:13.679] hostname = base::Sys.info()[["nodename"]]) [13:31:13.679] info <- base::sprintf("%s: %s", base::names(info), [13:31:13.679] info) [13:31:13.679] info <- base::paste(info, collapse = "; ") [13:31:13.679] if (!has_future) { [13:31:13.679] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:13.679] info) [13:31:13.679] } [13:31:13.679] else { [13:31:13.679] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:13.679] info, version) [13:31:13.679] } [13:31:13.679] base::stop(msg) [13:31:13.679] } [13:31:13.679] }) [13:31:13.679] } [13:31:13.679] ...future.strategy.old <- future::plan("list") [13:31:13.679] options(future.plan = NULL) [13:31:13.679] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.679] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:13.679] } [13:31:13.679] ...future.workdir <- getwd() [13:31:13.679] } [13:31:13.679] ...future.oldOptions <- base::as.list(base::.Options) [13:31:13.679] ...future.oldEnvVars <- base::Sys.getenv() [13:31:13.679] } [13:31:13.679] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:13.679] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:13.679] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:13.679] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:13.679] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:13.679] future.stdout.windows.reencode = NULL, width = 80L) [13:31:13.679] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:13.679] base::names(...future.oldOptions)) [13:31:13.679] } [13:31:13.679] if (FALSE) { [13:31:13.679] } [13:31:13.679] else { [13:31:13.679] if (TRUE) { [13:31:13.679] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:13.679] open = "w") [13:31:13.679] } [13:31:13.679] else { [13:31:13.679] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:13.679] windows = "NUL", "/dev/null"), open = "w") [13:31:13.679] } [13:31:13.679] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:13.679] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:13.679] base::sink(type = "output", split = FALSE) [13:31:13.679] base::close(...future.stdout) [13:31:13.679] }, add = TRUE) [13:31:13.679] } [13:31:13.679] ...future.frame <- base::sys.nframe() [13:31:13.679] ...future.conditions <- base::list() [13:31:13.679] ...future.rng <- base::globalenv()$.Random.seed [13:31:13.679] if (FALSE) { [13:31:13.679] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:13.679] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:13.679] } [13:31:13.679] ...future.result <- base::tryCatch({ [13:31:13.679] base::withCallingHandlers({ [13:31:13.679] ...future.value <- base::withVisible(base::local({ [13:31:13.679] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:13.679] })) [13:31:13.679] future::FutureResult(value = ...future.value$value, [13:31:13.679] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.679] ...future.rng), globalenv = if (FALSE) [13:31:13.679] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:13.679] ...future.globalenv.names)) [13:31:13.679] else NULL, started = ...future.startTime, version = "1.8") [13:31:13.679] }, condition = base::local({ [13:31:13.679] c <- base::c [13:31:13.679] inherits <- base::inherits [13:31:13.679] invokeRestart <- base::invokeRestart [13:31:13.679] length <- base::length [13:31:13.679] list <- base::list [13:31:13.679] seq.int <- base::seq.int [13:31:13.679] signalCondition <- base::signalCondition [13:31:13.679] sys.calls <- base::sys.calls [13:31:13.679] `[[` <- base::`[[` [13:31:13.679] `+` <- base::`+` [13:31:13.679] `<<-` <- base::`<<-` [13:31:13.679] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:13.679] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:13.679] 3L)] [13:31:13.679] } [13:31:13.679] function(cond) { [13:31:13.679] is_error <- inherits(cond, "error") [13:31:13.679] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:13.679] NULL) [13:31:13.679] if (is_error) { [13:31:13.679] sessionInformation <- function() { [13:31:13.679] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:13.679] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:13.679] search = base::search(), system = base::Sys.info()) [13:31:13.679] } [13:31:13.679] ...future.conditions[[length(...future.conditions) + [13:31:13.679] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:13.679] cond$call), session = sessionInformation(), [13:31:13.679] timestamp = base::Sys.time(), signaled = 0L) [13:31:13.679] signalCondition(cond) [13:31:13.679] } [13:31:13.679] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:13.679] signal <- FALSE && inherits(cond, character(0)) [13:31:13.679] ...future.conditions[[length(...future.conditions) + [13:31:13.679] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:13.679] if (FALSE && !signal) { [13:31:13.679] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.679] { [13:31:13.679] inherits <- base::inherits [13:31:13.679] invokeRestart <- base::invokeRestart [13:31:13.679] is.null <- base::is.null [13:31:13.679] muffled <- FALSE [13:31:13.679] if (inherits(cond, "message")) { [13:31:13.679] muffled <- grepl(pattern, "muffleMessage") [13:31:13.679] if (muffled) [13:31:13.679] invokeRestart("muffleMessage") [13:31:13.679] } [13:31:13.679] else if (inherits(cond, "warning")) { [13:31:13.679] muffled <- grepl(pattern, "muffleWarning") [13:31:13.679] if (muffled) [13:31:13.679] invokeRestart("muffleWarning") [13:31:13.679] } [13:31:13.679] else if (inherits(cond, "condition")) { [13:31:13.679] if (!is.null(pattern)) { [13:31:13.679] computeRestarts <- base::computeRestarts [13:31:13.679] grepl <- base::grepl [13:31:13.679] restarts <- computeRestarts(cond) [13:31:13.679] for (restart in restarts) { [13:31:13.679] name <- restart$name [13:31:13.679] if (is.null(name)) [13:31:13.679] next [13:31:13.679] if (!grepl(pattern, name)) [13:31:13.679] next [13:31:13.679] invokeRestart(restart) [13:31:13.679] muffled <- TRUE [13:31:13.679] break [13:31:13.679] } [13:31:13.679] } [13:31:13.679] } [13:31:13.679] invisible(muffled) [13:31:13.679] } [13:31:13.679] muffleCondition(cond, pattern = "^muffle") [13:31:13.679] } [13:31:13.679] } [13:31:13.679] else { [13:31:13.679] if (TRUE) { [13:31:13.679] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.679] { [13:31:13.679] inherits <- base::inherits [13:31:13.679] invokeRestart <- base::invokeRestart [13:31:13.679] is.null <- base::is.null [13:31:13.679] muffled <- FALSE [13:31:13.679] if (inherits(cond, "message")) { [13:31:13.679] muffled <- grepl(pattern, "muffleMessage") [13:31:13.679] if (muffled) [13:31:13.679] invokeRestart("muffleMessage") [13:31:13.679] } [13:31:13.679] else if (inherits(cond, "warning")) { [13:31:13.679] muffled <- grepl(pattern, "muffleWarning") [13:31:13.679] if (muffled) [13:31:13.679] invokeRestart("muffleWarning") [13:31:13.679] } [13:31:13.679] else if (inherits(cond, "condition")) { [13:31:13.679] if (!is.null(pattern)) { [13:31:13.679] computeRestarts <- base::computeRestarts [13:31:13.679] grepl <- base::grepl [13:31:13.679] restarts <- computeRestarts(cond) [13:31:13.679] for (restart in restarts) { [13:31:13.679] name <- restart$name [13:31:13.679] if (is.null(name)) [13:31:13.679] next [13:31:13.679] if (!grepl(pattern, name)) [13:31:13.679] next [13:31:13.679] invokeRestart(restart) [13:31:13.679] muffled <- TRUE [13:31:13.679] break [13:31:13.679] } [13:31:13.679] } [13:31:13.679] } [13:31:13.679] invisible(muffled) [13:31:13.679] } [13:31:13.679] muffleCondition(cond, pattern = "^muffle") [13:31:13.679] } [13:31:13.679] } [13:31:13.679] } [13:31:13.679] })) [13:31:13.679] }, error = function(ex) { [13:31:13.679] base::structure(base::list(value = NULL, visible = NULL, [13:31:13.679] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.679] ...future.rng), started = ...future.startTime, [13:31:13.679] finished = Sys.time(), session_uuid = NA_character_, [13:31:13.679] version = "1.8"), class = "FutureResult") [13:31:13.679] }, finally = { [13:31:13.679] if (!identical(...future.workdir, getwd())) [13:31:13.679] setwd(...future.workdir) [13:31:13.679] { [13:31:13.679] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:13.679] ...future.oldOptions$nwarnings <- NULL [13:31:13.679] } [13:31:13.679] base::options(...future.oldOptions) [13:31:13.679] if (.Platform$OS.type == "windows") { [13:31:13.679] old_names <- names(...future.oldEnvVars) [13:31:13.679] envs <- base::Sys.getenv() [13:31:13.679] names <- names(envs) [13:31:13.679] common <- intersect(names, old_names) [13:31:13.679] added <- setdiff(names, old_names) [13:31:13.679] removed <- setdiff(old_names, names) [13:31:13.679] changed <- common[...future.oldEnvVars[common] != [13:31:13.679] envs[common]] [13:31:13.679] NAMES <- toupper(changed) [13:31:13.679] args <- list() [13:31:13.679] for (kk in seq_along(NAMES)) { [13:31:13.679] name <- changed[[kk]] [13:31:13.679] NAME <- NAMES[[kk]] [13:31:13.679] if (name != NAME && is.element(NAME, old_names)) [13:31:13.679] next [13:31:13.679] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.679] } [13:31:13.679] NAMES <- toupper(added) [13:31:13.679] for (kk in seq_along(NAMES)) { [13:31:13.679] name <- added[[kk]] [13:31:13.679] NAME <- NAMES[[kk]] [13:31:13.679] if (name != NAME && is.element(NAME, old_names)) [13:31:13.679] next [13:31:13.679] args[[name]] <- "" [13:31:13.679] } [13:31:13.679] NAMES <- toupper(removed) [13:31:13.679] for (kk in seq_along(NAMES)) { [13:31:13.679] name <- removed[[kk]] [13:31:13.679] NAME <- NAMES[[kk]] [13:31:13.679] if (name != NAME && is.element(NAME, old_names)) [13:31:13.679] next [13:31:13.679] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.679] } [13:31:13.679] if (length(args) > 0) [13:31:13.679] base::do.call(base::Sys.setenv, args = args) [13:31:13.679] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:13.679] } [13:31:13.679] else { [13:31:13.679] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:13.679] } [13:31:13.679] { [13:31:13.679] if (base::length(...future.futureOptionsAdded) > [13:31:13.679] 0L) { [13:31:13.679] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:13.679] base::names(opts) <- ...future.futureOptionsAdded [13:31:13.679] base::options(opts) [13:31:13.679] } [13:31:13.679] { [13:31:13.679] NULL [13:31:13.679] options(future.plan = NULL) [13:31:13.679] if (is.na(NA_character_)) [13:31:13.679] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.679] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:13.679] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:13.679] .init = FALSE) [13:31:13.679] } [13:31:13.679] } [13:31:13.679] } [13:31:13.679] }) [13:31:13.679] if (TRUE) { [13:31:13.679] base::sink(type = "output", split = FALSE) [13:31:13.679] if (TRUE) { [13:31:13.679] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:13.679] } [13:31:13.679] else { [13:31:13.679] ...future.result["stdout"] <- base::list(NULL) [13:31:13.679] } [13:31:13.679] base::close(...future.stdout) [13:31:13.679] ...future.stdout <- NULL [13:31:13.679] } [13:31:13.679] ...future.result$conditions <- ...future.conditions [13:31:13.679] ...future.result$finished <- base::Sys.time() [13:31:13.679] ...future.result [13:31:13.679] } [13:31:13.682] - Launch lazy future ... done [13:31:13.683] run() for 'MiraiFuture' ... done [13:31:13.683] getGlobalsAndPackages() ... [13:31:13.683] Searching for globals... [13:31:13.686] - globals found: [6] 'FUN', '[[', 'x', 'ii', '...', '.Internal' [13:31:13.686] Searching for globals ... DONE [13:31:13.686] Resolving globals: FALSE [13:31:13.686] Tweak future expression to call with '...' arguments ... [13:31:13.686] { [13:31:13.686] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:13.686] } [13:31:13.687] Tweak future expression to call with '...' arguments ... DONE [13:31:13.687] The total size of the 4 globals is 2.69 KiB (2752 bytes) [13:31:13.688] 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') [13:31:13.688] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:31:13.688] [13:31:13.688] getGlobalsAndPackages() ... DONE [13:31:13.689] run() for 'Future' ... [13:31:13.689] - state: 'created' [13:31:13.689] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:13.691] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:13.691] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:13.692] - Field: 'label' [13:31:13.692] - Field: 'local' [13:31:13.692] - Field: 'owner' [13:31:13.692] - Field: 'envir' [13:31:13.692] - Field: 'packages' [13:31:13.692] - Field: 'gc' [13:31:13.693] - Field: 'conditions' [13:31:13.693] - Field: 'expr' [13:31:13.693] - Field: 'uuid' [13:31:13.693] - Field: 'seed' [13:31:13.693] - Field: 'version' [13:31:13.693] - Field: 'result' [13:31:13.694] - Field: 'asynchronous' [13:31:13.694] - Field: 'calls' [13:31:13.694] - Field: 'globals' [13:31:13.694] - Field: 'stdout' [13:31:13.694] - Field: 'earlySignal' [13:31:13.694] - Field: 'lazy' [13:31:13.695] - Field: 'state' [13:31:13.695] - Field: '.cluster' [13:31:13.695] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:13.695] - Launch lazy future ... [13:31:13.695] Packages needed by the future expression (n = 0): [13:31:13.696] Packages needed by future strategies (n = 0): [13:31:13.696] { [13:31:13.696] { [13:31:13.696] { [13:31:13.696] ...future.startTime <- base::Sys.time() [13:31:13.696] { [13:31:13.696] { [13:31:13.696] { [13:31:13.696] base::local({ [13:31:13.696] has_future <- base::requireNamespace("future", [13:31:13.696] quietly = TRUE) [13:31:13.696] if (has_future) { [13:31:13.696] ns <- base::getNamespace("future") [13:31:13.696] version <- ns[[".package"]][["version"]] [13:31:13.696] if (is.null(version)) [13:31:13.696] version <- utils::packageVersion("future") [13:31:13.696] } [13:31:13.696] else { [13:31:13.696] version <- NULL [13:31:13.696] } [13:31:13.696] if (!has_future || version < "1.8.0") { [13:31:13.696] info <- base::c(r_version = base::gsub("R version ", [13:31:13.696] "", base::R.version$version.string), [13:31:13.696] platform = base::sprintf("%s (%s-bit)", [13:31:13.696] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:13.696] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:13.696] "release", "version")], collapse = " "), [13:31:13.696] hostname = base::Sys.info()[["nodename"]]) [13:31:13.696] info <- base::sprintf("%s: %s", base::names(info), [13:31:13.696] info) [13:31:13.696] info <- base::paste(info, collapse = "; ") [13:31:13.696] if (!has_future) { [13:31:13.696] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:13.696] info) [13:31:13.696] } [13:31:13.696] else { [13:31:13.696] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:13.696] info, version) [13:31:13.696] } [13:31:13.696] base::stop(msg) [13:31:13.696] } [13:31:13.696] }) [13:31:13.696] } [13:31:13.696] ...future.strategy.old <- future::plan("list") [13:31:13.696] options(future.plan = NULL) [13:31:13.696] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.696] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:13.696] } [13:31:13.696] ...future.workdir <- getwd() [13:31:13.696] } [13:31:13.696] ...future.oldOptions <- base::as.list(base::.Options) [13:31:13.696] ...future.oldEnvVars <- base::Sys.getenv() [13:31:13.696] } [13:31:13.696] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:13.696] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:13.696] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:13.696] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:13.696] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:13.696] future.stdout.windows.reencode = NULL, width = 80L) [13:31:13.696] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:13.696] base::names(...future.oldOptions)) [13:31:13.696] } [13:31:13.696] if (FALSE) { [13:31:13.696] } [13:31:13.696] else { [13:31:13.696] if (TRUE) { [13:31:13.696] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:13.696] open = "w") [13:31:13.696] } [13:31:13.696] else { [13:31:13.696] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:13.696] windows = "NUL", "/dev/null"), open = "w") [13:31:13.696] } [13:31:13.696] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:13.696] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:13.696] base::sink(type = "output", split = FALSE) [13:31:13.696] base::close(...future.stdout) [13:31:13.696] }, add = TRUE) [13:31:13.696] } [13:31:13.696] ...future.frame <- base::sys.nframe() [13:31:13.696] ...future.conditions <- base::list() [13:31:13.696] ...future.rng <- base::globalenv()$.Random.seed [13:31:13.696] if (FALSE) { [13:31:13.696] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:13.696] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:13.696] } [13:31:13.696] ...future.result <- base::tryCatch({ [13:31:13.696] base::withCallingHandlers({ [13:31:13.696] ...future.value <- base::withVisible(base::local({ [13:31:13.696] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:13.696] })) [13:31:13.696] future::FutureResult(value = ...future.value$value, [13:31:13.696] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.696] ...future.rng), globalenv = if (FALSE) [13:31:13.696] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:13.696] ...future.globalenv.names)) [13:31:13.696] else NULL, started = ...future.startTime, version = "1.8") [13:31:13.696] }, condition = base::local({ [13:31:13.696] c <- base::c [13:31:13.696] inherits <- base::inherits [13:31:13.696] invokeRestart <- base::invokeRestart [13:31:13.696] length <- base::length [13:31:13.696] list <- base::list [13:31:13.696] seq.int <- base::seq.int [13:31:13.696] signalCondition <- base::signalCondition [13:31:13.696] sys.calls <- base::sys.calls [13:31:13.696] `[[` <- base::`[[` [13:31:13.696] `+` <- base::`+` [13:31:13.696] `<<-` <- base::`<<-` [13:31:13.696] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:13.696] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:13.696] 3L)] [13:31:13.696] } [13:31:13.696] function(cond) { [13:31:13.696] is_error <- inherits(cond, "error") [13:31:13.696] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:13.696] NULL) [13:31:13.696] if (is_error) { [13:31:13.696] sessionInformation <- function() { [13:31:13.696] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:13.696] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:13.696] search = base::search(), system = base::Sys.info()) [13:31:13.696] } [13:31:13.696] ...future.conditions[[length(...future.conditions) + [13:31:13.696] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:13.696] cond$call), session = sessionInformation(), [13:31:13.696] timestamp = base::Sys.time(), signaled = 0L) [13:31:13.696] signalCondition(cond) [13:31:13.696] } [13:31:13.696] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:13.696] signal <- FALSE && inherits(cond, character(0)) [13:31:13.696] ...future.conditions[[length(...future.conditions) + [13:31:13.696] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:13.696] if (FALSE && !signal) { [13:31:13.696] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.696] { [13:31:13.696] inherits <- base::inherits [13:31:13.696] invokeRestart <- base::invokeRestart [13:31:13.696] is.null <- base::is.null [13:31:13.696] muffled <- FALSE [13:31:13.696] if (inherits(cond, "message")) { [13:31:13.696] muffled <- grepl(pattern, "muffleMessage") [13:31:13.696] if (muffled) [13:31:13.696] invokeRestart("muffleMessage") [13:31:13.696] } [13:31:13.696] else if (inherits(cond, "warning")) { [13:31:13.696] muffled <- grepl(pattern, "muffleWarning") [13:31:13.696] if (muffled) [13:31:13.696] invokeRestart("muffleWarning") [13:31:13.696] } [13:31:13.696] else if (inherits(cond, "condition")) { [13:31:13.696] if (!is.null(pattern)) { [13:31:13.696] computeRestarts <- base::computeRestarts [13:31:13.696] grepl <- base::grepl [13:31:13.696] restarts <- computeRestarts(cond) [13:31:13.696] for (restart in restarts) { [13:31:13.696] name <- restart$name [13:31:13.696] if (is.null(name)) [13:31:13.696] next [13:31:13.696] if (!grepl(pattern, name)) [13:31:13.696] next [13:31:13.696] invokeRestart(restart) [13:31:13.696] muffled <- TRUE [13:31:13.696] break [13:31:13.696] } [13:31:13.696] } [13:31:13.696] } [13:31:13.696] invisible(muffled) [13:31:13.696] } [13:31:13.696] muffleCondition(cond, pattern = "^muffle") [13:31:13.696] } [13:31:13.696] } [13:31:13.696] else { [13:31:13.696] if (TRUE) { [13:31:13.696] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.696] { [13:31:13.696] inherits <- base::inherits [13:31:13.696] invokeRestart <- base::invokeRestart [13:31:13.696] is.null <- base::is.null [13:31:13.696] muffled <- FALSE [13:31:13.696] if (inherits(cond, "message")) { [13:31:13.696] muffled <- grepl(pattern, "muffleMessage") [13:31:13.696] if (muffled) [13:31:13.696] invokeRestart("muffleMessage") [13:31:13.696] } [13:31:13.696] else if (inherits(cond, "warning")) { [13:31:13.696] muffled <- grepl(pattern, "muffleWarning") [13:31:13.696] if (muffled) [13:31:13.696] invokeRestart("muffleWarning") [13:31:13.696] } [13:31:13.696] else if (inherits(cond, "condition")) { [13:31:13.696] if (!is.null(pattern)) { [13:31:13.696] computeRestarts <- base::computeRestarts [13:31:13.696] grepl <- base::grepl [13:31:13.696] restarts <- computeRestarts(cond) [13:31:13.696] for (restart in restarts) { [13:31:13.696] name <- restart$name [13:31:13.696] if (is.null(name)) [13:31:13.696] next [13:31:13.696] if (!grepl(pattern, name)) [13:31:13.696] next [13:31:13.696] invokeRestart(restart) [13:31:13.696] muffled <- TRUE [13:31:13.696] break [13:31:13.696] } [13:31:13.696] } [13:31:13.696] } [13:31:13.696] invisible(muffled) [13:31:13.696] } [13:31:13.696] muffleCondition(cond, pattern = "^muffle") [13:31:13.696] } [13:31:13.696] } [13:31:13.696] } [13:31:13.696] })) [13:31:13.696] }, error = function(ex) { [13:31:13.696] base::structure(base::list(value = NULL, visible = NULL, [13:31:13.696] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.696] ...future.rng), started = ...future.startTime, [13:31:13.696] finished = Sys.time(), session_uuid = NA_character_, [13:31:13.696] version = "1.8"), class = "FutureResult") [13:31:13.696] }, finally = { [13:31:13.696] if (!identical(...future.workdir, getwd())) [13:31:13.696] setwd(...future.workdir) [13:31:13.696] { [13:31:13.696] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:13.696] ...future.oldOptions$nwarnings <- NULL [13:31:13.696] } [13:31:13.696] base::options(...future.oldOptions) [13:31:13.696] if (.Platform$OS.type == "windows") { [13:31:13.696] old_names <- names(...future.oldEnvVars) [13:31:13.696] envs <- base::Sys.getenv() [13:31:13.696] names <- names(envs) [13:31:13.696] common <- intersect(names, old_names) [13:31:13.696] added <- setdiff(names, old_names) [13:31:13.696] removed <- setdiff(old_names, names) [13:31:13.696] changed <- common[...future.oldEnvVars[common] != [13:31:13.696] envs[common]] [13:31:13.696] NAMES <- toupper(changed) [13:31:13.696] args <- list() [13:31:13.696] for (kk in seq_along(NAMES)) { [13:31:13.696] name <- changed[[kk]] [13:31:13.696] NAME <- NAMES[[kk]] [13:31:13.696] if (name != NAME && is.element(NAME, old_names)) [13:31:13.696] next [13:31:13.696] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.696] } [13:31:13.696] NAMES <- toupper(added) [13:31:13.696] for (kk in seq_along(NAMES)) { [13:31:13.696] name <- added[[kk]] [13:31:13.696] NAME <- NAMES[[kk]] [13:31:13.696] if (name != NAME && is.element(NAME, old_names)) [13:31:13.696] next [13:31:13.696] args[[name]] <- "" [13:31:13.696] } [13:31:13.696] NAMES <- toupper(removed) [13:31:13.696] for (kk in seq_along(NAMES)) { [13:31:13.696] name <- removed[[kk]] [13:31:13.696] NAME <- NAMES[[kk]] [13:31:13.696] if (name != NAME && is.element(NAME, old_names)) [13:31:13.696] next [13:31:13.696] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.696] } [13:31:13.696] if (length(args) > 0) [13:31:13.696] base::do.call(base::Sys.setenv, args = args) [13:31:13.696] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:13.696] } [13:31:13.696] else { [13:31:13.696] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:13.696] } [13:31:13.696] { [13:31:13.696] if (base::length(...future.futureOptionsAdded) > [13:31:13.696] 0L) { [13:31:13.696] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:13.696] base::names(opts) <- ...future.futureOptionsAdded [13:31:13.696] base::options(opts) [13:31:13.696] } [13:31:13.696] { [13:31:13.696] NULL [13:31:13.696] options(future.plan = NULL) [13:31:13.696] if (is.na(NA_character_)) [13:31:13.696] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.696] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:13.696] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:13.696] .init = FALSE) [13:31:13.696] } [13:31:13.696] } [13:31:13.696] } [13:31:13.696] }) [13:31:13.696] if (TRUE) { [13:31:13.696] base::sink(type = "output", split = FALSE) [13:31:13.696] if (TRUE) { [13:31:13.696] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:13.696] } [13:31:13.696] else { [13:31:13.696] ...future.result["stdout"] <- base::list(NULL) [13:31:13.696] } [13:31:13.696] base::close(...future.stdout) [13:31:13.696] ...future.stdout <- NULL [13:31:13.696] } [13:31:13.696] ...future.result$conditions <- ...future.conditions [13:31:13.696] ...future.result$finished <- base::Sys.time() [13:31:13.696] ...future.result [13:31:13.696] } [13:31:13.700] - Launch lazy future ... done [13:31:13.700] run() for 'MiraiFuture' ... done [13:31:13.700] getGlobalsAndPackages() ... [13:31:13.701] Searching for globals... [13:31:13.703] - globals found: [6] 'FUN', '[[', 'x', 'ii', '...', '.Internal' [13:31:13.703] Searching for globals ... DONE [13:31:13.703] Resolving globals: FALSE [13:31:13.703] Tweak future expression to call with '...' arguments ... [13:31:13.704] { [13:31:13.704] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:13.704] } [13:31:13.704] Tweak future expression to call with '...' arguments ... DONE [13:31:13.705] The total size of the 4 globals is 2.69 KiB (2752 bytes) [13:31:13.705] 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') [13:31:13.705] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:31:13.706] [13:31:13.706] getGlobalsAndPackages() ... DONE [13:31:13.706] run() for 'Future' ... [13:31:13.706] - state: 'created' [13:31:13.706] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:13.709] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:13.709] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:13.709] - Field: 'label' [13:31:13.709] - Field: 'local' [13:31:13.709] - Field: 'owner' [13:31:13.710] - Field: 'envir' [13:31:13.710] - Field: 'packages' [13:31:13.710] - Field: 'gc' [13:31:13.710] - Field: 'conditions' [13:31:13.711] - Field: 'expr' [13:31:13.711] - Field: 'uuid' [13:31:13.711] - Field: 'seed' [13:31:13.712] - Field: 'version' [13:31:13.712] - Field: 'result' [13:31:13.712] - Field: 'asynchronous' [13:31:13.712] - Field: 'calls' [13:31:13.712] - Field: 'globals' [13:31:13.712] - Field: 'stdout' [13:31:13.713] - Field: 'earlySignal' [13:31:13.713] - Field: 'lazy' [13:31:13.713] - Field: 'state' [13:31:13.713] - Field: '.cluster' [13:31:13.713] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:13.713] - Launch lazy future ... [13:31:13.714] Packages needed by the future expression (n = 0): [13:31:13.714] Packages needed by future strategies (n = 0): [13:31:13.714] { [13:31:13.714] { [13:31:13.714] { [13:31:13.714] ...future.startTime <- base::Sys.time() [13:31:13.714] { [13:31:13.714] { [13:31:13.714] { [13:31:13.714] base::local({ [13:31:13.714] has_future <- base::requireNamespace("future", [13:31:13.714] quietly = TRUE) [13:31:13.714] if (has_future) { [13:31:13.714] ns <- base::getNamespace("future") [13:31:13.714] version <- ns[[".package"]][["version"]] [13:31:13.714] if (is.null(version)) [13:31:13.714] version <- utils::packageVersion("future") [13:31:13.714] } [13:31:13.714] else { [13:31:13.714] version <- NULL [13:31:13.714] } [13:31:13.714] if (!has_future || version < "1.8.0") { [13:31:13.714] info <- base::c(r_version = base::gsub("R version ", [13:31:13.714] "", base::R.version$version.string), [13:31:13.714] platform = base::sprintf("%s (%s-bit)", [13:31:13.714] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:13.714] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:13.714] "release", "version")], collapse = " "), [13:31:13.714] hostname = base::Sys.info()[["nodename"]]) [13:31:13.714] info <- base::sprintf("%s: %s", base::names(info), [13:31:13.714] info) [13:31:13.714] info <- base::paste(info, collapse = "; ") [13:31:13.714] if (!has_future) { [13:31:13.714] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:13.714] info) [13:31:13.714] } [13:31:13.714] else { [13:31:13.714] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:13.714] info, version) [13:31:13.714] } [13:31:13.714] base::stop(msg) [13:31:13.714] } [13:31:13.714] }) [13:31:13.714] } [13:31:13.714] ...future.strategy.old <- future::plan("list") [13:31:13.714] options(future.plan = NULL) [13:31:13.714] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.714] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:13.714] } [13:31:13.714] ...future.workdir <- getwd() [13:31:13.714] } [13:31:13.714] ...future.oldOptions <- base::as.list(base::.Options) [13:31:13.714] ...future.oldEnvVars <- base::Sys.getenv() [13:31:13.714] } [13:31:13.714] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:13.714] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:13.714] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:13.714] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:13.714] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:13.714] future.stdout.windows.reencode = NULL, width = 80L) [13:31:13.714] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:13.714] base::names(...future.oldOptions)) [13:31:13.714] } [13:31:13.714] if (FALSE) { [13:31:13.714] } [13:31:13.714] else { [13:31:13.714] if (TRUE) { [13:31:13.714] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:13.714] open = "w") [13:31:13.714] } [13:31:13.714] else { [13:31:13.714] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:13.714] windows = "NUL", "/dev/null"), open = "w") [13:31:13.714] } [13:31:13.714] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:13.714] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:13.714] base::sink(type = "output", split = FALSE) [13:31:13.714] base::close(...future.stdout) [13:31:13.714] }, add = TRUE) [13:31:13.714] } [13:31:13.714] ...future.frame <- base::sys.nframe() [13:31:13.714] ...future.conditions <- base::list() [13:31:13.714] ...future.rng <- base::globalenv()$.Random.seed [13:31:13.714] if (FALSE) { [13:31:13.714] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:13.714] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:13.714] } [13:31:13.714] ...future.result <- base::tryCatch({ [13:31:13.714] base::withCallingHandlers({ [13:31:13.714] ...future.value <- base::withVisible(base::local({ [13:31:13.714] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:13.714] })) [13:31:13.714] future::FutureResult(value = ...future.value$value, [13:31:13.714] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.714] ...future.rng), globalenv = if (FALSE) [13:31:13.714] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:13.714] ...future.globalenv.names)) [13:31:13.714] else NULL, started = ...future.startTime, version = "1.8") [13:31:13.714] }, condition = base::local({ [13:31:13.714] c <- base::c [13:31:13.714] inherits <- base::inherits [13:31:13.714] invokeRestart <- base::invokeRestart [13:31:13.714] length <- base::length [13:31:13.714] list <- base::list [13:31:13.714] seq.int <- base::seq.int [13:31:13.714] signalCondition <- base::signalCondition [13:31:13.714] sys.calls <- base::sys.calls [13:31:13.714] `[[` <- base::`[[` [13:31:13.714] `+` <- base::`+` [13:31:13.714] `<<-` <- base::`<<-` [13:31:13.714] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:13.714] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:13.714] 3L)] [13:31:13.714] } [13:31:13.714] function(cond) { [13:31:13.714] is_error <- inherits(cond, "error") [13:31:13.714] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:13.714] NULL) [13:31:13.714] if (is_error) { [13:31:13.714] sessionInformation <- function() { [13:31:13.714] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:13.714] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:13.714] search = base::search(), system = base::Sys.info()) [13:31:13.714] } [13:31:13.714] ...future.conditions[[length(...future.conditions) + [13:31:13.714] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:13.714] cond$call), session = sessionInformation(), [13:31:13.714] timestamp = base::Sys.time(), signaled = 0L) [13:31:13.714] signalCondition(cond) [13:31:13.714] } [13:31:13.714] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:13.714] signal <- FALSE && inherits(cond, character(0)) [13:31:13.714] ...future.conditions[[length(...future.conditions) + [13:31:13.714] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:13.714] if (FALSE && !signal) { [13:31:13.714] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.714] { [13:31:13.714] inherits <- base::inherits [13:31:13.714] invokeRestart <- base::invokeRestart [13:31:13.714] is.null <- base::is.null [13:31:13.714] muffled <- FALSE [13:31:13.714] if (inherits(cond, "message")) { [13:31:13.714] muffled <- grepl(pattern, "muffleMessage") [13:31:13.714] if (muffled) [13:31:13.714] invokeRestart("muffleMessage") [13:31:13.714] } [13:31:13.714] else if (inherits(cond, "warning")) { [13:31:13.714] muffled <- grepl(pattern, "muffleWarning") [13:31:13.714] if (muffled) [13:31:13.714] invokeRestart("muffleWarning") [13:31:13.714] } [13:31:13.714] else if (inherits(cond, "condition")) { [13:31:13.714] if (!is.null(pattern)) { [13:31:13.714] computeRestarts <- base::computeRestarts [13:31:13.714] grepl <- base::grepl [13:31:13.714] restarts <- computeRestarts(cond) [13:31:13.714] for (restart in restarts) { [13:31:13.714] name <- restart$name [13:31:13.714] if (is.null(name)) [13:31:13.714] next [13:31:13.714] if (!grepl(pattern, name)) [13:31:13.714] next [13:31:13.714] invokeRestart(restart) [13:31:13.714] muffled <- TRUE [13:31:13.714] break [13:31:13.714] } [13:31:13.714] } [13:31:13.714] } [13:31:13.714] invisible(muffled) [13:31:13.714] } [13:31:13.714] muffleCondition(cond, pattern = "^muffle") [13:31:13.714] } [13:31:13.714] } [13:31:13.714] else { [13:31:13.714] if (TRUE) { [13:31:13.714] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.714] { [13:31:13.714] inherits <- base::inherits [13:31:13.714] invokeRestart <- base::invokeRestart [13:31:13.714] is.null <- base::is.null [13:31:13.714] muffled <- FALSE [13:31:13.714] if (inherits(cond, "message")) { [13:31:13.714] muffled <- grepl(pattern, "muffleMessage") [13:31:13.714] if (muffled) [13:31:13.714] invokeRestart("muffleMessage") [13:31:13.714] } [13:31:13.714] else if (inherits(cond, "warning")) { [13:31:13.714] muffled <- grepl(pattern, "muffleWarning") [13:31:13.714] if (muffled) [13:31:13.714] invokeRestart("muffleWarning") [13:31:13.714] } [13:31:13.714] else if (inherits(cond, "condition")) { [13:31:13.714] if (!is.null(pattern)) { [13:31:13.714] computeRestarts <- base::computeRestarts [13:31:13.714] grepl <- base::grepl [13:31:13.714] restarts <- computeRestarts(cond) [13:31:13.714] for (restart in restarts) { [13:31:13.714] name <- restart$name [13:31:13.714] if (is.null(name)) [13:31:13.714] next [13:31:13.714] if (!grepl(pattern, name)) [13:31:13.714] next [13:31:13.714] invokeRestart(restart) [13:31:13.714] muffled <- TRUE [13:31:13.714] break [13:31:13.714] } [13:31:13.714] } [13:31:13.714] } [13:31:13.714] invisible(muffled) [13:31:13.714] } [13:31:13.714] muffleCondition(cond, pattern = "^muffle") [13:31:13.714] } [13:31:13.714] } [13:31:13.714] } [13:31:13.714] })) [13:31:13.714] }, error = function(ex) { [13:31:13.714] base::structure(base::list(value = NULL, visible = NULL, [13:31:13.714] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.714] ...future.rng), started = ...future.startTime, [13:31:13.714] finished = Sys.time(), session_uuid = NA_character_, [13:31:13.714] version = "1.8"), class = "FutureResult") [13:31:13.714] }, finally = { [13:31:13.714] if (!identical(...future.workdir, getwd())) [13:31:13.714] setwd(...future.workdir) [13:31:13.714] { [13:31:13.714] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:13.714] ...future.oldOptions$nwarnings <- NULL [13:31:13.714] } [13:31:13.714] base::options(...future.oldOptions) [13:31:13.714] if (.Platform$OS.type == "windows") { [13:31:13.714] old_names <- names(...future.oldEnvVars) [13:31:13.714] envs <- base::Sys.getenv() [13:31:13.714] names <- names(envs) [13:31:13.714] common <- intersect(names, old_names) [13:31:13.714] added <- setdiff(names, old_names) [13:31:13.714] removed <- setdiff(old_names, names) [13:31:13.714] changed <- common[...future.oldEnvVars[common] != [13:31:13.714] envs[common]] [13:31:13.714] NAMES <- toupper(changed) [13:31:13.714] args <- list() [13:31:13.714] for (kk in seq_along(NAMES)) { [13:31:13.714] name <- changed[[kk]] [13:31:13.714] NAME <- NAMES[[kk]] [13:31:13.714] if (name != NAME && is.element(NAME, old_names)) [13:31:13.714] next [13:31:13.714] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.714] } [13:31:13.714] NAMES <- toupper(added) [13:31:13.714] for (kk in seq_along(NAMES)) { [13:31:13.714] name <- added[[kk]] [13:31:13.714] NAME <- NAMES[[kk]] [13:31:13.714] if (name != NAME && is.element(NAME, old_names)) [13:31:13.714] next [13:31:13.714] args[[name]] <- "" [13:31:13.714] } [13:31:13.714] NAMES <- toupper(removed) [13:31:13.714] for (kk in seq_along(NAMES)) { [13:31:13.714] name <- removed[[kk]] [13:31:13.714] NAME <- NAMES[[kk]] [13:31:13.714] if (name != NAME && is.element(NAME, old_names)) [13:31:13.714] next [13:31:13.714] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.714] } [13:31:13.714] if (length(args) > 0) [13:31:13.714] base::do.call(base::Sys.setenv, args = args) [13:31:13.714] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:13.714] } [13:31:13.714] else { [13:31:13.714] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:13.714] } [13:31:13.714] { [13:31:13.714] if (base::length(...future.futureOptionsAdded) > [13:31:13.714] 0L) { [13:31:13.714] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:13.714] base::names(opts) <- ...future.futureOptionsAdded [13:31:13.714] base::options(opts) [13:31:13.714] } [13:31:13.714] { [13:31:13.714] NULL [13:31:13.714] options(future.plan = NULL) [13:31:13.714] if (is.na(NA_character_)) [13:31:13.714] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.714] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:13.714] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:13.714] .init = FALSE) [13:31:13.714] } [13:31:13.714] } [13:31:13.714] } [13:31:13.714] }) [13:31:13.714] if (TRUE) { [13:31:13.714] base::sink(type = "output", split = FALSE) [13:31:13.714] if (TRUE) { [13:31:13.714] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:13.714] } [13:31:13.714] else { [13:31:13.714] ...future.result["stdout"] <- base::list(NULL) [13:31:13.714] } [13:31:13.714] base::close(...future.stdout) [13:31:13.714] ...future.stdout <- NULL [13:31:13.714] } [13:31:13.714] ...future.result$conditions <- ...future.conditions [13:31:13.714] ...future.result$finished <- base::Sys.time() [13:31:13.714] ...future.result [13:31:13.714] } [13:31:13.718] - Launch lazy future ... done [13:31:13.718] 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) [13:31:13.725] getGlobalsAndPackages() ... [13:31:13.725] Searching for globals... [13:31:13.736] - globals found: [26] 'FUN', '[[', 'x', 'ii', '...', 'if', 'missing', 'is.finite', '{', 'is.null', '<-', 'paste', 'length', '==', 'return', '>', '+', '[', 'seq_len', 'rev', 'c', '&&', '!', ':', '(', '-' [13:31:13.737] Searching for globals ... DONE [13:31:13.737] Resolving globals: FALSE [13:31:13.737] Tweak future expression to call with '...' arguments ... [13:31:13.738] { [13:31:13.738] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:13.738] } [13:31:13.738] Tweak future expression to call with '...' arguments ... DONE [13:31:13.739] The total size of the 4 globals is 82.66 KiB (84648 bytes) [13:31:13.740] 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') [13:31:13.740] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:31:13.740] - packages: [1] 'future' [13:31:13.740] getGlobalsAndPackages() ... DONE [13:31:13.741] run() for 'Future' ... [13:31:13.741] - state: 'created' [13:31:13.741] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:13.743] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:13.743] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:13.744] - Field: 'label' [13:31:13.744] - Field: 'local' [13:31:13.744] - Field: 'owner' [13:31:13.744] - Field: 'envir' [13:31:13.744] - Field: 'packages' [13:31:13.745] - Field: 'gc' [13:31:13.745] - Field: 'conditions' [13:31:13.745] - Field: 'expr' [13:31:13.745] - Field: 'uuid' [13:31:13.746] - Field: 'seed' [13:31:13.746] - Field: 'version' [13:31:13.746] - Field: 'result' [13:31:13.746] - Field: 'asynchronous' [13:31:13.747] - Field: 'calls' [13:31:13.747] - Field: 'globals' [13:31:13.747] - Field: 'stdout' [13:31:13.748] - Field: 'earlySignal' [13:31:13.748] - Field: 'lazy' [13:31:13.748] - Field: 'state' [13:31:13.748] - Field: '.cluster' [13:31:13.749] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:13.749] - Launch lazy future ... [13:31:13.749] Packages needed by the future expression (n = 1): 'future' [13:31:13.749] Packages needed by future strategies (n = 0): [13:31:13.750] { [13:31:13.750] { [13:31:13.750] { [13:31:13.750] ...future.startTime <- base::Sys.time() [13:31:13.750] { [13:31:13.750] { [13:31:13.750] { [13:31:13.750] { [13:31:13.750] base::local({ [13:31:13.750] has_future <- base::requireNamespace("future", [13:31:13.750] quietly = TRUE) [13:31:13.750] if (has_future) { [13:31:13.750] ns <- base::getNamespace("future") [13:31:13.750] version <- ns[[".package"]][["version"]] [13:31:13.750] if (is.null(version)) [13:31:13.750] version <- utils::packageVersion("future") [13:31:13.750] } [13:31:13.750] else { [13:31:13.750] version <- NULL [13:31:13.750] } [13:31:13.750] if (!has_future || version < "1.8.0") { [13:31:13.750] info <- base::c(r_version = base::gsub("R version ", [13:31:13.750] "", base::R.version$version.string), [13:31:13.750] platform = base::sprintf("%s (%s-bit)", [13:31:13.750] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:13.750] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:13.750] "release", "version")], collapse = " "), [13:31:13.750] hostname = base::Sys.info()[["nodename"]]) [13:31:13.750] info <- base::sprintf("%s: %s", base::names(info), [13:31:13.750] info) [13:31:13.750] info <- base::paste(info, collapse = "; ") [13:31:13.750] if (!has_future) { [13:31:13.750] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:13.750] info) [13:31:13.750] } [13:31:13.750] else { [13:31:13.750] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:13.750] info, version) [13:31:13.750] } [13:31:13.750] base::stop(msg) [13:31:13.750] } [13:31:13.750] }) [13:31:13.750] } [13:31:13.750] base::local({ [13:31:13.750] for (pkg in "future") { [13:31:13.750] base::loadNamespace(pkg) [13:31:13.750] base::library(pkg, character.only = TRUE) [13:31:13.750] } [13:31:13.750] }) [13:31:13.750] } [13:31:13.750] ...future.strategy.old <- future::plan("list") [13:31:13.750] options(future.plan = NULL) [13:31:13.750] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.750] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:13.750] } [13:31:13.750] ...future.workdir <- getwd() [13:31:13.750] } [13:31:13.750] ...future.oldOptions <- base::as.list(base::.Options) [13:31:13.750] ...future.oldEnvVars <- base::Sys.getenv() [13:31:13.750] } [13:31:13.750] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:13.750] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:13.750] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:13.750] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:13.750] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:13.750] future.stdout.windows.reencode = NULL, width = 80L) [13:31:13.750] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:13.750] base::names(...future.oldOptions)) [13:31:13.750] } [13:31:13.750] if (FALSE) { [13:31:13.750] } [13:31:13.750] else { [13:31:13.750] if (TRUE) { [13:31:13.750] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:13.750] open = "w") [13:31:13.750] } [13:31:13.750] else { [13:31:13.750] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:13.750] windows = "NUL", "/dev/null"), open = "w") [13:31:13.750] } [13:31:13.750] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:13.750] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:13.750] base::sink(type = "output", split = FALSE) [13:31:13.750] base::close(...future.stdout) [13:31:13.750] }, add = TRUE) [13:31:13.750] } [13:31:13.750] ...future.frame <- base::sys.nframe() [13:31:13.750] ...future.conditions <- base::list() [13:31:13.750] ...future.rng <- base::globalenv()$.Random.seed [13:31:13.750] if (FALSE) { [13:31:13.750] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:13.750] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:13.750] } [13:31:13.750] ...future.result <- base::tryCatch({ [13:31:13.750] base::withCallingHandlers({ [13:31:13.750] ...future.value <- base::withVisible(base::local({ [13:31:13.750] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:13.750] })) [13:31:13.750] future::FutureResult(value = ...future.value$value, [13:31:13.750] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.750] ...future.rng), globalenv = if (FALSE) [13:31:13.750] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:13.750] ...future.globalenv.names)) [13:31:13.750] else NULL, started = ...future.startTime, version = "1.8") [13:31:13.750] }, condition = base::local({ [13:31:13.750] c <- base::c [13:31:13.750] inherits <- base::inherits [13:31:13.750] invokeRestart <- base::invokeRestart [13:31:13.750] length <- base::length [13:31:13.750] list <- base::list [13:31:13.750] seq.int <- base::seq.int [13:31:13.750] signalCondition <- base::signalCondition [13:31:13.750] sys.calls <- base::sys.calls [13:31:13.750] `[[` <- base::`[[` [13:31:13.750] `+` <- base::`+` [13:31:13.750] `<<-` <- base::`<<-` [13:31:13.750] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:13.750] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:13.750] 3L)] [13:31:13.750] } [13:31:13.750] function(cond) { [13:31:13.750] is_error <- inherits(cond, "error") [13:31:13.750] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:13.750] NULL) [13:31:13.750] if (is_error) { [13:31:13.750] sessionInformation <- function() { [13:31:13.750] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:13.750] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:13.750] search = base::search(), system = base::Sys.info()) [13:31:13.750] } [13:31:13.750] ...future.conditions[[length(...future.conditions) + [13:31:13.750] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:13.750] cond$call), session = sessionInformation(), [13:31:13.750] timestamp = base::Sys.time(), signaled = 0L) [13:31:13.750] signalCondition(cond) [13:31:13.750] } [13:31:13.750] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:13.750] signal <- FALSE && inherits(cond, character(0)) [13:31:13.750] ...future.conditions[[length(...future.conditions) + [13:31:13.750] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:13.750] if (FALSE && !signal) { [13:31:13.750] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.750] { [13:31:13.750] inherits <- base::inherits [13:31:13.750] invokeRestart <- base::invokeRestart [13:31:13.750] is.null <- base::is.null [13:31:13.750] muffled <- FALSE [13:31:13.750] if (inherits(cond, "message")) { [13:31:13.750] muffled <- grepl(pattern, "muffleMessage") [13:31:13.750] if (muffled) [13:31:13.750] invokeRestart("muffleMessage") [13:31:13.750] } [13:31:13.750] else if (inherits(cond, "warning")) { [13:31:13.750] muffled <- grepl(pattern, "muffleWarning") [13:31:13.750] if (muffled) [13:31:13.750] invokeRestart("muffleWarning") [13:31:13.750] } [13:31:13.750] else if (inherits(cond, "condition")) { [13:31:13.750] if (!is.null(pattern)) { [13:31:13.750] computeRestarts <- base::computeRestarts [13:31:13.750] grepl <- base::grepl [13:31:13.750] restarts <- computeRestarts(cond) [13:31:13.750] for (restart in restarts) { [13:31:13.750] name <- restart$name [13:31:13.750] if (is.null(name)) [13:31:13.750] next [13:31:13.750] if (!grepl(pattern, name)) [13:31:13.750] next [13:31:13.750] invokeRestart(restart) [13:31:13.750] muffled <- TRUE [13:31:13.750] break [13:31:13.750] } [13:31:13.750] } [13:31:13.750] } [13:31:13.750] invisible(muffled) [13:31:13.750] } [13:31:13.750] muffleCondition(cond, pattern = "^muffle") [13:31:13.750] } [13:31:13.750] } [13:31:13.750] else { [13:31:13.750] if (TRUE) { [13:31:13.750] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.750] { [13:31:13.750] inherits <- base::inherits [13:31:13.750] invokeRestart <- base::invokeRestart [13:31:13.750] is.null <- base::is.null [13:31:13.750] muffled <- FALSE [13:31:13.750] if (inherits(cond, "message")) { [13:31:13.750] muffled <- grepl(pattern, "muffleMessage") [13:31:13.750] if (muffled) [13:31:13.750] invokeRestart("muffleMessage") [13:31:13.750] } [13:31:13.750] else if (inherits(cond, "warning")) { [13:31:13.750] muffled <- grepl(pattern, "muffleWarning") [13:31:13.750] if (muffled) [13:31:13.750] invokeRestart("muffleWarning") [13:31:13.750] } [13:31:13.750] else if (inherits(cond, "condition")) { [13:31:13.750] if (!is.null(pattern)) { [13:31:13.750] computeRestarts <- base::computeRestarts [13:31:13.750] grepl <- base::grepl [13:31:13.750] restarts <- computeRestarts(cond) [13:31:13.750] for (restart in restarts) { [13:31:13.750] name <- restart$name [13:31:13.750] if (is.null(name)) [13:31:13.750] next [13:31:13.750] if (!grepl(pattern, name)) [13:31:13.750] next [13:31:13.750] invokeRestart(restart) [13:31:13.750] muffled <- TRUE [13:31:13.750] break [13:31:13.750] } [13:31:13.750] } [13:31:13.750] } [13:31:13.750] invisible(muffled) [13:31:13.750] } [13:31:13.750] muffleCondition(cond, pattern = "^muffle") [13:31:13.750] } [13:31:13.750] } [13:31:13.750] } [13:31:13.750] })) [13:31:13.750] }, error = function(ex) { [13:31:13.750] base::structure(base::list(value = NULL, visible = NULL, [13:31:13.750] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.750] ...future.rng), started = ...future.startTime, [13:31:13.750] finished = Sys.time(), session_uuid = NA_character_, [13:31:13.750] version = "1.8"), class = "FutureResult") [13:31:13.750] }, finally = { [13:31:13.750] if (!identical(...future.workdir, getwd())) [13:31:13.750] setwd(...future.workdir) [13:31:13.750] { [13:31:13.750] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:13.750] ...future.oldOptions$nwarnings <- NULL [13:31:13.750] } [13:31:13.750] base::options(...future.oldOptions) [13:31:13.750] if (.Platform$OS.type == "windows") { [13:31:13.750] old_names <- names(...future.oldEnvVars) [13:31:13.750] envs <- base::Sys.getenv() [13:31:13.750] names <- names(envs) [13:31:13.750] common <- intersect(names, old_names) [13:31:13.750] added <- setdiff(names, old_names) [13:31:13.750] removed <- setdiff(old_names, names) [13:31:13.750] changed <- common[...future.oldEnvVars[common] != [13:31:13.750] envs[common]] [13:31:13.750] NAMES <- toupper(changed) [13:31:13.750] args <- list() [13:31:13.750] for (kk in seq_along(NAMES)) { [13:31:13.750] name <- changed[[kk]] [13:31:13.750] NAME <- NAMES[[kk]] [13:31:13.750] if (name != NAME && is.element(NAME, old_names)) [13:31:13.750] next [13:31:13.750] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.750] } [13:31:13.750] NAMES <- toupper(added) [13:31:13.750] for (kk in seq_along(NAMES)) { [13:31:13.750] name <- added[[kk]] [13:31:13.750] NAME <- NAMES[[kk]] [13:31:13.750] if (name != NAME && is.element(NAME, old_names)) [13:31:13.750] next [13:31:13.750] args[[name]] <- "" [13:31:13.750] } [13:31:13.750] NAMES <- toupper(removed) [13:31:13.750] for (kk in seq_along(NAMES)) { [13:31:13.750] name <- removed[[kk]] [13:31:13.750] NAME <- NAMES[[kk]] [13:31:13.750] if (name != NAME && is.element(NAME, old_names)) [13:31:13.750] next [13:31:13.750] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.750] } [13:31:13.750] if (length(args) > 0) [13:31:13.750] base::do.call(base::Sys.setenv, args = args) [13:31:13.750] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:13.750] } [13:31:13.750] else { [13:31:13.750] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:13.750] } [13:31:13.750] { [13:31:13.750] if (base::length(...future.futureOptionsAdded) > [13:31:13.750] 0L) { [13:31:13.750] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:13.750] base::names(opts) <- ...future.futureOptionsAdded [13:31:13.750] base::options(opts) [13:31:13.750] } [13:31:13.750] { [13:31:13.750] NULL [13:31:13.750] options(future.plan = NULL) [13:31:13.750] if (is.na(NA_character_)) [13:31:13.750] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.750] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:13.750] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:13.750] .init = FALSE) [13:31:13.750] } [13:31:13.750] } [13:31:13.750] } [13:31:13.750] }) [13:31:13.750] if (TRUE) { [13:31:13.750] base::sink(type = "output", split = FALSE) [13:31:13.750] if (TRUE) { [13:31:13.750] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:13.750] } [13:31:13.750] else { [13:31:13.750] ...future.result["stdout"] <- base::list(NULL) [13:31:13.750] } [13:31:13.750] base::close(...future.stdout) [13:31:13.750] ...future.stdout <- NULL [13:31:13.750] } [13:31:13.750] ...future.result$conditions <- ...future.conditions [13:31:13.750] ...future.result$finished <- base::Sys.time() [13:31:13.750] ...future.result [13:31:13.750] } [13:31:13.756] - Launch lazy future ... done [13:31:13.756] 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) [13:31:13.767] getGlobalsAndPackages() ... [13:31:13.767] Searching for globals... [13:31:13.770] - globals found: [8] 'FUN', '[[', 'x', 'ii', '...', '{', 'get', 'parent.env' [13:31:13.770] Searching for globals ... DONE [13:31:13.770] Resolving globals: FALSE [13:31:13.770] Tweak future expression to call with '...' arguments ... [13:31:13.770] { [13:31:13.770] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:13.770] } [13:31:13.771] Tweak future expression to call with '...' arguments ... DONE [13:31:13.771] The total size of the 4 globals is 17.95 KiB (18384 bytes) [13:31:13.772] 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') [13:31:13.772] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:31:13.772] - packages: [1] 'listenv' [13:31:13.773] getGlobalsAndPackages() ... DONE [13:31:13.773] run() for 'Future' ... [13:31:13.773] - state: 'created' [13:31:13.773] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:13.776] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:13.776] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:13.776] - Field: 'label' [13:31:13.776] - Field: 'local' [13:31:13.776] - Field: 'owner' [13:31:13.777] - Field: 'envir' [13:31:13.778] - Field: 'packages' [13:31:13.778] - Field: 'gc' [13:31:13.778] - Field: 'conditions' [13:31:13.778] - Field: 'expr' [13:31:13.778] - Field: 'uuid' [13:31:13.779] - Field: 'seed' [13:31:13.779] - Field: 'version' [13:31:13.779] - Field: 'result' [13:31:13.779] - Field: 'asynchronous' [13:31:13.779] - Field: 'calls' [13:31:13.779] - Field: 'globals' [13:31:13.780] - Field: 'stdout' [13:31:13.780] - Field: 'earlySignal' [13:31:13.780] - Field: 'lazy' [13:31:13.780] - Field: 'state' [13:31:13.780] - Field: '.cluster' [13:31:13.780] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:13.781] - Launch lazy future ... [13:31:13.781] Packages needed by the future expression (n = 1): 'listenv' [13:31:13.781] Packages needed by future strategies (n = 0): [13:31:13.782] { [13:31:13.782] { [13:31:13.782] { [13:31:13.782] ...future.startTime <- base::Sys.time() [13:31:13.782] { [13:31:13.782] { [13:31:13.782] { [13:31:13.782] { [13:31:13.782] base::local({ [13:31:13.782] has_future <- base::requireNamespace("future", [13:31:13.782] quietly = TRUE) [13:31:13.782] if (has_future) { [13:31:13.782] ns <- base::getNamespace("future") [13:31:13.782] version <- ns[[".package"]][["version"]] [13:31:13.782] if (is.null(version)) [13:31:13.782] version <- utils::packageVersion("future") [13:31:13.782] } [13:31:13.782] else { [13:31:13.782] version <- NULL [13:31:13.782] } [13:31:13.782] if (!has_future || version < "1.8.0") { [13:31:13.782] info <- base::c(r_version = base::gsub("R version ", [13:31:13.782] "", base::R.version$version.string), [13:31:13.782] platform = base::sprintf("%s (%s-bit)", [13:31:13.782] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:13.782] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:13.782] "release", "version")], collapse = " "), [13:31:13.782] hostname = base::Sys.info()[["nodename"]]) [13:31:13.782] info <- base::sprintf("%s: %s", base::names(info), [13:31:13.782] info) [13:31:13.782] info <- base::paste(info, collapse = "; ") [13:31:13.782] if (!has_future) { [13:31:13.782] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:13.782] info) [13:31:13.782] } [13:31:13.782] else { [13:31:13.782] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:13.782] info, version) [13:31:13.782] } [13:31:13.782] base::stop(msg) [13:31:13.782] } [13:31:13.782] }) [13:31:13.782] } [13:31:13.782] base::local({ [13:31:13.782] for (pkg in "listenv") { [13:31:13.782] base::loadNamespace(pkg) [13:31:13.782] base::library(pkg, character.only = TRUE) [13:31:13.782] } [13:31:13.782] }) [13:31:13.782] } [13:31:13.782] ...future.strategy.old <- future::plan("list") [13:31:13.782] options(future.plan = NULL) [13:31:13.782] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.782] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:13.782] } [13:31:13.782] ...future.workdir <- getwd() [13:31:13.782] } [13:31:13.782] ...future.oldOptions <- base::as.list(base::.Options) [13:31:13.782] ...future.oldEnvVars <- base::Sys.getenv() [13:31:13.782] } [13:31:13.782] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:13.782] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:13.782] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:13.782] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:13.782] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:13.782] future.stdout.windows.reencode = NULL, width = 80L) [13:31:13.782] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:13.782] base::names(...future.oldOptions)) [13:31:13.782] } [13:31:13.782] if (FALSE) { [13:31:13.782] } [13:31:13.782] else { [13:31:13.782] if (TRUE) { [13:31:13.782] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:13.782] open = "w") [13:31:13.782] } [13:31:13.782] else { [13:31:13.782] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:13.782] windows = "NUL", "/dev/null"), open = "w") [13:31:13.782] } [13:31:13.782] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:13.782] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:13.782] base::sink(type = "output", split = FALSE) [13:31:13.782] base::close(...future.stdout) [13:31:13.782] }, add = TRUE) [13:31:13.782] } [13:31:13.782] ...future.frame <- base::sys.nframe() [13:31:13.782] ...future.conditions <- base::list() [13:31:13.782] ...future.rng <- base::globalenv()$.Random.seed [13:31:13.782] if (FALSE) { [13:31:13.782] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:13.782] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:13.782] } [13:31:13.782] ...future.result <- base::tryCatch({ [13:31:13.782] base::withCallingHandlers({ [13:31:13.782] ...future.value <- base::withVisible(base::local({ [13:31:13.782] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:13.782] })) [13:31:13.782] future::FutureResult(value = ...future.value$value, [13:31:13.782] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.782] ...future.rng), globalenv = if (FALSE) [13:31:13.782] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:13.782] ...future.globalenv.names)) [13:31:13.782] else NULL, started = ...future.startTime, version = "1.8") [13:31:13.782] }, condition = base::local({ [13:31:13.782] c <- base::c [13:31:13.782] inherits <- base::inherits [13:31:13.782] invokeRestart <- base::invokeRestart [13:31:13.782] length <- base::length [13:31:13.782] list <- base::list [13:31:13.782] seq.int <- base::seq.int [13:31:13.782] signalCondition <- base::signalCondition [13:31:13.782] sys.calls <- base::sys.calls [13:31:13.782] `[[` <- base::`[[` [13:31:13.782] `+` <- base::`+` [13:31:13.782] `<<-` <- base::`<<-` [13:31:13.782] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:13.782] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:13.782] 3L)] [13:31:13.782] } [13:31:13.782] function(cond) { [13:31:13.782] is_error <- inherits(cond, "error") [13:31:13.782] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:13.782] NULL) [13:31:13.782] if (is_error) { [13:31:13.782] sessionInformation <- function() { [13:31:13.782] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:13.782] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:13.782] search = base::search(), system = base::Sys.info()) [13:31:13.782] } [13:31:13.782] ...future.conditions[[length(...future.conditions) + [13:31:13.782] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:13.782] cond$call), session = sessionInformation(), [13:31:13.782] timestamp = base::Sys.time(), signaled = 0L) [13:31:13.782] signalCondition(cond) [13:31:13.782] } [13:31:13.782] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:13.782] signal <- FALSE && inherits(cond, character(0)) [13:31:13.782] ...future.conditions[[length(...future.conditions) + [13:31:13.782] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:13.782] if (FALSE && !signal) { [13:31:13.782] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.782] { [13:31:13.782] inherits <- base::inherits [13:31:13.782] invokeRestart <- base::invokeRestart [13:31:13.782] is.null <- base::is.null [13:31:13.782] muffled <- FALSE [13:31:13.782] if (inherits(cond, "message")) { [13:31:13.782] muffled <- grepl(pattern, "muffleMessage") [13:31:13.782] if (muffled) [13:31:13.782] invokeRestart("muffleMessage") [13:31:13.782] } [13:31:13.782] else if (inherits(cond, "warning")) { [13:31:13.782] muffled <- grepl(pattern, "muffleWarning") [13:31:13.782] if (muffled) [13:31:13.782] invokeRestart("muffleWarning") [13:31:13.782] } [13:31:13.782] else if (inherits(cond, "condition")) { [13:31:13.782] if (!is.null(pattern)) { [13:31:13.782] computeRestarts <- base::computeRestarts [13:31:13.782] grepl <- base::grepl [13:31:13.782] restarts <- computeRestarts(cond) [13:31:13.782] for (restart in restarts) { [13:31:13.782] name <- restart$name [13:31:13.782] if (is.null(name)) [13:31:13.782] next [13:31:13.782] if (!grepl(pattern, name)) [13:31:13.782] next [13:31:13.782] invokeRestart(restart) [13:31:13.782] muffled <- TRUE [13:31:13.782] break [13:31:13.782] } [13:31:13.782] } [13:31:13.782] } [13:31:13.782] invisible(muffled) [13:31:13.782] } [13:31:13.782] muffleCondition(cond, pattern = "^muffle") [13:31:13.782] } [13:31:13.782] } [13:31:13.782] else { [13:31:13.782] if (TRUE) { [13:31:13.782] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.782] { [13:31:13.782] inherits <- base::inherits [13:31:13.782] invokeRestart <- base::invokeRestart [13:31:13.782] is.null <- base::is.null [13:31:13.782] muffled <- FALSE [13:31:13.782] if (inherits(cond, "message")) { [13:31:13.782] muffled <- grepl(pattern, "muffleMessage") [13:31:13.782] if (muffled) [13:31:13.782] invokeRestart("muffleMessage") [13:31:13.782] } [13:31:13.782] else if (inherits(cond, "warning")) { [13:31:13.782] muffled <- grepl(pattern, "muffleWarning") [13:31:13.782] if (muffled) [13:31:13.782] invokeRestart("muffleWarning") [13:31:13.782] } [13:31:13.782] else if (inherits(cond, "condition")) { [13:31:13.782] if (!is.null(pattern)) { [13:31:13.782] computeRestarts <- base::computeRestarts [13:31:13.782] grepl <- base::grepl [13:31:13.782] restarts <- computeRestarts(cond) [13:31:13.782] for (restart in restarts) { [13:31:13.782] name <- restart$name [13:31:13.782] if (is.null(name)) [13:31:13.782] next [13:31:13.782] if (!grepl(pattern, name)) [13:31:13.782] next [13:31:13.782] invokeRestart(restart) [13:31:13.782] muffled <- TRUE [13:31:13.782] break [13:31:13.782] } [13:31:13.782] } [13:31:13.782] } [13:31:13.782] invisible(muffled) [13:31:13.782] } [13:31:13.782] muffleCondition(cond, pattern = "^muffle") [13:31:13.782] } [13:31:13.782] } [13:31:13.782] } [13:31:13.782] })) [13:31:13.782] }, error = function(ex) { [13:31:13.782] base::structure(base::list(value = NULL, visible = NULL, [13:31:13.782] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.782] ...future.rng), started = ...future.startTime, [13:31:13.782] finished = Sys.time(), session_uuid = NA_character_, [13:31:13.782] version = "1.8"), class = "FutureResult") [13:31:13.782] }, finally = { [13:31:13.782] if (!identical(...future.workdir, getwd())) [13:31:13.782] setwd(...future.workdir) [13:31:13.782] { [13:31:13.782] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:13.782] ...future.oldOptions$nwarnings <- NULL [13:31:13.782] } [13:31:13.782] base::options(...future.oldOptions) [13:31:13.782] if (.Platform$OS.type == "windows") { [13:31:13.782] old_names <- names(...future.oldEnvVars) [13:31:13.782] envs <- base::Sys.getenv() [13:31:13.782] names <- names(envs) [13:31:13.782] common <- intersect(names, old_names) [13:31:13.782] added <- setdiff(names, old_names) [13:31:13.782] removed <- setdiff(old_names, names) [13:31:13.782] changed <- common[...future.oldEnvVars[common] != [13:31:13.782] envs[common]] [13:31:13.782] NAMES <- toupper(changed) [13:31:13.782] args <- list() [13:31:13.782] for (kk in seq_along(NAMES)) { [13:31:13.782] name <- changed[[kk]] [13:31:13.782] NAME <- NAMES[[kk]] [13:31:13.782] if (name != NAME && is.element(NAME, old_names)) [13:31:13.782] next [13:31:13.782] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.782] } [13:31:13.782] NAMES <- toupper(added) [13:31:13.782] for (kk in seq_along(NAMES)) { [13:31:13.782] name <- added[[kk]] [13:31:13.782] NAME <- NAMES[[kk]] [13:31:13.782] if (name != NAME && is.element(NAME, old_names)) [13:31:13.782] next [13:31:13.782] args[[name]] <- "" [13:31:13.782] } [13:31:13.782] NAMES <- toupper(removed) [13:31:13.782] for (kk in seq_along(NAMES)) { [13:31:13.782] name <- removed[[kk]] [13:31:13.782] NAME <- NAMES[[kk]] [13:31:13.782] if (name != NAME && is.element(NAME, old_names)) [13:31:13.782] next [13:31:13.782] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.782] } [13:31:13.782] if (length(args) > 0) [13:31:13.782] base::do.call(base::Sys.setenv, args = args) [13:31:13.782] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:13.782] } [13:31:13.782] else { [13:31:13.782] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:13.782] } [13:31:13.782] { [13:31:13.782] if (base::length(...future.futureOptionsAdded) > [13:31:13.782] 0L) { [13:31:13.782] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:13.782] base::names(opts) <- ...future.futureOptionsAdded [13:31:13.782] base::options(opts) [13:31:13.782] } [13:31:13.782] { [13:31:13.782] NULL [13:31:13.782] options(future.plan = NULL) [13:31:13.782] if (is.na(NA_character_)) [13:31:13.782] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.782] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:13.782] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:13.782] .init = FALSE) [13:31:13.782] } [13:31:13.782] } [13:31:13.782] } [13:31:13.782] }) [13:31:13.782] if (TRUE) { [13:31:13.782] base::sink(type = "output", split = FALSE) [13:31:13.782] if (TRUE) { [13:31:13.782] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:13.782] } [13:31:13.782] else { [13:31:13.782] ...future.result["stdout"] <- base::list(NULL) [13:31:13.782] } [13:31:13.782] base::close(...future.stdout) [13:31:13.782] ...future.stdout <- NULL [13:31:13.782] } [13:31:13.782] ...future.result$conditions <- ...future.conditions [13:31:13.782] ...future.result$finished <- base::Sys.time() [13:31:13.782] ...future.result [13:31:13.782] } [13:31:13.785] - Launch lazy future ... done [13:31:13.785] run() for 'MiraiFuture' ... done [13:31:13.786] getGlobalsAndPackages() ... [13:31:13.786] Searching for globals... [13:31:13.789] - globals found: [8] 'FUN', '[[', 'x', 'ii', '...', '{', 'get', 'parent.env' [13:31:13.789] Searching for globals ... DONE [13:31:13.789] Resolving globals: FALSE [13:31:13.789] Tweak future expression to call with '...' arguments ... [13:31:13.789] { [13:31:13.789] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:13.789] } [13:31:13.790] Tweak future expression to call with '...' arguments ... DONE [13:31:13.790] The total size of the 4 globals is 17.95 KiB (18384 bytes) [13:31:13.791] 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') [13:31:13.791] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:31:13.791] - packages: [1] 'listenv' [13:31:13.792] getGlobalsAndPackages() ... DONE [13:31:13.792] run() for 'Future' ... [13:31:13.792] - state: 'created' [13:31:13.792] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:13.795] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:13.795] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:13.795] - Field: 'label' [13:31:13.795] - Field: 'local' [13:31:13.795] - Field: 'owner' [13:31:13.795] - Field: 'envir' [13:31:13.796] - Field: 'packages' [13:31:13.796] - Field: 'gc' [13:31:13.796] - Field: 'conditions' [13:31:13.796] - Field: 'expr' [13:31:13.796] - Field: 'uuid' [13:31:13.796] - Field: 'seed' [13:31:13.797] - Field: 'version' [13:31:13.797] - Field: 'result' [13:31:13.797] - Field: 'asynchronous' [13:31:13.797] - Field: 'calls' [13:31:13.797] - Field: 'globals' [13:31:13.797] - Field: 'stdout' [13:31:13.798] - Field: 'earlySignal' [13:31:13.798] - Field: 'lazy' [13:31:13.798] - Field: 'state' [13:31:13.798] - Field: '.cluster' [13:31:13.798] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:13.799] - Launch lazy future ... [13:31:13.799] Packages needed by the future expression (n = 1): 'listenv' [13:31:13.799] Packages needed by future strategies (n = 0): [13:31:13.799] { [13:31:13.799] { [13:31:13.799] { [13:31:13.799] ...future.startTime <- base::Sys.time() [13:31:13.799] { [13:31:13.799] { [13:31:13.799] { [13:31:13.799] { [13:31:13.799] base::local({ [13:31:13.799] has_future <- base::requireNamespace("future", [13:31:13.799] quietly = TRUE) [13:31:13.799] if (has_future) { [13:31:13.799] ns <- base::getNamespace("future") [13:31:13.799] version <- ns[[".package"]][["version"]] [13:31:13.799] if (is.null(version)) [13:31:13.799] version <- utils::packageVersion("future") [13:31:13.799] } [13:31:13.799] else { [13:31:13.799] version <- NULL [13:31:13.799] } [13:31:13.799] if (!has_future || version < "1.8.0") { [13:31:13.799] info <- base::c(r_version = base::gsub("R version ", [13:31:13.799] "", base::R.version$version.string), [13:31:13.799] platform = base::sprintf("%s (%s-bit)", [13:31:13.799] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:13.799] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:13.799] "release", "version")], collapse = " "), [13:31:13.799] hostname = base::Sys.info()[["nodename"]]) [13:31:13.799] info <- base::sprintf("%s: %s", base::names(info), [13:31:13.799] info) [13:31:13.799] info <- base::paste(info, collapse = "; ") [13:31:13.799] if (!has_future) { [13:31:13.799] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:13.799] info) [13:31:13.799] } [13:31:13.799] else { [13:31:13.799] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:13.799] info, version) [13:31:13.799] } [13:31:13.799] base::stop(msg) [13:31:13.799] } [13:31:13.799] }) [13:31:13.799] } [13:31:13.799] base::local({ [13:31:13.799] for (pkg in "listenv") { [13:31:13.799] base::loadNamespace(pkg) [13:31:13.799] base::library(pkg, character.only = TRUE) [13:31:13.799] } [13:31:13.799] }) [13:31:13.799] } [13:31:13.799] ...future.strategy.old <- future::plan("list") [13:31:13.799] options(future.plan = NULL) [13:31:13.799] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.799] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:13.799] } [13:31:13.799] ...future.workdir <- getwd() [13:31:13.799] } [13:31:13.799] ...future.oldOptions <- base::as.list(base::.Options) [13:31:13.799] ...future.oldEnvVars <- base::Sys.getenv() [13:31:13.799] } [13:31:13.799] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:13.799] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:13.799] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:13.799] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:13.799] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:13.799] future.stdout.windows.reencode = NULL, width = 80L) [13:31:13.799] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:13.799] base::names(...future.oldOptions)) [13:31:13.799] } [13:31:13.799] if (FALSE) { [13:31:13.799] } [13:31:13.799] else { [13:31:13.799] if (TRUE) { [13:31:13.799] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:13.799] open = "w") [13:31:13.799] } [13:31:13.799] else { [13:31:13.799] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:13.799] windows = "NUL", "/dev/null"), open = "w") [13:31:13.799] } [13:31:13.799] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:13.799] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:13.799] base::sink(type = "output", split = FALSE) [13:31:13.799] base::close(...future.stdout) [13:31:13.799] }, add = TRUE) [13:31:13.799] } [13:31:13.799] ...future.frame <- base::sys.nframe() [13:31:13.799] ...future.conditions <- base::list() [13:31:13.799] ...future.rng <- base::globalenv()$.Random.seed [13:31:13.799] if (FALSE) { [13:31:13.799] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:13.799] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:13.799] } [13:31:13.799] ...future.result <- base::tryCatch({ [13:31:13.799] base::withCallingHandlers({ [13:31:13.799] ...future.value <- base::withVisible(base::local({ [13:31:13.799] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:13.799] })) [13:31:13.799] future::FutureResult(value = ...future.value$value, [13:31:13.799] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.799] ...future.rng), globalenv = if (FALSE) [13:31:13.799] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:13.799] ...future.globalenv.names)) [13:31:13.799] else NULL, started = ...future.startTime, version = "1.8") [13:31:13.799] }, condition = base::local({ [13:31:13.799] c <- base::c [13:31:13.799] inherits <- base::inherits [13:31:13.799] invokeRestart <- base::invokeRestart [13:31:13.799] length <- base::length [13:31:13.799] list <- base::list [13:31:13.799] seq.int <- base::seq.int [13:31:13.799] signalCondition <- base::signalCondition [13:31:13.799] sys.calls <- base::sys.calls [13:31:13.799] `[[` <- base::`[[` [13:31:13.799] `+` <- base::`+` [13:31:13.799] `<<-` <- base::`<<-` [13:31:13.799] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:13.799] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:13.799] 3L)] [13:31:13.799] } [13:31:13.799] function(cond) { [13:31:13.799] is_error <- inherits(cond, "error") [13:31:13.799] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:13.799] NULL) [13:31:13.799] if (is_error) { [13:31:13.799] sessionInformation <- function() { [13:31:13.799] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:13.799] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:13.799] search = base::search(), system = base::Sys.info()) [13:31:13.799] } [13:31:13.799] ...future.conditions[[length(...future.conditions) + [13:31:13.799] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:13.799] cond$call), session = sessionInformation(), [13:31:13.799] timestamp = base::Sys.time(), signaled = 0L) [13:31:13.799] signalCondition(cond) [13:31:13.799] } [13:31:13.799] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:13.799] signal <- FALSE && inherits(cond, character(0)) [13:31:13.799] ...future.conditions[[length(...future.conditions) + [13:31:13.799] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:13.799] if (FALSE && !signal) { [13:31:13.799] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.799] { [13:31:13.799] inherits <- base::inherits [13:31:13.799] invokeRestart <- base::invokeRestart [13:31:13.799] is.null <- base::is.null [13:31:13.799] muffled <- FALSE [13:31:13.799] if (inherits(cond, "message")) { [13:31:13.799] muffled <- grepl(pattern, "muffleMessage") [13:31:13.799] if (muffled) [13:31:13.799] invokeRestart("muffleMessage") [13:31:13.799] } [13:31:13.799] else if (inherits(cond, "warning")) { [13:31:13.799] muffled <- grepl(pattern, "muffleWarning") [13:31:13.799] if (muffled) [13:31:13.799] invokeRestart("muffleWarning") [13:31:13.799] } [13:31:13.799] else if (inherits(cond, "condition")) { [13:31:13.799] if (!is.null(pattern)) { [13:31:13.799] computeRestarts <- base::computeRestarts [13:31:13.799] grepl <- base::grepl [13:31:13.799] restarts <- computeRestarts(cond) [13:31:13.799] for (restart in restarts) { [13:31:13.799] name <- restart$name [13:31:13.799] if (is.null(name)) [13:31:13.799] next [13:31:13.799] if (!grepl(pattern, name)) [13:31:13.799] next [13:31:13.799] invokeRestart(restart) [13:31:13.799] muffled <- TRUE [13:31:13.799] break [13:31:13.799] } [13:31:13.799] } [13:31:13.799] } [13:31:13.799] invisible(muffled) [13:31:13.799] } [13:31:13.799] muffleCondition(cond, pattern = "^muffle") [13:31:13.799] } [13:31:13.799] } [13:31:13.799] else { [13:31:13.799] if (TRUE) { [13:31:13.799] muffleCondition <- function (cond, pattern = "^muffle") [13:31:13.799] { [13:31:13.799] inherits <- base::inherits [13:31:13.799] invokeRestart <- base::invokeRestart [13:31:13.799] is.null <- base::is.null [13:31:13.799] muffled <- FALSE [13:31:13.799] if (inherits(cond, "message")) { [13:31:13.799] muffled <- grepl(pattern, "muffleMessage") [13:31:13.799] if (muffled) [13:31:13.799] invokeRestart("muffleMessage") [13:31:13.799] } [13:31:13.799] else if (inherits(cond, "warning")) { [13:31:13.799] muffled <- grepl(pattern, "muffleWarning") [13:31:13.799] if (muffled) [13:31:13.799] invokeRestart("muffleWarning") [13:31:13.799] } [13:31:13.799] else if (inherits(cond, "condition")) { [13:31:13.799] if (!is.null(pattern)) { [13:31:13.799] computeRestarts <- base::computeRestarts [13:31:13.799] grepl <- base::grepl [13:31:13.799] restarts <- computeRestarts(cond) [13:31:13.799] for (restart in restarts) { [13:31:13.799] name <- restart$name [13:31:13.799] if (is.null(name)) [13:31:13.799] next [13:31:13.799] if (!grepl(pattern, name)) [13:31:13.799] next [13:31:13.799] invokeRestart(restart) [13:31:13.799] muffled <- TRUE [13:31:13.799] break [13:31:13.799] } [13:31:13.799] } [13:31:13.799] } [13:31:13.799] invisible(muffled) [13:31:13.799] } [13:31:13.799] muffleCondition(cond, pattern = "^muffle") [13:31:13.799] } [13:31:13.799] } [13:31:13.799] } [13:31:13.799] })) [13:31:13.799] }, error = function(ex) { [13:31:13.799] base::structure(base::list(value = NULL, visible = NULL, [13:31:13.799] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:13.799] ...future.rng), started = ...future.startTime, [13:31:13.799] finished = Sys.time(), session_uuid = NA_character_, [13:31:13.799] version = "1.8"), class = "FutureResult") [13:31:13.799] }, finally = { [13:31:13.799] if (!identical(...future.workdir, getwd())) [13:31:13.799] setwd(...future.workdir) [13:31:13.799] { [13:31:13.799] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:13.799] ...future.oldOptions$nwarnings <- NULL [13:31:13.799] } [13:31:13.799] base::options(...future.oldOptions) [13:31:13.799] if (.Platform$OS.type == "windows") { [13:31:13.799] old_names <- names(...future.oldEnvVars) [13:31:13.799] envs <- base::Sys.getenv() [13:31:13.799] names <- names(envs) [13:31:13.799] common <- intersect(names, old_names) [13:31:13.799] added <- setdiff(names, old_names) [13:31:13.799] removed <- setdiff(old_names, names) [13:31:13.799] changed <- common[...future.oldEnvVars[common] != [13:31:13.799] envs[common]] [13:31:13.799] NAMES <- toupper(changed) [13:31:13.799] args <- list() [13:31:13.799] for (kk in seq_along(NAMES)) { [13:31:13.799] name <- changed[[kk]] [13:31:13.799] NAME <- NAMES[[kk]] [13:31:13.799] if (name != NAME && is.element(NAME, old_names)) [13:31:13.799] next [13:31:13.799] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.799] } [13:31:13.799] NAMES <- toupper(added) [13:31:13.799] for (kk in seq_along(NAMES)) { [13:31:13.799] name <- added[[kk]] [13:31:13.799] NAME <- NAMES[[kk]] [13:31:13.799] if (name != NAME && is.element(NAME, old_names)) [13:31:13.799] next [13:31:13.799] args[[name]] <- "" [13:31:13.799] } [13:31:13.799] NAMES <- toupper(removed) [13:31:13.799] for (kk in seq_along(NAMES)) { [13:31:13.799] name <- removed[[kk]] [13:31:13.799] NAME <- NAMES[[kk]] [13:31:13.799] if (name != NAME && is.element(NAME, old_names)) [13:31:13.799] next [13:31:13.799] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:13.799] } [13:31:13.799] if (length(args) > 0) [13:31:13.799] base::do.call(base::Sys.setenv, args = args) [13:31:13.799] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:13.799] } [13:31:13.799] else { [13:31:13.799] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:13.799] } [13:31:13.799] { [13:31:13.799] if (base::length(...future.futureOptionsAdded) > [13:31:13.799] 0L) { [13:31:13.799] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:13.799] base::names(opts) <- ...future.futureOptionsAdded [13:31:13.799] base::options(opts) [13:31:13.799] } [13:31:13.799] { [13:31:13.799] NULL [13:31:13.799] options(future.plan = NULL) [13:31:13.799] if (is.na(NA_character_)) [13:31:13.799] Sys.unsetenv("R_FUTURE_PLAN") [13:31:13.799] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:13.799] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:13.799] .init = FALSE) [13:31:13.799] } [13:31:13.799] } [13:31:13.799] } [13:31:13.799] }) [13:31:13.799] if (TRUE) { [13:31:13.799] base::sink(type = "output", split = FALSE) [13:31:13.799] if (TRUE) { [13:31:13.799] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:13.799] } [13:31:13.799] else { [13:31:13.799] ...future.result["stdout"] <- base::list(NULL) [13:31:13.799] } [13:31:13.799] base::close(...future.stdout) [13:31:13.799] ...future.stdout <- NULL [13:31:13.799] } [13:31:13.799] ...future.result$conditions <- ...future.conditions [13:31:13.799] ...future.result$finished <- base::Sys.time() [13:31:13.799] ...future.result [13:31:13.799] } [13:31:13.803] - Launch lazy future ... done [13:31:13.804] 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.45 0.09 1.03