R version 4.4.0 beta (2024-04-15 r86425 ucrt) -- "Puppy Cup" 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:11:07.732] plan(): Setting new future strategy stack: [13:11:07.734] List of future strategies: [13:11:07.734] 1. mirai_multisession: [13:11:07.734] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:11:07.734] - tweaked: FALSE [13:11:07.734] - call: future::plan(future.mirai::mirai_multisession) [13:11:07.746] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:11:07.746] < mirai | $data > [13:11:07.751] getGlobalsAndPackages() ... [13:11:07.751] Not searching for globals [13:11:07.752] - globals: [0] [13:11:07.752] getGlobalsAndPackages() ... DONE [13:11:07.752] getGlobalsAndPackages() ... [13:11:07.752] [13:11:07.753] - globals: [0] [13:11:07.753] getGlobalsAndPackages() ... DONE [13:11:08.030] Packages needed by the future expression (n = 0): [13:11:08.030] Packages needed by future strategies (n = 0): [13:11:08.031] { [13:11:08.031] { [13:11:08.031] { [13:11:08.031] ...future.startTime <- base::Sys.time() [13:11:08.031] { [13:11:08.031] { [13:11:08.031] { [13:11:08.031] base::local({ [13:11:08.031] has_future <- base::requireNamespace("future", [13:11:08.031] quietly = TRUE) [13:11:08.031] if (has_future) { [13:11:08.031] ns <- base::getNamespace("future") [13:11:08.031] version <- ns[[".package"]][["version"]] [13:11:08.031] if (is.null(version)) [13:11:08.031] version <- utils::packageVersion("future") [13:11:08.031] } [13:11:08.031] else { [13:11:08.031] version <- NULL [13:11:08.031] } [13:11:08.031] if (!has_future || version < "1.8.0") { [13:11:08.031] info <- base::c(r_version = base::gsub("R version ", [13:11:08.031] "", base::R.version$version.string), [13:11:08.031] platform = base::sprintf("%s (%s-bit)", [13:11:08.031] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:08.031] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:08.031] "release", "version")], collapse = " "), [13:11:08.031] hostname = base::Sys.info()[["nodename"]]) [13:11:08.031] info <- base::sprintf("%s: %s", base::names(info), [13:11:08.031] info) [13:11:08.031] info <- base::paste(info, collapse = "; ") [13:11:08.031] if (!has_future) { [13:11:08.031] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:08.031] info) [13:11:08.031] } [13:11:08.031] else { [13:11:08.031] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:08.031] info, version) [13:11:08.031] } [13:11:08.031] base::stop(msg) [13:11:08.031] } [13:11:08.031] }) [13:11:08.031] } [13:11:08.031] ...future.strategy.old <- future::plan("list") [13:11:08.031] options(future.plan = NULL) [13:11:08.031] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.031] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:08.031] } [13:11:08.031] ...future.workdir <- getwd() [13:11:08.031] } [13:11:08.031] ...future.oldOptions <- base::as.list(base::.Options) [13:11:08.031] ...future.oldEnvVars <- base::Sys.getenv() [13:11:08.031] } [13:11:08.031] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:08.031] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:08.031] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:08.031] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:08.031] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:08.031] future.stdout.windows.reencode = NULL, width = 80L) [13:11:08.031] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:08.031] base::names(...future.oldOptions)) [13:11:08.031] } [13:11:08.031] if (FALSE) { [13:11:08.031] } [13:11:08.031] else { [13:11:08.031] if (TRUE) { [13:11:08.031] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:08.031] open = "w") [13:11:08.031] } [13:11:08.031] else { [13:11:08.031] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:08.031] windows = "NUL", "/dev/null"), open = "w") [13:11:08.031] } [13:11:08.031] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:08.031] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:08.031] base::sink(type = "output", split = FALSE) [13:11:08.031] base::close(...future.stdout) [13:11:08.031] }, add = TRUE) [13:11:08.031] } [13:11:08.031] ...future.frame <- base::sys.nframe() [13:11:08.031] ...future.conditions <- base::list() [13:11:08.031] ...future.rng <- base::globalenv()$.Random.seed [13:11:08.031] if (FALSE) { [13:11:08.031] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:08.031] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:08.031] } [13:11:08.031] ...future.result <- base::tryCatch({ [13:11:08.031] base::withCallingHandlers({ [13:11:08.031] ...future.value <- base::withVisible(base::local(NA)) [13:11:08.031] future::FutureResult(value = ...future.value$value, [13:11:08.031] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.031] ...future.rng), globalenv = if (FALSE) [13:11:08.031] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:08.031] ...future.globalenv.names)) [13:11:08.031] else NULL, started = ...future.startTime, version = "1.8") [13:11:08.031] }, condition = base::local({ [13:11:08.031] c <- base::c [13:11:08.031] inherits <- base::inherits [13:11:08.031] invokeRestart <- base::invokeRestart [13:11:08.031] length <- base::length [13:11:08.031] list <- base::list [13:11:08.031] seq.int <- base::seq.int [13:11:08.031] signalCondition <- base::signalCondition [13:11:08.031] sys.calls <- base::sys.calls [13:11:08.031] `[[` <- base::`[[` [13:11:08.031] `+` <- base::`+` [13:11:08.031] `<<-` <- base::`<<-` [13:11:08.031] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:08.031] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:08.031] 3L)] [13:11:08.031] } [13:11:08.031] function(cond) { [13:11:08.031] is_error <- inherits(cond, "error") [13:11:08.031] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:08.031] NULL) [13:11:08.031] if (is_error) { [13:11:08.031] sessionInformation <- function() { [13:11:08.031] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:08.031] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:08.031] search = base::search(), system = base::Sys.info()) [13:11:08.031] } [13:11:08.031] ...future.conditions[[length(...future.conditions) + [13:11:08.031] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:08.031] cond$call), session = sessionInformation(), [13:11:08.031] timestamp = base::Sys.time(), signaled = 0L) [13:11:08.031] signalCondition(cond) [13:11:08.031] } [13:11:08.031] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:08.031] signal <- FALSE && inherits(cond, character(0)) [13:11:08.031] ...future.conditions[[length(...future.conditions) + [13:11:08.031] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:08.031] if (FALSE && !signal) { [13:11:08.031] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.031] { [13:11:08.031] inherits <- base::inherits [13:11:08.031] invokeRestart <- base::invokeRestart [13:11:08.031] is.null <- base::is.null [13:11:08.031] muffled <- FALSE [13:11:08.031] if (inherits(cond, "message")) { [13:11:08.031] muffled <- grepl(pattern, "muffleMessage") [13:11:08.031] if (muffled) [13:11:08.031] invokeRestart("muffleMessage") [13:11:08.031] } [13:11:08.031] else if (inherits(cond, "warning")) { [13:11:08.031] muffled <- grepl(pattern, "muffleWarning") [13:11:08.031] if (muffled) [13:11:08.031] invokeRestart("muffleWarning") [13:11:08.031] } [13:11:08.031] else if (inherits(cond, "condition")) { [13:11:08.031] if (!is.null(pattern)) { [13:11:08.031] computeRestarts <- base::computeRestarts [13:11:08.031] grepl <- base::grepl [13:11:08.031] restarts <- computeRestarts(cond) [13:11:08.031] for (restart in restarts) { [13:11:08.031] name <- restart$name [13:11:08.031] if (is.null(name)) [13:11:08.031] next [13:11:08.031] if (!grepl(pattern, name)) [13:11:08.031] next [13:11:08.031] invokeRestart(restart) [13:11:08.031] muffled <- TRUE [13:11:08.031] break [13:11:08.031] } [13:11:08.031] } [13:11:08.031] } [13:11:08.031] invisible(muffled) [13:11:08.031] } [13:11:08.031] muffleCondition(cond, pattern = "^muffle") [13:11:08.031] } [13:11:08.031] } [13:11:08.031] else { [13:11:08.031] if (TRUE) { [13:11:08.031] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.031] { [13:11:08.031] inherits <- base::inherits [13:11:08.031] invokeRestart <- base::invokeRestart [13:11:08.031] is.null <- base::is.null [13:11:08.031] muffled <- FALSE [13:11:08.031] if (inherits(cond, "message")) { [13:11:08.031] muffled <- grepl(pattern, "muffleMessage") [13:11:08.031] if (muffled) [13:11:08.031] invokeRestart("muffleMessage") [13:11:08.031] } [13:11:08.031] else if (inherits(cond, "warning")) { [13:11:08.031] muffled <- grepl(pattern, "muffleWarning") [13:11:08.031] if (muffled) [13:11:08.031] invokeRestart("muffleWarning") [13:11:08.031] } [13:11:08.031] else if (inherits(cond, "condition")) { [13:11:08.031] if (!is.null(pattern)) { [13:11:08.031] computeRestarts <- base::computeRestarts [13:11:08.031] grepl <- base::grepl [13:11:08.031] restarts <- computeRestarts(cond) [13:11:08.031] for (restart in restarts) { [13:11:08.031] name <- restart$name [13:11:08.031] if (is.null(name)) [13:11:08.031] next [13:11:08.031] if (!grepl(pattern, name)) [13:11:08.031] next [13:11:08.031] invokeRestart(restart) [13:11:08.031] muffled <- TRUE [13:11:08.031] break [13:11:08.031] } [13:11:08.031] } [13:11:08.031] } [13:11:08.031] invisible(muffled) [13:11:08.031] } [13:11:08.031] muffleCondition(cond, pattern = "^muffle") [13:11:08.031] } [13:11:08.031] } [13:11:08.031] } [13:11:08.031] })) [13:11:08.031] }, error = function(ex) { [13:11:08.031] base::structure(base::list(value = NULL, visible = NULL, [13:11:08.031] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.031] ...future.rng), started = ...future.startTime, [13:11:08.031] finished = Sys.time(), session_uuid = NA_character_, [13:11:08.031] version = "1.8"), class = "FutureResult") [13:11:08.031] }, finally = { [13:11:08.031] if (!identical(...future.workdir, getwd())) [13:11:08.031] setwd(...future.workdir) [13:11:08.031] { [13:11:08.031] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:08.031] ...future.oldOptions$nwarnings <- NULL [13:11:08.031] } [13:11:08.031] base::options(...future.oldOptions) [13:11:08.031] if (.Platform$OS.type == "windows") { [13:11:08.031] old_names <- names(...future.oldEnvVars) [13:11:08.031] envs <- base::Sys.getenv() [13:11:08.031] names <- names(envs) [13:11:08.031] common <- intersect(names, old_names) [13:11:08.031] added <- setdiff(names, old_names) [13:11:08.031] removed <- setdiff(old_names, names) [13:11:08.031] changed <- common[...future.oldEnvVars[common] != [13:11:08.031] envs[common]] [13:11:08.031] NAMES <- toupper(changed) [13:11:08.031] args <- list() [13:11:08.031] for (kk in seq_along(NAMES)) { [13:11:08.031] name <- changed[[kk]] [13:11:08.031] NAME <- NAMES[[kk]] [13:11:08.031] if (name != NAME && is.element(NAME, old_names)) [13:11:08.031] next [13:11:08.031] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.031] } [13:11:08.031] NAMES <- toupper(added) [13:11:08.031] for (kk in seq_along(NAMES)) { [13:11:08.031] name <- added[[kk]] [13:11:08.031] NAME <- NAMES[[kk]] [13:11:08.031] if (name != NAME && is.element(NAME, old_names)) [13:11:08.031] next [13:11:08.031] args[[name]] <- "" [13:11:08.031] } [13:11:08.031] NAMES <- toupper(removed) [13:11:08.031] for (kk in seq_along(NAMES)) { [13:11:08.031] name <- removed[[kk]] [13:11:08.031] NAME <- NAMES[[kk]] [13:11:08.031] if (name != NAME && is.element(NAME, old_names)) [13:11:08.031] next [13:11:08.031] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.031] } [13:11:08.031] if (length(args) > 0) [13:11:08.031] base::do.call(base::Sys.setenv, args = args) [13:11:08.031] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:08.031] } [13:11:08.031] else { [13:11:08.031] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:08.031] } [13:11:08.031] { [13:11:08.031] if (base::length(...future.futureOptionsAdded) > [13:11:08.031] 0L) { [13:11:08.031] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:08.031] base::names(opts) <- ...future.futureOptionsAdded [13:11:08.031] base::options(opts) [13:11:08.031] } [13:11:08.031] { [13:11:08.031] NULL [13:11:08.031] options(future.plan = NULL) [13:11:08.031] if (is.na(NA_character_)) [13:11:08.031] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.031] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:08.031] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:08.031] .init = FALSE) [13:11:08.031] } [13:11:08.031] } [13:11:08.031] } [13:11:08.031] }) [13:11:08.031] if (TRUE) { [13:11:08.031] base::sink(type = "output", split = FALSE) [13:11:08.031] if (TRUE) { [13:11:08.031] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:08.031] } [13:11:08.031] else { [13:11:08.031] ...future.result["stdout"] <- base::list(NULL) [13:11:08.031] } [13:11:08.031] base::close(...future.stdout) [13:11:08.031] ...future.stdout <- NULL [13:11:08.031] } [13:11:08.031] ...future.result$conditions <- ...future.conditions [13:11:08.031] ...future.result$finished <- base::Sys.time() [13:11:08.031] ...future.result [13:11:08.031] } [13:11:08.131] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:11:08.132] plan(): nbrOfWorkers() = 2 > library("listenv") > > plan(mirai_multisession) [13:11:08.137] plan(): Setting new future strategy stack: [13:11:08.137] List of future strategies: [13:11:08.137] 1. mirai_multisession: [13:11:08.137] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:11:08.137] - tweaked: FALSE [13:11:08.137] - call: plan(mirai_multisession) [13:11:08.150] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:11:08.150] < mirai | $data > [13:11:08.153] getGlobalsAndPackages() ... [13:11:08.153] Not searching for globals [13:11:08.153] - globals: [0] [13:11:08.153] getGlobalsAndPackages() ... DONE [13:11:08.153] getGlobalsAndPackages() ... [13:11:08.154] [13:11:08.154] - globals: [0] [13:11:08.154] getGlobalsAndPackages() ... DONE [13:11:08.154] Packages needed by the future expression (n = 0): [13:11:08.154] Packages needed by future strategies (n = 0): [13:11:08.155] { [13:11:08.155] { [13:11:08.155] { [13:11:08.155] ...future.startTime <- base::Sys.time() [13:11:08.155] { [13:11:08.155] { [13:11:08.155] { [13:11:08.155] base::local({ [13:11:08.155] has_future <- base::requireNamespace("future", [13:11:08.155] quietly = TRUE) [13:11:08.155] if (has_future) { [13:11:08.155] ns <- base::getNamespace("future") [13:11:08.155] version <- ns[[".package"]][["version"]] [13:11:08.155] if (is.null(version)) [13:11:08.155] version <- utils::packageVersion("future") [13:11:08.155] } [13:11:08.155] else { [13:11:08.155] version <- NULL [13:11:08.155] } [13:11:08.155] if (!has_future || version < "1.8.0") { [13:11:08.155] info <- base::c(r_version = base::gsub("R version ", [13:11:08.155] "", base::R.version$version.string), [13:11:08.155] platform = base::sprintf("%s (%s-bit)", [13:11:08.155] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:08.155] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:08.155] "release", "version")], collapse = " "), [13:11:08.155] hostname = base::Sys.info()[["nodename"]]) [13:11:08.155] info <- base::sprintf("%s: %s", base::names(info), [13:11:08.155] info) [13:11:08.155] info <- base::paste(info, collapse = "; ") [13:11:08.155] if (!has_future) { [13:11:08.155] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:08.155] info) [13:11:08.155] } [13:11:08.155] else { [13:11:08.155] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:08.155] info, version) [13:11:08.155] } [13:11:08.155] base::stop(msg) [13:11:08.155] } [13:11:08.155] }) [13:11:08.155] } [13:11:08.155] ...future.strategy.old <- future::plan("list") [13:11:08.155] options(future.plan = NULL) [13:11:08.155] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.155] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:08.155] } [13:11:08.155] ...future.workdir <- getwd() [13:11:08.155] } [13:11:08.155] ...future.oldOptions <- base::as.list(base::.Options) [13:11:08.155] ...future.oldEnvVars <- base::Sys.getenv() [13:11:08.155] } [13:11:08.155] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:08.155] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:08.155] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:08.155] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:08.155] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:08.155] future.stdout.windows.reencode = NULL, width = 80L) [13:11:08.155] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:08.155] base::names(...future.oldOptions)) [13:11:08.155] } [13:11:08.155] if (FALSE) { [13:11:08.155] } [13:11:08.155] else { [13:11:08.155] if (TRUE) { [13:11:08.155] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:08.155] open = "w") [13:11:08.155] } [13:11:08.155] else { [13:11:08.155] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:08.155] windows = "NUL", "/dev/null"), open = "w") [13:11:08.155] } [13:11:08.155] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:08.155] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:08.155] base::sink(type = "output", split = FALSE) [13:11:08.155] base::close(...future.stdout) [13:11:08.155] }, add = TRUE) [13:11:08.155] } [13:11:08.155] ...future.frame <- base::sys.nframe() [13:11:08.155] ...future.conditions <- base::list() [13:11:08.155] ...future.rng <- base::globalenv()$.Random.seed [13:11:08.155] if (FALSE) { [13:11:08.155] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:08.155] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:08.155] } [13:11:08.155] ...future.result <- base::tryCatch({ [13:11:08.155] base::withCallingHandlers({ [13:11:08.155] ...future.value <- base::withVisible(base::local(NA)) [13:11:08.155] future::FutureResult(value = ...future.value$value, [13:11:08.155] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.155] ...future.rng), globalenv = if (FALSE) [13:11:08.155] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:08.155] ...future.globalenv.names)) [13:11:08.155] else NULL, started = ...future.startTime, version = "1.8") [13:11:08.155] }, condition = base::local({ [13:11:08.155] c <- base::c [13:11:08.155] inherits <- base::inherits [13:11:08.155] invokeRestart <- base::invokeRestart [13:11:08.155] length <- base::length [13:11:08.155] list <- base::list [13:11:08.155] seq.int <- base::seq.int [13:11:08.155] signalCondition <- base::signalCondition [13:11:08.155] sys.calls <- base::sys.calls [13:11:08.155] `[[` <- base::`[[` [13:11:08.155] `+` <- base::`+` [13:11:08.155] `<<-` <- base::`<<-` [13:11:08.155] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:08.155] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:08.155] 3L)] [13:11:08.155] } [13:11:08.155] function(cond) { [13:11:08.155] is_error <- inherits(cond, "error") [13:11:08.155] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:08.155] NULL) [13:11:08.155] if (is_error) { [13:11:08.155] sessionInformation <- function() { [13:11:08.155] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:08.155] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:08.155] search = base::search(), system = base::Sys.info()) [13:11:08.155] } [13:11:08.155] ...future.conditions[[length(...future.conditions) + [13:11:08.155] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:08.155] cond$call), session = sessionInformation(), [13:11:08.155] timestamp = base::Sys.time(), signaled = 0L) [13:11:08.155] signalCondition(cond) [13:11:08.155] } [13:11:08.155] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:08.155] signal <- FALSE && inherits(cond, character(0)) [13:11:08.155] ...future.conditions[[length(...future.conditions) + [13:11:08.155] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:08.155] if (FALSE && !signal) { [13:11:08.155] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.155] { [13:11:08.155] inherits <- base::inherits [13:11:08.155] invokeRestart <- base::invokeRestart [13:11:08.155] is.null <- base::is.null [13:11:08.155] muffled <- FALSE [13:11:08.155] if (inherits(cond, "message")) { [13:11:08.155] muffled <- grepl(pattern, "muffleMessage") [13:11:08.155] if (muffled) [13:11:08.155] invokeRestart("muffleMessage") [13:11:08.155] } [13:11:08.155] else if (inherits(cond, "warning")) { [13:11:08.155] muffled <- grepl(pattern, "muffleWarning") [13:11:08.155] if (muffled) [13:11:08.155] invokeRestart("muffleWarning") [13:11:08.155] } [13:11:08.155] else if (inherits(cond, "condition")) { [13:11:08.155] if (!is.null(pattern)) { [13:11:08.155] computeRestarts <- base::computeRestarts [13:11:08.155] grepl <- base::grepl [13:11:08.155] restarts <- computeRestarts(cond) [13:11:08.155] for (restart in restarts) { [13:11:08.155] name <- restart$name [13:11:08.155] if (is.null(name)) [13:11:08.155] next [13:11:08.155] if (!grepl(pattern, name)) [13:11:08.155] next [13:11:08.155] invokeRestart(restart) [13:11:08.155] muffled <- TRUE [13:11:08.155] break [13:11:08.155] } [13:11:08.155] } [13:11:08.155] } [13:11:08.155] invisible(muffled) [13:11:08.155] } [13:11:08.155] muffleCondition(cond, pattern = "^muffle") [13:11:08.155] } [13:11:08.155] } [13:11:08.155] else { [13:11:08.155] if (TRUE) { [13:11:08.155] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.155] { [13:11:08.155] inherits <- base::inherits [13:11:08.155] invokeRestart <- base::invokeRestart [13:11:08.155] is.null <- base::is.null [13:11:08.155] muffled <- FALSE [13:11:08.155] if (inherits(cond, "message")) { [13:11:08.155] muffled <- grepl(pattern, "muffleMessage") [13:11:08.155] if (muffled) [13:11:08.155] invokeRestart("muffleMessage") [13:11:08.155] } [13:11:08.155] else if (inherits(cond, "warning")) { [13:11:08.155] muffled <- grepl(pattern, "muffleWarning") [13:11:08.155] if (muffled) [13:11:08.155] invokeRestart("muffleWarning") [13:11:08.155] } [13:11:08.155] else if (inherits(cond, "condition")) { [13:11:08.155] if (!is.null(pattern)) { [13:11:08.155] computeRestarts <- base::computeRestarts [13:11:08.155] grepl <- base::grepl [13:11:08.155] restarts <- computeRestarts(cond) [13:11:08.155] for (restart in restarts) { [13:11:08.155] name <- restart$name [13:11:08.155] if (is.null(name)) [13:11:08.155] next [13:11:08.155] if (!grepl(pattern, name)) [13:11:08.155] next [13:11:08.155] invokeRestart(restart) [13:11:08.155] muffled <- TRUE [13:11:08.155] break [13:11:08.155] } [13:11:08.155] } [13:11:08.155] } [13:11:08.155] invisible(muffled) [13:11:08.155] } [13:11:08.155] muffleCondition(cond, pattern = "^muffle") [13:11:08.155] } [13:11:08.155] } [13:11:08.155] } [13:11:08.155] })) [13:11:08.155] }, error = function(ex) { [13:11:08.155] base::structure(base::list(value = NULL, visible = NULL, [13:11:08.155] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.155] ...future.rng), started = ...future.startTime, [13:11:08.155] finished = Sys.time(), session_uuid = NA_character_, [13:11:08.155] version = "1.8"), class = "FutureResult") [13:11:08.155] }, finally = { [13:11:08.155] if (!identical(...future.workdir, getwd())) [13:11:08.155] setwd(...future.workdir) [13:11:08.155] { [13:11:08.155] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:08.155] ...future.oldOptions$nwarnings <- NULL [13:11:08.155] } [13:11:08.155] base::options(...future.oldOptions) [13:11:08.155] if (.Platform$OS.type == "windows") { [13:11:08.155] old_names <- names(...future.oldEnvVars) [13:11:08.155] envs <- base::Sys.getenv() [13:11:08.155] names <- names(envs) [13:11:08.155] common <- intersect(names, old_names) [13:11:08.155] added <- setdiff(names, old_names) [13:11:08.155] removed <- setdiff(old_names, names) [13:11:08.155] changed <- common[...future.oldEnvVars[common] != [13:11:08.155] envs[common]] [13:11:08.155] NAMES <- toupper(changed) [13:11:08.155] args <- list() [13:11:08.155] for (kk in seq_along(NAMES)) { [13:11:08.155] name <- changed[[kk]] [13:11:08.155] NAME <- NAMES[[kk]] [13:11:08.155] if (name != NAME && is.element(NAME, old_names)) [13:11:08.155] next [13:11:08.155] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.155] } [13:11:08.155] NAMES <- toupper(added) [13:11:08.155] for (kk in seq_along(NAMES)) { [13:11:08.155] name <- added[[kk]] [13:11:08.155] NAME <- NAMES[[kk]] [13:11:08.155] if (name != NAME && is.element(NAME, old_names)) [13:11:08.155] next [13:11:08.155] args[[name]] <- "" [13:11:08.155] } [13:11:08.155] NAMES <- toupper(removed) [13:11:08.155] for (kk in seq_along(NAMES)) { [13:11:08.155] name <- removed[[kk]] [13:11:08.155] NAME <- NAMES[[kk]] [13:11:08.155] if (name != NAME && is.element(NAME, old_names)) [13:11:08.155] next [13:11:08.155] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.155] } [13:11:08.155] if (length(args) > 0) [13:11:08.155] base::do.call(base::Sys.setenv, args = args) [13:11:08.155] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:08.155] } [13:11:08.155] else { [13:11:08.155] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:08.155] } [13:11:08.155] { [13:11:08.155] if (base::length(...future.futureOptionsAdded) > [13:11:08.155] 0L) { [13:11:08.155] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:08.155] base::names(opts) <- ...future.futureOptionsAdded [13:11:08.155] base::options(opts) [13:11:08.155] } [13:11:08.155] { [13:11:08.155] NULL [13:11:08.155] options(future.plan = NULL) [13:11:08.155] if (is.na(NA_character_)) [13:11:08.155] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.155] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:08.155] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:08.155] .init = FALSE) [13:11:08.155] } [13:11:08.155] } [13:11:08.155] } [13:11:08.155] }) [13:11:08.155] if (TRUE) { [13:11:08.155] base::sink(type = "output", split = FALSE) [13:11:08.155] if (TRUE) { [13:11:08.155] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:08.155] } [13:11:08.155] else { [13:11:08.155] ...future.result["stdout"] <- base::list(NULL) [13:11:08.155] } [13:11:08.155] base::close(...future.stdout) [13:11:08.155] ...future.stdout <- NULL [13:11:08.155] } [13:11:08.155] ...future.result$conditions <- ...future.conditions [13:11:08.155] ...future.result$finished <- base::Sys.time() [13:11:08.155] ...future.result [13:11:08.155] } [13:11:08.256] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:11:08.256] 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:11:08.258] getGlobalsAndPackages() ... [13:11:08.258] Searching for globals... [13:11:08.267] - globals found: [4] '{', 'stopifnot', 'is.numeric', 'col' [13:11:08.267] Searching for globals ... DONE [13:11:08.267] Resolving globals: FALSE [13:11:08.268] The total size of the 1 globals is 56 bytes (56 bytes) [13:11:08.269] 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:11:08.269] - globals: [1] 'col' [13:11:08.269] [13:11:08.270] getGlobalsAndPackages() ... DONE [13:11:08.270] run() for 'Future' ... [13:11:08.270] - state: 'created' [13:11:08.271] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:08.273] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:08.273] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:08.273] - Field: 'label' [13:11:08.273] - Field: 'local' [13:11:08.274] - Field: 'owner' [13:11:08.274] - Field: 'envir' [13:11:08.274] - Field: 'packages' [13:11:08.274] - Field: 'gc' [13:11:08.274] - Field: 'conditions' [13:11:08.274] - Field: 'expr' [13:11:08.275] - Field: 'uuid' [13:11:08.275] - Field: 'seed' [13:11:08.275] - Field: 'version' [13:11:08.275] - Field: 'result' [13:11:08.275] - Field: 'asynchronous' [13:11:08.275] - Field: 'calls' [13:11:08.276] - Field: 'globals' [13:11:08.276] - Field: 'stdout' [13:11:08.276] - Field: 'earlySignal' [13:11:08.276] - Field: 'lazy' [13:11:08.276] - Field: 'state' [13:11:08.276] - Field: '.cluster' [13:11:08.277] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:08.277] - Launch lazy future ... [13:11:08.277] Packages needed by the future expression (n = 0): [13:11:08.277] Packages needed by future strategies (n = 0): [13:11:08.278] { [13:11:08.278] { [13:11:08.278] { [13:11:08.278] ...future.startTime <- base::Sys.time() [13:11:08.278] { [13:11:08.278] { [13:11:08.278] { [13:11:08.278] base::local({ [13:11:08.278] has_future <- base::requireNamespace("future", [13:11:08.278] quietly = TRUE) [13:11:08.278] if (has_future) { [13:11:08.278] ns <- base::getNamespace("future") [13:11:08.278] version <- ns[[".package"]][["version"]] [13:11:08.278] if (is.null(version)) [13:11:08.278] version <- utils::packageVersion("future") [13:11:08.278] } [13:11:08.278] else { [13:11:08.278] version <- NULL [13:11:08.278] } [13:11:08.278] if (!has_future || version < "1.8.0") { [13:11:08.278] info <- base::c(r_version = base::gsub("R version ", [13:11:08.278] "", base::R.version$version.string), [13:11:08.278] platform = base::sprintf("%s (%s-bit)", [13:11:08.278] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:08.278] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:08.278] "release", "version")], collapse = " "), [13:11:08.278] hostname = base::Sys.info()[["nodename"]]) [13:11:08.278] info <- base::sprintf("%s: %s", base::names(info), [13:11:08.278] info) [13:11:08.278] info <- base::paste(info, collapse = "; ") [13:11:08.278] if (!has_future) { [13:11:08.278] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:08.278] info) [13:11:08.278] } [13:11:08.278] else { [13:11:08.278] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:08.278] info, version) [13:11:08.278] } [13:11:08.278] base::stop(msg) [13:11:08.278] } [13:11:08.278] }) [13:11:08.278] } [13:11:08.278] ...future.strategy.old <- future::plan("list") [13:11:08.278] options(future.plan = NULL) [13:11:08.278] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.278] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:08.278] } [13:11:08.278] ...future.workdir <- getwd() [13:11:08.278] } [13:11:08.278] ...future.oldOptions <- base::as.list(base::.Options) [13:11:08.278] ...future.oldEnvVars <- base::Sys.getenv() [13:11:08.278] } [13:11:08.278] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:08.278] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:08.278] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:08.278] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:08.278] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:08.278] future.stdout.windows.reencode = NULL, width = 80L) [13:11:08.278] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:08.278] base::names(...future.oldOptions)) [13:11:08.278] } [13:11:08.278] if (FALSE) { [13:11:08.278] } [13:11:08.278] else { [13:11:08.278] if (TRUE) { [13:11:08.278] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:08.278] open = "w") [13:11:08.278] } [13:11:08.278] else { [13:11:08.278] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:08.278] windows = "NUL", "/dev/null"), open = "w") [13:11:08.278] } [13:11:08.278] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:08.278] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:08.278] base::sink(type = "output", split = FALSE) [13:11:08.278] base::close(...future.stdout) [13:11:08.278] }, add = TRUE) [13:11:08.278] } [13:11:08.278] ...future.frame <- base::sys.nframe() [13:11:08.278] ...future.conditions <- base::list() [13:11:08.278] ...future.rng <- base::globalenv()$.Random.seed [13:11:08.278] if (FALSE) { [13:11:08.278] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:08.278] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:08.278] } [13:11:08.278] ...future.result <- base::tryCatch({ [13:11:08.278] base::withCallingHandlers({ [13:11:08.278] ...future.value <- base::withVisible(base::local({ [13:11:08.278] stopifnot(is.numeric(col)) [13:11:08.278] col [13:11:08.278] })) [13:11:08.278] future::FutureResult(value = ...future.value$value, [13:11:08.278] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.278] ...future.rng), globalenv = if (FALSE) [13:11:08.278] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:08.278] ...future.globalenv.names)) [13:11:08.278] else NULL, started = ...future.startTime, version = "1.8") [13:11:08.278] }, condition = base::local({ [13:11:08.278] c <- base::c [13:11:08.278] inherits <- base::inherits [13:11:08.278] invokeRestart <- base::invokeRestart [13:11:08.278] length <- base::length [13:11:08.278] list <- base::list [13:11:08.278] seq.int <- base::seq.int [13:11:08.278] signalCondition <- base::signalCondition [13:11:08.278] sys.calls <- base::sys.calls [13:11:08.278] `[[` <- base::`[[` [13:11:08.278] `+` <- base::`+` [13:11:08.278] `<<-` <- base::`<<-` [13:11:08.278] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:08.278] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:08.278] 3L)] [13:11:08.278] } [13:11:08.278] function(cond) { [13:11:08.278] is_error <- inherits(cond, "error") [13:11:08.278] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:08.278] NULL) [13:11:08.278] if (is_error) { [13:11:08.278] sessionInformation <- function() { [13:11:08.278] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:08.278] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:08.278] search = base::search(), system = base::Sys.info()) [13:11:08.278] } [13:11:08.278] ...future.conditions[[length(...future.conditions) + [13:11:08.278] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:08.278] cond$call), session = sessionInformation(), [13:11:08.278] timestamp = base::Sys.time(), signaled = 0L) [13:11:08.278] signalCondition(cond) [13:11:08.278] } [13:11:08.278] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:08.278] signal <- FALSE && inherits(cond, character(0)) [13:11:08.278] ...future.conditions[[length(...future.conditions) + [13:11:08.278] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:08.278] if (FALSE && !signal) { [13:11:08.278] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.278] { [13:11:08.278] inherits <- base::inherits [13:11:08.278] invokeRestart <- base::invokeRestart [13:11:08.278] is.null <- base::is.null [13:11:08.278] muffled <- FALSE [13:11:08.278] if (inherits(cond, "message")) { [13:11:08.278] muffled <- grepl(pattern, "muffleMessage") [13:11:08.278] if (muffled) [13:11:08.278] invokeRestart("muffleMessage") [13:11:08.278] } [13:11:08.278] else if (inherits(cond, "warning")) { [13:11:08.278] muffled <- grepl(pattern, "muffleWarning") [13:11:08.278] if (muffled) [13:11:08.278] invokeRestart("muffleWarning") [13:11:08.278] } [13:11:08.278] else if (inherits(cond, "condition")) { [13:11:08.278] if (!is.null(pattern)) { [13:11:08.278] computeRestarts <- base::computeRestarts [13:11:08.278] grepl <- base::grepl [13:11:08.278] restarts <- computeRestarts(cond) [13:11:08.278] for (restart in restarts) { [13:11:08.278] name <- restart$name [13:11:08.278] if (is.null(name)) [13:11:08.278] next [13:11:08.278] if (!grepl(pattern, name)) [13:11:08.278] next [13:11:08.278] invokeRestart(restart) [13:11:08.278] muffled <- TRUE [13:11:08.278] break [13:11:08.278] } [13:11:08.278] } [13:11:08.278] } [13:11:08.278] invisible(muffled) [13:11:08.278] } [13:11:08.278] muffleCondition(cond, pattern = "^muffle") [13:11:08.278] } [13:11:08.278] } [13:11:08.278] else { [13:11:08.278] if (TRUE) { [13:11:08.278] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.278] { [13:11:08.278] inherits <- base::inherits [13:11:08.278] invokeRestart <- base::invokeRestart [13:11:08.278] is.null <- base::is.null [13:11:08.278] muffled <- FALSE [13:11:08.278] if (inherits(cond, "message")) { [13:11:08.278] muffled <- grepl(pattern, "muffleMessage") [13:11:08.278] if (muffled) [13:11:08.278] invokeRestart("muffleMessage") [13:11:08.278] } [13:11:08.278] else if (inherits(cond, "warning")) { [13:11:08.278] muffled <- grepl(pattern, "muffleWarning") [13:11:08.278] if (muffled) [13:11:08.278] invokeRestart("muffleWarning") [13:11:08.278] } [13:11:08.278] else if (inherits(cond, "condition")) { [13:11:08.278] if (!is.null(pattern)) { [13:11:08.278] computeRestarts <- base::computeRestarts [13:11:08.278] grepl <- base::grepl [13:11:08.278] restarts <- computeRestarts(cond) [13:11:08.278] for (restart in restarts) { [13:11:08.278] name <- restart$name [13:11:08.278] if (is.null(name)) [13:11:08.278] next [13:11:08.278] if (!grepl(pattern, name)) [13:11:08.278] next [13:11:08.278] invokeRestart(restart) [13:11:08.278] muffled <- TRUE [13:11:08.278] break [13:11:08.278] } [13:11:08.278] } [13:11:08.278] } [13:11:08.278] invisible(muffled) [13:11:08.278] } [13:11:08.278] muffleCondition(cond, pattern = "^muffle") [13:11:08.278] } [13:11:08.278] } [13:11:08.278] } [13:11:08.278] })) [13:11:08.278] }, error = function(ex) { [13:11:08.278] base::structure(base::list(value = NULL, visible = NULL, [13:11:08.278] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.278] ...future.rng), started = ...future.startTime, [13:11:08.278] finished = Sys.time(), session_uuid = NA_character_, [13:11:08.278] version = "1.8"), class = "FutureResult") [13:11:08.278] }, finally = { [13:11:08.278] if (!identical(...future.workdir, getwd())) [13:11:08.278] setwd(...future.workdir) [13:11:08.278] { [13:11:08.278] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:08.278] ...future.oldOptions$nwarnings <- NULL [13:11:08.278] } [13:11:08.278] base::options(...future.oldOptions) [13:11:08.278] if (.Platform$OS.type == "windows") { [13:11:08.278] old_names <- names(...future.oldEnvVars) [13:11:08.278] envs <- base::Sys.getenv() [13:11:08.278] names <- names(envs) [13:11:08.278] common <- intersect(names, old_names) [13:11:08.278] added <- setdiff(names, old_names) [13:11:08.278] removed <- setdiff(old_names, names) [13:11:08.278] changed <- common[...future.oldEnvVars[common] != [13:11:08.278] envs[common]] [13:11:08.278] NAMES <- toupper(changed) [13:11:08.278] args <- list() [13:11:08.278] for (kk in seq_along(NAMES)) { [13:11:08.278] name <- changed[[kk]] [13:11:08.278] NAME <- NAMES[[kk]] [13:11:08.278] if (name != NAME && is.element(NAME, old_names)) [13:11:08.278] next [13:11:08.278] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.278] } [13:11:08.278] NAMES <- toupper(added) [13:11:08.278] for (kk in seq_along(NAMES)) { [13:11:08.278] name <- added[[kk]] [13:11:08.278] NAME <- NAMES[[kk]] [13:11:08.278] if (name != NAME && is.element(NAME, old_names)) [13:11:08.278] next [13:11:08.278] args[[name]] <- "" [13:11:08.278] } [13:11:08.278] NAMES <- toupper(removed) [13:11:08.278] for (kk in seq_along(NAMES)) { [13:11:08.278] name <- removed[[kk]] [13:11:08.278] NAME <- NAMES[[kk]] [13:11:08.278] if (name != NAME && is.element(NAME, old_names)) [13:11:08.278] next [13:11:08.278] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.278] } [13:11:08.278] if (length(args) > 0) [13:11:08.278] base::do.call(base::Sys.setenv, args = args) [13:11:08.278] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:08.278] } [13:11:08.278] else { [13:11:08.278] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:08.278] } [13:11:08.278] { [13:11:08.278] if (base::length(...future.futureOptionsAdded) > [13:11:08.278] 0L) { [13:11:08.278] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:08.278] base::names(opts) <- ...future.futureOptionsAdded [13:11:08.278] base::options(opts) [13:11:08.278] } [13:11:08.278] { [13:11:08.278] NULL [13:11:08.278] options(future.plan = NULL) [13:11:08.278] if (is.na(NA_character_)) [13:11:08.278] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.278] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:08.278] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:08.278] .init = FALSE) [13:11:08.278] } [13:11:08.278] } [13:11:08.278] } [13:11:08.278] }) [13:11:08.278] if (TRUE) { [13:11:08.278] base::sink(type = "output", split = FALSE) [13:11:08.278] if (TRUE) { [13:11:08.278] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:08.278] } [13:11:08.278] else { [13:11:08.278] ...future.result["stdout"] <- base::list(NULL) [13:11:08.278] } [13:11:08.278] base::close(...future.stdout) [13:11:08.278] ...future.stdout <- NULL [13:11:08.278] } [13:11:08.278] ...future.result$conditions <- ...future.conditions [13:11:08.278] ...future.result$finished <- base::Sys.time() [13:11:08.278] ...future.result [13:11:08.278] } [13:11:08.282] - Launch lazy future ... done [13:11:08.282] 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:11:08.296] getGlobalsAndPackages() ... [13:11:08.296] Searching for globals... [13:11:08.300] - globals found: [6] 'FUN', '[[', 'x', 'ii', '...', '.Internal' [13:11:08.301] Searching for globals ... DONE [13:11:08.301] Resolving globals: FALSE [13:11:08.301] Tweak future expression to call with '...' arguments ... [13:11:08.301] { [13:11:08.301] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:11:08.301] } [13:11:08.301] Tweak future expression to call with '...' arguments ... DONE [13:11:08.302] The total size of the 4 globals is 2.69 KiB (2752 bytes) [13:11:08.303] 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:11:08.303] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:11:08.303] [13:11:08.303] getGlobalsAndPackages() ... DONE [13:11:08.304] run() for 'Future' ... [13:11:08.304] - state: 'created' [13:11:08.304] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:08.306] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:08.307] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:08.307] - Field: 'label' [13:11:08.307] - Field: 'local' [13:11:08.307] - Field: 'owner' [13:11:08.307] - Field: 'envir' [13:11:08.307] - Field: 'packages' [13:11:08.308] - Field: 'gc' [13:11:08.308] - Field: 'conditions' [13:11:08.308] - Field: 'expr' [13:11:08.308] - Field: 'uuid' [13:11:08.308] - Field: 'seed' [13:11:08.308] - Field: 'version' [13:11:08.309] - Field: 'result' [13:11:08.309] - Field: 'asynchronous' [13:11:08.309] - Field: 'calls' [13:11:08.309] - Field: 'globals' [13:11:08.309] - Field: 'stdout' [13:11:08.309] - Field: 'earlySignal' [13:11:08.310] - Field: 'lazy' [13:11:08.310] - Field: 'state' [13:11:08.310] - Field: '.cluster' [13:11:08.310] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:08.310] - Launch lazy future ... [13:11:08.310] Packages needed by the future expression (n = 0): [13:11:08.311] Packages needed by future strategies (n = 0): [13:11:08.311] { [13:11:08.311] { [13:11:08.311] { [13:11:08.311] ...future.startTime <- base::Sys.time() [13:11:08.311] { [13:11:08.311] { [13:11:08.311] { [13:11:08.311] base::local({ [13:11:08.311] has_future <- base::requireNamespace("future", [13:11:08.311] quietly = TRUE) [13:11:08.311] if (has_future) { [13:11:08.311] ns <- base::getNamespace("future") [13:11:08.311] version <- ns[[".package"]][["version"]] [13:11:08.311] if (is.null(version)) [13:11:08.311] version <- utils::packageVersion("future") [13:11:08.311] } [13:11:08.311] else { [13:11:08.311] version <- NULL [13:11:08.311] } [13:11:08.311] if (!has_future || version < "1.8.0") { [13:11:08.311] info <- base::c(r_version = base::gsub("R version ", [13:11:08.311] "", base::R.version$version.string), [13:11:08.311] platform = base::sprintf("%s (%s-bit)", [13:11:08.311] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:08.311] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:08.311] "release", "version")], collapse = " "), [13:11:08.311] hostname = base::Sys.info()[["nodename"]]) [13:11:08.311] info <- base::sprintf("%s: %s", base::names(info), [13:11:08.311] info) [13:11:08.311] info <- base::paste(info, collapse = "; ") [13:11:08.311] if (!has_future) { [13:11:08.311] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:08.311] info) [13:11:08.311] } [13:11:08.311] else { [13:11:08.311] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:08.311] info, version) [13:11:08.311] } [13:11:08.311] base::stop(msg) [13:11:08.311] } [13:11:08.311] }) [13:11:08.311] } [13:11:08.311] ...future.strategy.old <- future::plan("list") [13:11:08.311] options(future.plan = NULL) [13:11:08.311] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.311] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:08.311] } [13:11:08.311] ...future.workdir <- getwd() [13:11:08.311] } [13:11:08.311] ...future.oldOptions <- base::as.list(base::.Options) [13:11:08.311] ...future.oldEnvVars <- base::Sys.getenv() [13:11:08.311] } [13:11:08.311] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:08.311] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:08.311] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:08.311] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:08.311] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:08.311] future.stdout.windows.reencode = NULL, width = 80L) [13:11:08.311] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:08.311] base::names(...future.oldOptions)) [13:11:08.311] } [13:11:08.311] if (FALSE) { [13:11:08.311] } [13:11:08.311] else { [13:11:08.311] if (TRUE) { [13:11:08.311] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:08.311] open = "w") [13:11:08.311] } [13:11:08.311] else { [13:11:08.311] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:08.311] windows = "NUL", "/dev/null"), open = "w") [13:11:08.311] } [13:11:08.311] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:08.311] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:08.311] base::sink(type = "output", split = FALSE) [13:11:08.311] base::close(...future.stdout) [13:11:08.311] }, add = TRUE) [13:11:08.311] } [13:11:08.311] ...future.frame <- base::sys.nframe() [13:11:08.311] ...future.conditions <- base::list() [13:11:08.311] ...future.rng <- base::globalenv()$.Random.seed [13:11:08.311] if (FALSE) { [13:11:08.311] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:08.311] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:08.311] } [13:11:08.311] ...future.result <- base::tryCatch({ [13:11:08.311] base::withCallingHandlers({ [13:11:08.311] ...future.value <- base::withVisible(base::local({ [13:11:08.311] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:11:08.311] })) [13:11:08.311] future::FutureResult(value = ...future.value$value, [13:11:08.311] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.311] ...future.rng), globalenv = if (FALSE) [13:11:08.311] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:08.311] ...future.globalenv.names)) [13:11:08.311] else NULL, started = ...future.startTime, version = "1.8") [13:11:08.311] }, condition = base::local({ [13:11:08.311] c <- base::c [13:11:08.311] inherits <- base::inherits [13:11:08.311] invokeRestart <- base::invokeRestart [13:11:08.311] length <- base::length [13:11:08.311] list <- base::list [13:11:08.311] seq.int <- base::seq.int [13:11:08.311] signalCondition <- base::signalCondition [13:11:08.311] sys.calls <- base::sys.calls [13:11:08.311] `[[` <- base::`[[` [13:11:08.311] `+` <- base::`+` [13:11:08.311] `<<-` <- base::`<<-` [13:11:08.311] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:08.311] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:08.311] 3L)] [13:11:08.311] } [13:11:08.311] function(cond) { [13:11:08.311] is_error <- inherits(cond, "error") [13:11:08.311] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:08.311] NULL) [13:11:08.311] if (is_error) { [13:11:08.311] sessionInformation <- function() { [13:11:08.311] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:08.311] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:08.311] search = base::search(), system = base::Sys.info()) [13:11:08.311] } [13:11:08.311] ...future.conditions[[length(...future.conditions) + [13:11:08.311] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:08.311] cond$call), session = sessionInformation(), [13:11:08.311] timestamp = base::Sys.time(), signaled = 0L) [13:11:08.311] signalCondition(cond) [13:11:08.311] } [13:11:08.311] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:08.311] signal <- FALSE && inherits(cond, character(0)) [13:11:08.311] ...future.conditions[[length(...future.conditions) + [13:11:08.311] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:08.311] if (FALSE && !signal) { [13:11:08.311] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.311] { [13:11:08.311] inherits <- base::inherits [13:11:08.311] invokeRestart <- base::invokeRestart [13:11:08.311] is.null <- base::is.null [13:11:08.311] muffled <- FALSE [13:11:08.311] if (inherits(cond, "message")) { [13:11:08.311] muffled <- grepl(pattern, "muffleMessage") [13:11:08.311] if (muffled) [13:11:08.311] invokeRestart("muffleMessage") [13:11:08.311] } [13:11:08.311] else if (inherits(cond, "warning")) { [13:11:08.311] muffled <- grepl(pattern, "muffleWarning") [13:11:08.311] if (muffled) [13:11:08.311] invokeRestart("muffleWarning") [13:11:08.311] } [13:11:08.311] else if (inherits(cond, "condition")) { [13:11:08.311] if (!is.null(pattern)) { [13:11:08.311] computeRestarts <- base::computeRestarts [13:11:08.311] grepl <- base::grepl [13:11:08.311] restarts <- computeRestarts(cond) [13:11:08.311] for (restart in restarts) { [13:11:08.311] name <- restart$name [13:11:08.311] if (is.null(name)) [13:11:08.311] next [13:11:08.311] if (!grepl(pattern, name)) [13:11:08.311] next [13:11:08.311] invokeRestart(restart) [13:11:08.311] muffled <- TRUE [13:11:08.311] break [13:11:08.311] } [13:11:08.311] } [13:11:08.311] } [13:11:08.311] invisible(muffled) [13:11:08.311] } [13:11:08.311] muffleCondition(cond, pattern = "^muffle") [13:11:08.311] } [13:11:08.311] } [13:11:08.311] else { [13:11:08.311] if (TRUE) { [13:11:08.311] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.311] { [13:11:08.311] inherits <- base::inherits [13:11:08.311] invokeRestart <- base::invokeRestart [13:11:08.311] is.null <- base::is.null [13:11:08.311] muffled <- FALSE [13:11:08.311] if (inherits(cond, "message")) { [13:11:08.311] muffled <- grepl(pattern, "muffleMessage") [13:11:08.311] if (muffled) [13:11:08.311] invokeRestart("muffleMessage") [13:11:08.311] } [13:11:08.311] else if (inherits(cond, "warning")) { [13:11:08.311] muffled <- grepl(pattern, "muffleWarning") [13:11:08.311] if (muffled) [13:11:08.311] invokeRestart("muffleWarning") [13:11:08.311] } [13:11:08.311] else if (inherits(cond, "condition")) { [13:11:08.311] if (!is.null(pattern)) { [13:11:08.311] computeRestarts <- base::computeRestarts [13:11:08.311] grepl <- base::grepl [13:11:08.311] restarts <- computeRestarts(cond) [13:11:08.311] for (restart in restarts) { [13:11:08.311] name <- restart$name [13:11:08.311] if (is.null(name)) [13:11:08.311] next [13:11:08.311] if (!grepl(pattern, name)) [13:11:08.311] next [13:11:08.311] invokeRestart(restart) [13:11:08.311] muffled <- TRUE [13:11:08.311] break [13:11:08.311] } [13:11:08.311] } [13:11:08.311] } [13:11:08.311] invisible(muffled) [13:11:08.311] } [13:11:08.311] muffleCondition(cond, pattern = "^muffle") [13:11:08.311] } [13:11:08.311] } [13:11:08.311] } [13:11:08.311] })) [13:11:08.311] }, error = function(ex) { [13:11:08.311] base::structure(base::list(value = NULL, visible = NULL, [13:11:08.311] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.311] ...future.rng), started = ...future.startTime, [13:11:08.311] finished = Sys.time(), session_uuid = NA_character_, [13:11:08.311] version = "1.8"), class = "FutureResult") [13:11:08.311] }, finally = { [13:11:08.311] if (!identical(...future.workdir, getwd())) [13:11:08.311] setwd(...future.workdir) [13:11:08.311] { [13:11:08.311] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:08.311] ...future.oldOptions$nwarnings <- NULL [13:11:08.311] } [13:11:08.311] base::options(...future.oldOptions) [13:11:08.311] if (.Platform$OS.type == "windows") { [13:11:08.311] old_names <- names(...future.oldEnvVars) [13:11:08.311] envs <- base::Sys.getenv() [13:11:08.311] names <- names(envs) [13:11:08.311] common <- intersect(names, old_names) [13:11:08.311] added <- setdiff(names, old_names) [13:11:08.311] removed <- setdiff(old_names, names) [13:11:08.311] changed <- common[...future.oldEnvVars[common] != [13:11:08.311] envs[common]] [13:11:08.311] NAMES <- toupper(changed) [13:11:08.311] args <- list() [13:11:08.311] for (kk in seq_along(NAMES)) { [13:11:08.311] name <- changed[[kk]] [13:11:08.311] NAME <- NAMES[[kk]] [13:11:08.311] if (name != NAME && is.element(NAME, old_names)) [13:11:08.311] next [13:11:08.311] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.311] } [13:11:08.311] NAMES <- toupper(added) [13:11:08.311] for (kk in seq_along(NAMES)) { [13:11:08.311] name <- added[[kk]] [13:11:08.311] NAME <- NAMES[[kk]] [13:11:08.311] if (name != NAME && is.element(NAME, old_names)) [13:11:08.311] next [13:11:08.311] args[[name]] <- "" [13:11:08.311] } [13:11:08.311] NAMES <- toupper(removed) [13:11:08.311] for (kk in seq_along(NAMES)) { [13:11:08.311] name <- removed[[kk]] [13:11:08.311] NAME <- NAMES[[kk]] [13:11:08.311] if (name != NAME && is.element(NAME, old_names)) [13:11:08.311] next [13:11:08.311] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.311] } [13:11:08.311] if (length(args) > 0) [13:11:08.311] base::do.call(base::Sys.setenv, args = args) [13:11:08.311] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:08.311] } [13:11:08.311] else { [13:11:08.311] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:08.311] } [13:11:08.311] { [13:11:08.311] if (base::length(...future.futureOptionsAdded) > [13:11:08.311] 0L) { [13:11:08.311] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:08.311] base::names(opts) <- ...future.futureOptionsAdded [13:11:08.311] base::options(opts) [13:11:08.311] } [13:11:08.311] { [13:11:08.311] NULL [13:11:08.311] options(future.plan = NULL) [13:11:08.311] if (is.na(NA_character_)) [13:11:08.311] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.311] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:08.311] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:08.311] .init = FALSE) [13:11:08.311] } [13:11:08.311] } [13:11:08.311] } [13:11:08.311] }) [13:11:08.311] if (TRUE) { [13:11:08.311] base::sink(type = "output", split = FALSE) [13:11:08.311] if (TRUE) { [13:11:08.311] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:08.311] } [13:11:08.311] else { [13:11:08.311] ...future.result["stdout"] <- base::list(NULL) [13:11:08.311] } [13:11:08.311] base::close(...future.stdout) [13:11:08.311] ...future.stdout <- NULL [13:11:08.311] } [13:11:08.311] ...future.result$conditions <- ...future.conditions [13:11:08.311] ...future.result$finished <- base::Sys.time() [13:11:08.311] ...future.result [13:11:08.311] } [13:11:08.315] - Launch lazy future ... done [13:11:08.315] run() for 'MiraiFuture' ... done [13:11:08.316] getGlobalsAndPackages() ... [13:11:08.316] Searching for globals... [13:11:08.318] - globals found: [6] 'FUN', '[[', 'x', 'ii', '...', '.Internal' [13:11:08.319] Searching for globals ... DONE [13:11:08.319] Resolving globals: FALSE [13:11:08.319] Tweak future expression to call with '...' arguments ... [13:11:08.319] { [13:11:08.319] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:11:08.319] } [13:11:08.319] Tweak future expression to call with '...' arguments ... DONE [13:11:08.320] The total size of the 4 globals is 2.69 KiB (2752 bytes) [13:11:08.321] 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:11:08.321] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:11:08.321] [13:11:08.321] getGlobalsAndPackages() ... DONE [13:11:08.321] run() for 'Future' ... [13:11:08.322] - state: 'created' [13:11:08.322] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:08.324] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:08.324] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:08.324] - Field: 'label' [13:11:08.325] - Field: 'local' [13:11:08.325] - Field: 'owner' [13:11:08.325] - Field: 'envir' [13:11:08.325] - Field: 'packages' [13:11:08.325] - Field: 'gc' [13:11:08.325] - Field: 'conditions' [13:11:08.326] - Field: 'expr' [13:11:08.326] - Field: 'uuid' [13:11:08.326] - Field: 'seed' [13:11:08.326] - Field: 'version' [13:11:08.326] - Field: 'result' [13:11:08.326] - Field: 'asynchronous' [13:11:08.327] - Field: 'calls' [13:11:08.327] - Field: 'globals' [13:11:08.327] - Field: 'stdout' [13:11:08.327] - Field: 'earlySignal' [13:11:08.327] - Field: 'lazy' [13:11:08.328] - Field: 'state' [13:11:08.328] - Field: '.cluster' [13:11:08.328] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:08.328] - Launch lazy future ... [13:11:08.328] Packages needed by the future expression (n = 0): [13:11:08.328] Packages needed by future strategies (n = 0): [13:11:08.329] { [13:11:08.329] { [13:11:08.329] { [13:11:08.329] ...future.startTime <- base::Sys.time() [13:11:08.329] { [13:11:08.329] { [13:11:08.329] { [13:11:08.329] base::local({ [13:11:08.329] has_future <- base::requireNamespace("future", [13:11:08.329] quietly = TRUE) [13:11:08.329] if (has_future) { [13:11:08.329] ns <- base::getNamespace("future") [13:11:08.329] version <- ns[[".package"]][["version"]] [13:11:08.329] if (is.null(version)) [13:11:08.329] version <- utils::packageVersion("future") [13:11:08.329] } [13:11:08.329] else { [13:11:08.329] version <- NULL [13:11:08.329] } [13:11:08.329] if (!has_future || version < "1.8.0") { [13:11:08.329] info <- base::c(r_version = base::gsub("R version ", [13:11:08.329] "", base::R.version$version.string), [13:11:08.329] platform = base::sprintf("%s (%s-bit)", [13:11:08.329] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:08.329] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:08.329] "release", "version")], collapse = " "), [13:11:08.329] hostname = base::Sys.info()[["nodename"]]) [13:11:08.329] info <- base::sprintf("%s: %s", base::names(info), [13:11:08.329] info) [13:11:08.329] info <- base::paste(info, collapse = "; ") [13:11:08.329] if (!has_future) { [13:11:08.329] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:08.329] info) [13:11:08.329] } [13:11:08.329] else { [13:11:08.329] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:08.329] info, version) [13:11:08.329] } [13:11:08.329] base::stop(msg) [13:11:08.329] } [13:11:08.329] }) [13:11:08.329] } [13:11:08.329] ...future.strategy.old <- future::plan("list") [13:11:08.329] options(future.plan = NULL) [13:11:08.329] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.329] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:08.329] } [13:11:08.329] ...future.workdir <- getwd() [13:11:08.329] } [13:11:08.329] ...future.oldOptions <- base::as.list(base::.Options) [13:11:08.329] ...future.oldEnvVars <- base::Sys.getenv() [13:11:08.329] } [13:11:08.329] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:08.329] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:08.329] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:08.329] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:08.329] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:08.329] future.stdout.windows.reencode = NULL, width = 80L) [13:11:08.329] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:08.329] base::names(...future.oldOptions)) [13:11:08.329] } [13:11:08.329] if (FALSE) { [13:11:08.329] } [13:11:08.329] else { [13:11:08.329] if (TRUE) { [13:11:08.329] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:08.329] open = "w") [13:11:08.329] } [13:11:08.329] else { [13:11:08.329] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:08.329] windows = "NUL", "/dev/null"), open = "w") [13:11:08.329] } [13:11:08.329] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:08.329] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:08.329] base::sink(type = "output", split = FALSE) [13:11:08.329] base::close(...future.stdout) [13:11:08.329] }, add = TRUE) [13:11:08.329] } [13:11:08.329] ...future.frame <- base::sys.nframe() [13:11:08.329] ...future.conditions <- base::list() [13:11:08.329] ...future.rng <- base::globalenv()$.Random.seed [13:11:08.329] if (FALSE) { [13:11:08.329] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:08.329] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:08.329] } [13:11:08.329] ...future.result <- base::tryCatch({ [13:11:08.329] base::withCallingHandlers({ [13:11:08.329] ...future.value <- base::withVisible(base::local({ [13:11:08.329] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:11:08.329] })) [13:11:08.329] future::FutureResult(value = ...future.value$value, [13:11:08.329] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.329] ...future.rng), globalenv = if (FALSE) [13:11:08.329] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:08.329] ...future.globalenv.names)) [13:11:08.329] else NULL, started = ...future.startTime, version = "1.8") [13:11:08.329] }, condition = base::local({ [13:11:08.329] c <- base::c [13:11:08.329] inherits <- base::inherits [13:11:08.329] invokeRestart <- base::invokeRestart [13:11:08.329] length <- base::length [13:11:08.329] list <- base::list [13:11:08.329] seq.int <- base::seq.int [13:11:08.329] signalCondition <- base::signalCondition [13:11:08.329] sys.calls <- base::sys.calls [13:11:08.329] `[[` <- base::`[[` [13:11:08.329] `+` <- base::`+` [13:11:08.329] `<<-` <- base::`<<-` [13:11:08.329] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:08.329] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:08.329] 3L)] [13:11:08.329] } [13:11:08.329] function(cond) { [13:11:08.329] is_error <- inherits(cond, "error") [13:11:08.329] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:08.329] NULL) [13:11:08.329] if (is_error) { [13:11:08.329] sessionInformation <- function() { [13:11:08.329] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:08.329] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:08.329] search = base::search(), system = base::Sys.info()) [13:11:08.329] } [13:11:08.329] ...future.conditions[[length(...future.conditions) + [13:11:08.329] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:08.329] cond$call), session = sessionInformation(), [13:11:08.329] timestamp = base::Sys.time(), signaled = 0L) [13:11:08.329] signalCondition(cond) [13:11:08.329] } [13:11:08.329] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:08.329] signal <- FALSE && inherits(cond, character(0)) [13:11:08.329] ...future.conditions[[length(...future.conditions) + [13:11:08.329] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:08.329] if (FALSE && !signal) { [13:11:08.329] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.329] { [13:11:08.329] inherits <- base::inherits [13:11:08.329] invokeRestart <- base::invokeRestart [13:11:08.329] is.null <- base::is.null [13:11:08.329] muffled <- FALSE [13:11:08.329] if (inherits(cond, "message")) { [13:11:08.329] muffled <- grepl(pattern, "muffleMessage") [13:11:08.329] if (muffled) [13:11:08.329] invokeRestart("muffleMessage") [13:11:08.329] } [13:11:08.329] else if (inherits(cond, "warning")) { [13:11:08.329] muffled <- grepl(pattern, "muffleWarning") [13:11:08.329] if (muffled) [13:11:08.329] invokeRestart("muffleWarning") [13:11:08.329] } [13:11:08.329] else if (inherits(cond, "condition")) { [13:11:08.329] if (!is.null(pattern)) { [13:11:08.329] computeRestarts <- base::computeRestarts [13:11:08.329] grepl <- base::grepl [13:11:08.329] restarts <- computeRestarts(cond) [13:11:08.329] for (restart in restarts) { [13:11:08.329] name <- restart$name [13:11:08.329] if (is.null(name)) [13:11:08.329] next [13:11:08.329] if (!grepl(pattern, name)) [13:11:08.329] next [13:11:08.329] invokeRestart(restart) [13:11:08.329] muffled <- TRUE [13:11:08.329] break [13:11:08.329] } [13:11:08.329] } [13:11:08.329] } [13:11:08.329] invisible(muffled) [13:11:08.329] } [13:11:08.329] muffleCondition(cond, pattern = "^muffle") [13:11:08.329] } [13:11:08.329] } [13:11:08.329] else { [13:11:08.329] if (TRUE) { [13:11:08.329] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.329] { [13:11:08.329] inherits <- base::inherits [13:11:08.329] invokeRestart <- base::invokeRestart [13:11:08.329] is.null <- base::is.null [13:11:08.329] muffled <- FALSE [13:11:08.329] if (inherits(cond, "message")) { [13:11:08.329] muffled <- grepl(pattern, "muffleMessage") [13:11:08.329] if (muffled) [13:11:08.329] invokeRestart("muffleMessage") [13:11:08.329] } [13:11:08.329] else if (inherits(cond, "warning")) { [13:11:08.329] muffled <- grepl(pattern, "muffleWarning") [13:11:08.329] if (muffled) [13:11:08.329] invokeRestart("muffleWarning") [13:11:08.329] } [13:11:08.329] else if (inherits(cond, "condition")) { [13:11:08.329] if (!is.null(pattern)) { [13:11:08.329] computeRestarts <- base::computeRestarts [13:11:08.329] grepl <- base::grepl [13:11:08.329] restarts <- computeRestarts(cond) [13:11:08.329] for (restart in restarts) { [13:11:08.329] name <- restart$name [13:11:08.329] if (is.null(name)) [13:11:08.329] next [13:11:08.329] if (!grepl(pattern, name)) [13:11:08.329] next [13:11:08.329] invokeRestart(restart) [13:11:08.329] muffled <- TRUE [13:11:08.329] break [13:11:08.329] } [13:11:08.329] } [13:11:08.329] } [13:11:08.329] invisible(muffled) [13:11:08.329] } [13:11:08.329] muffleCondition(cond, pattern = "^muffle") [13:11:08.329] } [13:11:08.329] } [13:11:08.329] } [13:11:08.329] })) [13:11:08.329] }, error = function(ex) { [13:11:08.329] base::structure(base::list(value = NULL, visible = NULL, [13:11:08.329] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.329] ...future.rng), started = ...future.startTime, [13:11:08.329] finished = Sys.time(), session_uuid = NA_character_, [13:11:08.329] version = "1.8"), class = "FutureResult") [13:11:08.329] }, finally = { [13:11:08.329] if (!identical(...future.workdir, getwd())) [13:11:08.329] setwd(...future.workdir) [13:11:08.329] { [13:11:08.329] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:08.329] ...future.oldOptions$nwarnings <- NULL [13:11:08.329] } [13:11:08.329] base::options(...future.oldOptions) [13:11:08.329] if (.Platform$OS.type == "windows") { [13:11:08.329] old_names <- names(...future.oldEnvVars) [13:11:08.329] envs <- base::Sys.getenv() [13:11:08.329] names <- names(envs) [13:11:08.329] common <- intersect(names, old_names) [13:11:08.329] added <- setdiff(names, old_names) [13:11:08.329] removed <- setdiff(old_names, names) [13:11:08.329] changed <- common[...future.oldEnvVars[common] != [13:11:08.329] envs[common]] [13:11:08.329] NAMES <- toupper(changed) [13:11:08.329] args <- list() [13:11:08.329] for (kk in seq_along(NAMES)) { [13:11:08.329] name <- changed[[kk]] [13:11:08.329] NAME <- NAMES[[kk]] [13:11:08.329] if (name != NAME && is.element(NAME, old_names)) [13:11:08.329] next [13:11:08.329] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.329] } [13:11:08.329] NAMES <- toupper(added) [13:11:08.329] for (kk in seq_along(NAMES)) { [13:11:08.329] name <- added[[kk]] [13:11:08.329] NAME <- NAMES[[kk]] [13:11:08.329] if (name != NAME && is.element(NAME, old_names)) [13:11:08.329] next [13:11:08.329] args[[name]] <- "" [13:11:08.329] } [13:11:08.329] NAMES <- toupper(removed) [13:11:08.329] for (kk in seq_along(NAMES)) { [13:11:08.329] name <- removed[[kk]] [13:11:08.329] NAME <- NAMES[[kk]] [13:11:08.329] if (name != NAME && is.element(NAME, old_names)) [13:11:08.329] next [13:11:08.329] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.329] } [13:11:08.329] if (length(args) > 0) [13:11:08.329] base::do.call(base::Sys.setenv, args = args) [13:11:08.329] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:08.329] } [13:11:08.329] else { [13:11:08.329] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:08.329] } [13:11:08.329] { [13:11:08.329] if (base::length(...future.futureOptionsAdded) > [13:11:08.329] 0L) { [13:11:08.329] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:08.329] base::names(opts) <- ...future.futureOptionsAdded [13:11:08.329] base::options(opts) [13:11:08.329] } [13:11:08.329] { [13:11:08.329] NULL [13:11:08.329] options(future.plan = NULL) [13:11:08.329] if (is.na(NA_character_)) [13:11:08.329] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.329] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:08.329] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:08.329] .init = FALSE) [13:11:08.329] } [13:11:08.329] } [13:11:08.329] } [13:11:08.329] }) [13:11:08.329] if (TRUE) { [13:11:08.329] base::sink(type = "output", split = FALSE) [13:11:08.329] if (TRUE) { [13:11:08.329] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:08.329] } [13:11:08.329] else { [13:11:08.329] ...future.result["stdout"] <- base::list(NULL) [13:11:08.329] } [13:11:08.329] base::close(...future.stdout) [13:11:08.329] ...future.stdout <- NULL [13:11:08.329] } [13:11:08.329] ...future.result$conditions <- ...future.conditions [13:11:08.329] ...future.result$finished <- base::Sys.time() [13:11:08.329] ...future.result [13:11:08.329] } [13:11:08.333] - Launch lazy future ... done [13:11:08.333] run() for 'MiraiFuture' ... done [13:11:08.334] getGlobalsAndPackages() ... [13:11:08.335] Searching for globals... [13:11:08.337] - globals found: [6] 'FUN', '[[', 'x', 'ii', '...', '.Internal' [13:11:08.337] Searching for globals ... DONE [13:11:08.337] Resolving globals: FALSE [13:11:08.337] Tweak future expression to call with '...' arguments ... [13:11:08.338] { [13:11:08.338] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:11:08.338] } [13:11:08.338] Tweak future expression to call with '...' arguments ... DONE [13:11:08.339] The total size of the 4 globals is 2.69 KiB (2752 bytes) [13:11:08.339] 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:11:08.339] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:11:08.340] [13:11:08.340] getGlobalsAndPackages() ... DONE [13:11:08.340] run() for 'Future' ... [13:11:08.340] - state: 'created' [13:11:08.340] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:08.343] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:08.343] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:08.343] - Field: 'label' [13:11:08.343] - Field: 'local' [13:11:08.343] - Field: 'owner' [13:11:08.343] - Field: 'envir' [13:11:08.344] - Field: 'packages' [13:11:08.344] - Field: 'gc' [13:11:08.344] - Field: 'conditions' [13:11:08.344] - Field: 'expr' [13:11:08.344] - Field: 'uuid' [13:11:08.345] - Field: 'seed' [13:11:08.345] - Field: 'version' [13:11:08.345] - Field: 'result' [13:11:08.345] - Field: 'asynchronous' [13:11:08.345] - Field: 'calls' [13:11:08.345] - Field: 'globals' [13:11:08.346] - Field: 'stdout' [13:11:08.346] - Field: 'earlySignal' [13:11:08.346] - Field: 'lazy' [13:11:08.346] - Field: 'state' [13:11:08.346] - Field: '.cluster' [13:11:08.346] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:08.347] - Launch lazy future ... [13:11:08.347] Packages needed by the future expression (n = 0): [13:11:08.347] Packages needed by future strategies (n = 0): [13:11:08.347] { [13:11:08.347] { [13:11:08.347] { [13:11:08.347] ...future.startTime <- base::Sys.time() [13:11:08.347] { [13:11:08.347] { [13:11:08.347] { [13:11:08.347] base::local({ [13:11:08.347] has_future <- base::requireNamespace("future", [13:11:08.347] quietly = TRUE) [13:11:08.347] if (has_future) { [13:11:08.347] ns <- base::getNamespace("future") [13:11:08.347] version <- ns[[".package"]][["version"]] [13:11:08.347] if (is.null(version)) [13:11:08.347] version <- utils::packageVersion("future") [13:11:08.347] } [13:11:08.347] else { [13:11:08.347] version <- NULL [13:11:08.347] } [13:11:08.347] if (!has_future || version < "1.8.0") { [13:11:08.347] info <- base::c(r_version = base::gsub("R version ", [13:11:08.347] "", base::R.version$version.string), [13:11:08.347] platform = base::sprintf("%s (%s-bit)", [13:11:08.347] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:08.347] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:08.347] "release", "version")], collapse = " "), [13:11:08.347] hostname = base::Sys.info()[["nodename"]]) [13:11:08.347] info <- base::sprintf("%s: %s", base::names(info), [13:11:08.347] info) [13:11:08.347] info <- base::paste(info, collapse = "; ") [13:11:08.347] if (!has_future) { [13:11:08.347] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:08.347] info) [13:11:08.347] } [13:11:08.347] else { [13:11:08.347] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:08.347] info, version) [13:11:08.347] } [13:11:08.347] base::stop(msg) [13:11:08.347] } [13:11:08.347] }) [13:11:08.347] } [13:11:08.347] ...future.strategy.old <- future::plan("list") [13:11:08.347] options(future.plan = NULL) [13:11:08.347] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.347] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:08.347] } [13:11:08.347] ...future.workdir <- getwd() [13:11:08.347] } [13:11:08.347] ...future.oldOptions <- base::as.list(base::.Options) [13:11:08.347] ...future.oldEnvVars <- base::Sys.getenv() [13:11:08.347] } [13:11:08.347] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:08.347] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:08.347] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:08.347] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:08.347] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:08.347] future.stdout.windows.reencode = NULL, width = 80L) [13:11:08.347] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:08.347] base::names(...future.oldOptions)) [13:11:08.347] } [13:11:08.347] if (FALSE) { [13:11:08.347] } [13:11:08.347] else { [13:11:08.347] if (TRUE) { [13:11:08.347] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:08.347] open = "w") [13:11:08.347] } [13:11:08.347] else { [13:11:08.347] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:08.347] windows = "NUL", "/dev/null"), open = "w") [13:11:08.347] } [13:11:08.347] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:08.347] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:08.347] base::sink(type = "output", split = FALSE) [13:11:08.347] base::close(...future.stdout) [13:11:08.347] }, add = TRUE) [13:11:08.347] } [13:11:08.347] ...future.frame <- base::sys.nframe() [13:11:08.347] ...future.conditions <- base::list() [13:11:08.347] ...future.rng <- base::globalenv()$.Random.seed [13:11:08.347] if (FALSE) { [13:11:08.347] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:08.347] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:08.347] } [13:11:08.347] ...future.result <- base::tryCatch({ [13:11:08.347] base::withCallingHandlers({ [13:11:08.347] ...future.value <- base::withVisible(base::local({ [13:11:08.347] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:11:08.347] })) [13:11:08.347] future::FutureResult(value = ...future.value$value, [13:11:08.347] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.347] ...future.rng), globalenv = if (FALSE) [13:11:08.347] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:08.347] ...future.globalenv.names)) [13:11:08.347] else NULL, started = ...future.startTime, version = "1.8") [13:11:08.347] }, condition = base::local({ [13:11:08.347] c <- base::c [13:11:08.347] inherits <- base::inherits [13:11:08.347] invokeRestart <- base::invokeRestart [13:11:08.347] length <- base::length [13:11:08.347] list <- base::list [13:11:08.347] seq.int <- base::seq.int [13:11:08.347] signalCondition <- base::signalCondition [13:11:08.347] sys.calls <- base::sys.calls [13:11:08.347] `[[` <- base::`[[` [13:11:08.347] `+` <- base::`+` [13:11:08.347] `<<-` <- base::`<<-` [13:11:08.347] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:08.347] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:08.347] 3L)] [13:11:08.347] } [13:11:08.347] function(cond) { [13:11:08.347] is_error <- inherits(cond, "error") [13:11:08.347] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:08.347] NULL) [13:11:08.347] if (is_error) { [13:11:08.347] sessionInformation <- function() { [13:11:08.347] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:08.347] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:08.347] search = base::search(), system = base::Sys.info()) [13:11:08.347] } [13:11:08.347] ...future.conditions[[length(...future.conditions) + [13:11:08.347] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:08.347] cond$call), session = sessionInformation(), [13:11:08.347] timestamp = base::Sys.time(), signaled = 0L) [13:11:08.347] signalCondition(cond) [13:11:08.347] } [13:11:08.347] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:08.347] signal <- FALSE && inherits(cond, character(0)) [13:11:08.347] ...future.conditions[[length(...future.conditions) + [13:11:08.347] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:08.347] if (FALSE && !signal) { [13:11:08.347] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.347] { [13:11:08.347] inherits <- base::inherits [13:11:08.347] invokeRestart <- base::invokeRestart [13:11:08.347] is.null <- base::is.null [13:11:08.347] muffled <- FALSE [13:11:08.347] if (inherits(cond, "message")) { [13:11:08.347] muffled <- grepl(pattern, "muffleMessage") [13:11:08.347] if (muffled) [13:11:08.347] invokeRestart("muffleMessage") [13:11:08.347] } [13:11:08.347] else if (inherits(cond, "warning")) { [13:11:08.347] muffled <- grepl(pattern, "muffleWarning") [13:11:08.347] if (muffled) [13:11:08.347] invokeRestart("muffleWarning") [13:11:08.347] } [13:11:08.347] else if (inherits(cond, "condition")) { [13:11:08.347] if (!is.null(pattern)) { [13:11:08.347] computeRestarts <- base::computeRestarts [13:11:08.347] grepl <- base::grepl [13:11:08.347] restarts <- computeRestarts(cond) [13:11:08.347] for (restart in restarts) { [13:11:08.347] name <- restart$name [13:11:08.347] if (is.null(name)) [13:11:08.347] next [13:11:08.347] if (!grepl(pattern, name)) [13:11:08.347] next [13:11:08.347] invokeRestart(restart) [13:11:08.347] muffled <- TRUE [13:11:08.347] break [13:11:08.347] } [13:11:08.347] } [13:11:08.347] } [13:11:08.347] invisible(muffled) [13:11:08.347] } [13:11:08.347] muffleCondition(cond, pattern = "^muffle") [13:11:08.347] } [13:11:08.347] } [13:11:08.347] else { [13:11:08.347] if (TRUE) { [13:11:08.347] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.347] { [13:11:08.347] inherits <- base::inherits [13:11:08.347] invokeRestart <- base::invokeRestart [13:11:08.347] is.null <- base::is.null [13:11:08.347] muffled <- FALSE [13:11:08.347] if (inherits(cond, "message")) { [13:11:08.347] muffled <- grepl(pattern, "muffleMessage") [13:11:08.347] if (muffled) [13:11:08.347] invokeRestart("muffleMessage") [13:11:08.347] } [13:11:08.347] else if (inherits(cond, "warning")) { [13:11:08.347] muffled <- grepl(pattern, "muffleWarning") [13:11:08.347] if (muffled) [13:11:08.347] invokeRestart("muffleWarning") [13:11:08.347] } [13:11:08.347] else if (inherits(cond, "condition")) { [13:11:08.347] if (!is.null(pattern)) { [13:11:08.347] computeRestarts <- base::computeRestarts [13:11:08.347] grepl <- base::grepl [13:11:08.347] restarts <- computeRestarts(cond) [13:11:08.347] for (restart in restarts) { [13:11:08.347] name <- restart$name [13:11:08.347] if (is.null(name)) [13:11:08.347] next [13:11:08.347] if (!grepl(pattern, name)) [13:11:08.347] next [13:11:08.347] invokeRestart(restart) [13:11:08.347] muffled <- TRUE [13:11:08.347] break [13:11:08.347] } [13:11:08.347] } [13:11:08.347] } [13:11:08.347] invisible(muffled) [13:11:08.347] } [13:11:08.347] muffleCondition(cond, pattern = "^muffle") [13:11:08.347] } [13:11:08.347] } [13:11:08.347] } [13:11:08.347] })) [13:11:08.347] }, error = function(ex) { [13:11:08.347] base::structure(base::list(value = NULL, visible = NULL, [13:11:08.347] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.347] ...future.rng), started = ...future.startTime, [13:11:08.347] finished = Sys.time(), session_uuid = NA_character_, [13:11:08.347] version = "1.8"), class = "FutureResult") [13:11:08.347] }, finally = { [13:11:08.347] if (!identical(...future.workdir, getwd())) [13:11:08.347] setwd(...future.workdir) [13:11:08.347] { [13:11:08.347] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:08.347] ...future.oldOptions$nwarnings <- NULL [13:11:08.347] } [13:11:08.347] base::options(...future.oldOptions) [13:11:08.347] if (.Platform$OS.type == "windows") { [13:11:08.347] old_names <- names(...future.oldEnvVars) [13:11:08.347] envs <- base::Sys.getenv() [13:11:08.347] names <- names(envs) [13:11:08.347] common <- intersect(names, old_names) [13:11:08.347] added <- setdiff(names, old_names) [13:11:08.347] removed <- setdiff(old_names, names) [13:11:08.347] changed <- common[...future.oldEnvVars[common] != [13:11:08.347] envs[common]] [13:11:08.347] NAMES <- toupper(changed) [13:11:08.347] args <- list() [13:11:08.347] for (kk in seq_along(NAMES)) { [13:11:08.347] name <- changed[[kk]] [13:11:08.347] NAME <- NAMES[[kk]] [13:11:08.347] if (name != NAME && is.element(NAME, old_names)) [13:11:08.347] next [13:11:08.347] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.347] } [13:11:08.347] NAMES <- toupper(added) [13:11:08.347] for (kk in seq_along(NAMES)) { [13:11:08.347] name <- added[[kk]] [13:11:08.347] NAME <- NAMES[[kk]] [13:11:08.347] if (name != NAME && is.element(NAME, old_names)) [13:11:08.347] next [13:11:08.347] args[[name]] <- "" [13:11:08.347] } [13:11:08.347] NAMES <- toupper(removed) [13:11:08.347] for (kk in seq_along(NAMES)) { [13:11:08.347] name <- removed[[kk]] [13:11:08.347] NAME <- NAMES[[kk]] [13:11:08.347] if (name != NAME && is.element(NAME, old_names)) [13:11:08.347] next [13:11:08.347] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.347] } [13:11:08.347] if (length(args) > 0) [13:11:08.347] base::do.call(base::Sys.setenv, args = args) [13:11:08.347] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:08.347] } [13:11:08.347] else { [13:11:08.347] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:08.347] } [13:11:08.347] { [13:11:08.347] if (base::length(...future.futureOptionsAdded) > [13:11:08.347] 0L) { [13:11:08.347] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:08.347] base::names(opts) <- ...future.futureOptionsAdded [13:11:08.347] base::options(opts) [13:11:08.347] } [13:11:08.347] { [13:11:08.347] NULL [13:11:08.347] options(future.plan = NULL) [13:11:08.347] if (is.na(NA_character_)) [13:11:08.347] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.347] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:08.347] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:08.347] .init = FALSE) [13:11:08.347] } [13:11:08.347] } [13:11:08.347] } [13:11:08.347] }) [13:11:08.347] if (TRUE) { [13:11:08.347] base::sink(type = "output", split = FALSE) [13:11:08.347] if (TRUE) { [13:11:08.347] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:08.347] } [13:11:08.347] else { [13:11:08.347] ...future.result["stdout"] <- base::list(NULL) [13:11:08.347] } [13:11:08.347] base::close(...future.stdout) [13:11:08.347] ...future.stdout <- NULL [13:11:08.347] } [13:11:08.347] ...future.result$conditions <- ...future.conditions [13:11:08.347] ...future.result$finished <- base::Sys.time() [13:11:08.347] ...future.result [13:11:08.347] } [13:11:08.351] - Launch lazy future ... done [13:11:08.351] run() for 'MiraiFuture' ... done [13:11:08.352] getGlobalsAndPackages() ... [13:11:08.352] Searching for globals... [13:11:08.354] - globals found: [6] 'FUN', '[[', 'x', 'ii', '...', '.Internal' [13:11:08.355] Searching for globals ... DONE [13:11:08.355] Resolving globals: FALSE [13:11:08.355] Tweak future expression to call with '...' arguments ... [13:11:08.355] { [13:11:08.355] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:11:08.355] } [13:11:08.355] Tweak future expression to call with '...' arguments ... DONE [13:11:08.356] The total size of the 4 globals is 2.69 KiB (2752 bytes) [13:11:08.357] 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:11:08.357] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:11:08.357] [13:11:08.357] getGlobalsAndPackages() ... DONE [13:11:08.357] run() for 'Future' ... [13:11:08.358] - state: 'created' [13:11:08.358] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:08.360] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:08.360] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:08.360] - Field: 'label' [13:11:08.360] - Field: 'local' [13:11:08.361] - Field: 'owner' [13:11:08.361] - Field: 'envir' [13:11:08.361] - Field: 'packages' [13:11:08.361] - Field: 'gc' [13:11:08.361] - Field: 'conditions' [13:11:08.362] - Field: 'expr' [13:11:08.362] - Field: 'uuid' [13:11:08.362] - Field: 'seed' [13:11:08.362] - Field: 'version' [13:11:08.362] - Field: 'result' [13:11:08.362] - Field: 'asynchronous' [13:11:08.363] - Field: 'calls' [13:11:08.363] - Field: 'globals' [13:11:08.363] - Field: 'stdout' [13:11:08.363] - Field: 'earlySignal' [13:11:08.363] - Field: 'lazy' [13:11:08.363] - Field: 'state' [13:11:08.364] - Field: '.cluster' [13:11:08.364] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:08.364] - Launch lazy future ... [13:11:08.364] Packages needed by the future expression (n = 0): [13:11:08.364] Packages needed by future strategies (n = 0): [13:11:08.365] { [13:11:08.365] { [13:11:08.365] { [13:11:08.365] ...future.startTime <- base::Sys.time() [13:11:08.365] { [13:11:08.365] { [13:11:08.365] { [13:11:08.365] base::local({ [13:11:08.365] has_future <- base::requireNamespace("future", [13:11:08.365] quietly = TRUE) [13:11:08.365] if (has_future) { [13:11:08.365] ns <- base::getNamespace("future") [13:11:08.365] version <- ns[[".package"]][["version"]] [13:11:08.365] if (is.null(version)) [13:11:08.365] version <- utils::packageVersion("future") [13:11:08.365] } [13:11:08.365] else { [13:11:08.365] version <- NULL [13:11:08.365] } [13:11:08.365] if (!has_future || version < "1.8.0") { [13:11:08.365] info <- base::c(r_version = base::gsub("R version ", [13:11:08.365] "", base::R.version$version.string), [13:11:08.365] platform = base::sprintf("%s (%s-bit)", [13:11:08.365] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:08.365] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:08.365] "release", "version")], collapse = " "), [13:11:08.365] hostname = base::Sys.info()[["nodename"]]) [13:11:08.365] info <- base::sprintf("%s: %s", base::names(info), [13:11:08.365] info) [13:11:08.365] info <- base::paste(info, collapse = "; ") [13:11:08.365] if (!has_future) { [13:11:08.365] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:08.365] info) [13:11:08.365] } [13:11:08.365] else { [13:11:08.365] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:08.365] info, version) [13:11:08.365] } [13:11:08.365] base::stop(msg) [13:11:08.365] } [13:11:08.365] }) [13:11:08.365] } [13:11:08.365] ...future.strategy.old <- future::plan("list") [13:11:08.365] options(future.plan = NULL) [13:11:08.365] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.365] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:08.365] } [13:11:08.365] ...future.workdir <- getwd() [13:11:08.365] } [13:11:08.365] ...future.oldOptions <- base::as.list(base::.Options) [13:11:08.365] ...future.oldEnvVars <- base::Sys.getenv() [13:11:08.365] } [13:11:08.365] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:08.365] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:08.365] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:08.365] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:08.365] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:08.365] future.stdout.windows.reencode = NULL, width = 80L) [13:11:08.365] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:08.365] base::names(...future.oldOptions)) [13:11:08.365] } [13:11:08.365] if (FALSE) { [13:11:08.365] } [13:11:08.365] else { [13:11:08.365] if (TRUE) { [13:11:08.365] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:08.365] open = "w") [13:11:08.365] } [13:11:08.365] else { [13:11:08.365] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:08.365] windows = "NUL", "/dev/null"), open = "w") [13:11:08.365] } [13:11:08.365] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:08.365] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:08.365] base::sink(type = "output", split = FALSE) [13:11:08.365] base::close(...future.stdout) [13:11:08.365] }, add = TRUE) [13:11:08.365] } [13:11:08.365] ...future.frame <- base::sys.nframe() [13:11:08.365] ...future.conditions <- base::list() [13:11:08.365] ...future.rng <- base::globalenv()$.Random.seed [13:11:08.365] if (FALSE) { [13:11:08.365] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:08.365] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:08.365] } [13:11:08.365] ...future.result <- base::tryCatch({ [13:11:08.365] base::withCallingHandlers({ [13:11:08.365] ...future.value <- base::withVisible(base::local({ [13:11:08.365] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:11:08.365] })) [13:11:08.365] future::FutureResult(value = ...future.value$value, [13:11:08.365] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.365] ...future.rng), globalenv = if (FALSE) [13:11:08.365] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:08.365] ...future.globalenv.names)) [13:11:08.365] else NULL, started = ...future.startTime, version = "1.8") [13:11:08.365] }, condition = base::local({ [13:11:08.365] c <- base::c [13:11:08.365] inherits <- base::inherits [13:11:08.365] invokeRestart <- base::invokeRestart [13:11:08.365] length <- base::length [13:11:08.365] list <- base::list [13:11:08.365] seq.int <- base::seq.int [13:11:08.365] signalCondition <- base::signalCondition [13:11:08.365] sys.calls <- base::sys.calls [13:11:08.365] `[[` <- base::`[[` [13:11:08.365] `+` <- base::`+` [13:11:08.365] `<<-` <- base::`<<-` [13:11:08.365] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:08.365] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:08.365] 3L)] [13:11:08.365] } [13:11:08.365] function(cond) { [13:11:08.365] is_error <- inherits(cond, "error") [13:11:08.365] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:08.365] NULL) [13:11:08.365] if (is_error) { [13:11:08.365] sessionInformation <- function() { [13:11:08.365] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:08.365] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:08.365] search = base::search(), system = base::Sys.info()) [13:11:08.365] } [13:11:08.365] ...future.conditions[[length(...future.conditions) + [13:11:08.365] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:08.365] cond$call), session = sessionInformation(), [13:11:08.365] timestamp = base::Sys.time(), signaled = 0L) [13:11:08.365] signalCondition(cond) [13:11:08.365] } [13:11:08.365] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:08.365] signal <- FALSE && inherits(cond, character(0)) [13:11:08.365] ...future.conditions[[length(...future.conditions) + [13:11:08.365] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:08.365] if (FALSE && !signal) { [13:11:08.365] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.365] { [13:11:08.365] inherits <- base::inherits [13:11:08.365] invokeRestart <- base::invokeRestart [13:11:08.365] is.null <- base::is.null [13:11:08.365] muffled <- FALSE [13:11:08.365] if (inherits(cond, "message")) { [13:11:08.365] muffled <- grepl(pattern, "muffleMessage") [13:11:08.365] if (muffled) [13:11:08.365] invokeRestart("muffleMessage") [13:11:08.365] } [13:11:08.365] else if (inherits(cond, "warning")) { [13:11:08.365] muffled <- grepl(pattern, "muffleWarning") [13:11:08.365] if (muffled) [13:11:08.365] invokeRestart("muffleWarning") [13:11:08.365] } [13:11:08.365] else if (inherits(cond, "condition")) { [13:11:08.365] if (!is.null(pattern)) { [13:11:08.365] computeRestarts <- base::computeRestarts [13:11:08.365] grepl <- base::grepl [13:11:08.365] restarts <- computeRestarts(cond) [13:11:08.365] for (restart in restarts) { [13:11:08.365] name <- restart$name [13:11:08.365] if (is.null(name)) [13:11:08.365] next [13:11:08.365] if (!grepl(pattern, name)) [13:11:08.365] next [13:11:08.365] invokeRestart(restart) [13:11:08.365] muffled <- TRUE [13:11:08.365] break [13:11:08.365] } [13:11:08.365] } [13:11:08.365] } [13:11:08.365] invisible(muffled) [13:11:08.365] } [13:11:08.365] muffleCondition(cond, pattern = "^muffle") [13:11:08.365] } [13:11:08.365] } [13:11:08.365] else { [13:11:08.365] if (TRUE) { [13:11:08.365] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.365] { [13:11:08.365] inherits <- base::inherits [13:11:08.365] invokeRestart <- base::invokeRestart [13:11:08.365] is.null <- base::is.null [13:11:08.365] muffled <- FALSE [13:11:08.365] if (inherits(cond, "message")) { [13:11:08.365] muffled <- grepl(pattern, "muffleMessage") [13:11:08.365] if (muffled) [13:11:08.365] invokeRestart("muffleMessage") [13:11:08.365] } [13:11:08.365] else if (inherits(cond, "warning")) { [13:11:08.365] muffled <- grepl(pattern, "muffleWarning") [13:11:08.365] if (muffled) [13:11:08.365] invokeRestart("muffleWarning") [13:11:08.365] } [13:11:08.365] else if (inherits(cond, "condition")) { [13:11:08.365] if (!is.null(pattern)) { [13:11:08.365] computeRestarts <- base::computeRestarts [13:11:08.365] grepl <- base::grepl [13:11:08.365] restarts <- computeRestarts(cond) [13:11:08.365] for (restart in restarts) { [13:11:08.365] name <- restart$name [13:11:08.365] if (is.null(name)) [13:11:08.365] next [13:11:08.365] if (!grepl(pattern, name)) [13:11:08.365] next [13:11:08.365] invokeRestart(restart) [13:11:08.365] muffled <- TRUE [13:11:08.365] break [13:11:08.365] } [13:11:08.365] } [13:11:08.365] } [13:11:08.365] invisible(muffled) [13:11:08.365] } [13:11:08.365] muffleCondition(cond, pattern = "^muffle") [13:11:08.365] } [13:11:08.365] } [13:11:08.365] } [13:11:08.365] })) [13:11:08.365] }, error = function(ex) { [13:11:08.365] base::structure(base::list(value = NULL, visible = NULL, [13:11:08.365] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.365] ...future.rng), started = ...future.startTime, [13:11:08.365] finished = Sys.time(), session_uuid = NA_character_, [13:11:08.365] version = "1.8"), class = "FutureResult") [13:11:08.365] }, finally = { [13:11:08.365] if (!identical(...future.workdir, getwd())) [13:11:08.365] setwd(...future.workdir) [13:11:08.365] { [13:11:08.365] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:08.365] ...future.oldOptions$nwarnings <- NULL [13:11:08.365] } [13:11:08.365] base::options(...future.oldOptions) [13:11:08.365] if (.Platform$OS.type == "windows") { [13:11:08.365] old_names <- names(...future.oldEnvVars) [13:11:08.365] envs <- base::Sys.getenv() [13:11:08.365] names <- names(envs) [13:11:08.365] common <- intersect(names, old_names) [13:11:08.365] added <- setdiff(names, old_names) [13:11:08.365] removed <- setdiff(old_names, names) [13:11:08.365] changed <- common[...future.oldEnvVars[common] != [13:11:08.365] envs[common]] [13:11:08.365] NAMES <- toupper(changed) [13:11:08.365] args <- list() [13:11:08.365] for (kk in seq_along(NAMES)) { [13:11:08.365] name <- changed[[kk]] [13:11:08.365] NAME <- NAMES[[kk]] [13:11:08.365] if (name != NAME && is.element(NAME, old_names)) [13:11:08.365] next [13:11:08.365] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.365] } [13:11:08.365] NAMES <- toupper(added) [13:11:08.365] for (kk in seq_along(NAMES)) { [13:11:08.365] name <- added[[kk]] [13:11:08.365] NAME <- NAMES[[kk]] [13:11:08.365] if (name != NAME && is.element(NAME, old_names)) [13:11:08.365] next [13:11:08.365] args[[name]] <- "" [13:11:08.365] } [13:11:08.365] NAMES <- toupper(removed) [13:11:08.365] for (kk in seq_along(NAMES)) { [13:11:08.365] name <- removed[[kk]] [13:11:08.365] NAME <- NAMES[[kk]] [13:11:08.365] if (name != NAME && is.element(NAME, old_names)) [13:11:08.365] next [13:11:08.365] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.365] } [13:11:08.365] if (length(args) > 0) [13:11:08.365] base::do.call(base::Sys.setenv, args = args) [13:11:08.365] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:08.365] } [13:11:08.365] else { [13:11:08.365] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:08.365] } [13:11:08.365] { [13:11:08.365] if (base::length(...future.futureOptionsAdded) > [13:11:08.365] 0L) { [13:11:08.365] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:08.365] base::names(opts) <- ...future.futureOptionsAdded [13:11:08.365] base::options(opts) [13:11:08.365] } [13:11:08.365] { [13:11:08.365] NULL [13:11:08.365] options(future.plan = NULL) [13:11:08.365] if (is.na(NA_character_)) [13:11:08.365] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.365] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:08.365] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:08.365] .init = FALSE) [13:11:08.365] } [13:11:08.365] } [13:11:08.365] } [13:11:08.365] }) [13:11:08.365] if (TRUE) { [13:11:08.365] base::sink(type = "output", split = FALSE) [13:11:08.365] if (TRUE) { [13:11:08.365] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:08.365] } [13:11:08.365] else { [13:11:08.365] ...future.result["stdout"] <- base::list(NULL) [13:11:08.365] } [13:11:08.365] base::close(...future.stdout) [13:11:08.365] ...future.stdout <- NULL [13:11:08.365] } [13:11:08.365] ...future.result$conditions <- ...future.conditions [13:11:08.365] ...future.result$finished <- base::Sys.time() [13:11:08.365] ...future.result [13:11:08.365] } [13:11:08.369] - Launch lazy future ... done [13:11:08.369] 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:11:08.376] getGlobalsAndPackages() ... [13:11:08.377] Searching for globals... [13:11:08.387] - globals found: [26] 'FUN', '[[', 'x', 'ii', '...', 'if', 'missing', 'is.finite', '{', 'is.null', '<-', 'paste', 'length', '==', 'return', '>', '+', '[', 'seq_len', 'rev', 'c', '&&', '!', ':', '(', '-' [13:11:08.387] Searching for globals ... DONE [13:11:08.387] Resolving globals: FALSE [13:11:08.388] Tweak future expression to call with '...' arguments ... [13:11:08.388] { [13:11:08.388] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:11:08.388] } [13:11:08.388] Tweak future expression to call with '...' arguments ... DONE [13:11:08.389] The total size of the 4 globals is 82.66 KiB (84648 bytes) [13:11:08.390] 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:11:08.390] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:11:08.390] - packages: [1] 'future' [13:11:08.391] getGlobalsAndPackages() ... DONE [13:11:08.391] run() for 'Future' ... [13:11:08.391] - state: 'created' [13:11:08.391] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:08.394] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:08.395] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:08.395] - Field: 'label' [13:11:08.395] - Field: 'local' [13:11:08.395] - Field: 'owner' [13:11:08.395] - Field: 'envir' [13:11:08.395] - Field: 'packages' [13:11:08.396] - Field: 'gc' [13:11:08.396] - Field: 'conditions' [13:11:08.396] - Field: 'expr' [13:11:08.396] - Field: 'uuid' [13:11:08.396] - Field: 'seed' [13:11:08.396] - Field: 'version' [13:11:08.397] - Field: 'result' [13:11:08.397] - Field: 'asynchronous' [13:11:08.397] - Field: 'calls' [13:11:08.397] - Field: 'globals' [13:11:08.397] - Field: 'stdout' [13:11:08.397] - Field: 'earlySignal' [13:11:08.398] - Field: 'lazy' [13:11:08.398] - Field: 'state' [13:11:08.398] - Field: '.cluster' [13:11:08.398] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:08.398] - Launch lazy future ... [13:11:08.398] Packages needed by the future expression (n = 1): 'future' [13:11:08.399] Packages needed by future strategies (n = 0): [13:11:08.399] { [13:11:08.399] { [13:11:08.399] { [13:11:08.399] ...future.startTime <- base::Sys.time() [13:11:08.399] { [13:11:08.399] { [13:11:08.399] { [13:11:08.399] { [13:11:08.399] base::local({ [13:11:08.399] has_future <- base::requireNamespace("future", [13:11:08.399] quietly = TRUE) [13:11:08.399] if (has_future) { [13:11:08.399] ns <- base::getNamespace("future") [13:11:08.399] version <- ns[[".package"]][["version"]] [13:11:08.399] if (is.null(version)) [13:11:08.399] version <- utils::packageVersion("future") [13:11:08.399] } [13:11:08.399] else { [13:11:08.399] version <- NULL [13:11:08.399] } [13:11:08.399] if (!has_future || version < "1.8.0") { [13:11:08.399] info <- base::c(r_version = base::gsub("R version ", [13:11:08.399] "", base::R.version$version.string), [13:11:08.399] platform = base::sprintf("%s (%s-bit)", [13:11:08.399] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:08.399] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:08.399] "release", "version")], collapse = " "), [13:11:08.399] hostname = base::Sys.info()[["nodename"]]) [13:11:08.399] info <- base::sprintf("%s: %s", base::names(info), [13:11:08.399] info) [13:11:08.399] info <- base::paste(info, collapse = "; ") [13:11:08.399] if (!has_future) { [13:11:08.399] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:08.399] info) [13:11:08.399] } [13:11:08.399] else { [13:11:08.399] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:08.399] info, version) [13:11:08.399] } [13:11:08.399] base::stop(msg) [13:11:08.399] } [13:11:08.399] }) [13:11:08.399] } [13:11:08.399] base::local({ [13:11:08.399] for (pkg in "future") { [13:11:08.399] base::loadNamespace(pkg) [13:11:08.399] base::library(pkg, character.only = TRUE) [13:11:08.399] } [13:11:08.399] }) [13:11:08.399] } [13:11:08.399] ...future.strategy.old <- future::plan("list") [13:11:08.399] options(future.plan = NULL) [13:11:08.399] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.399] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:08.399] } [13:11:08.399] ...future.workdir <- getwd() [13:11:08.399] } [13:11:08.399] ...future.oldOptions <- base::as.list(base::.Options) [13:11:08.399] ...future.oldEnvVars <- base::Sys.getenv() [13:11:08.399] } [13:11:08.399] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:08.399] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:08.399] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:08.399] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:08.399] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:08.399] future.stdout.windows.reencode = NULL, width = 80L) [13:11:08.399] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:08.399] base::names(...future.oldOptions)) [13:11:08.399] } [13:11:08.399] if (FALSE) { [13:11:08.399] } [13:11:08.399] else { [13:11:08.399] if (TRUE) { [13:11:08.399] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:08.399] open = "w") [13:11:08.399] } [13:11:08.399] else { [13:11:08.399] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:08.399] windows = "NUL", "/dev/null"), open = "w") [13:11:08.399] } [13:11:08.399] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:08.399] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:08.399] base::sink(type = "output", split = FALSE) [13:11:08.399] base::close(...future.stdout) [13:11:08.399] }, add = TRUE) [13:11:08.399] } [13:11:08.399] ...future.frame <- base::sys.nframe() [13:11:08.399] ...future.conditions <- base::list() [13:11:08.399] ...future.rng <- base::globalenv()$.Random.seed [13:11:08.399] if (FALSE) { [13:11:08.399] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:08.399] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:08.399] } [13:11:08.399] ...future.result <- base::tryCatch({ [13:11:08.399] base::withCallingHandlers({ [13:11:08.399] ...future.value <- base::withVisible(base::local({ [13:11:08.399] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:11:08.399] })) [13:11:08.399] future::FutureResult(value = ...future.value$value, [13:11:08.399] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.399] ...future.rng), globalenv = if (FALSE) [13:11:08.399] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:08.399] ...future.globalenv.names)) [13:11:08.399] else NULL, started = ...future.startTime, version = "1.8") [13:11:08.399] }, condition = base::local({ [13:11:08.399] c <- base::c [13:11:08.399] inherits <- base::inherits [13:11:08.399] invokeRestart <- base::invokeRestart [13:11:08.399] length <- base::length [13:11:08.399] list <- base::list [13:11:08.399] seq.int <- base::seq.int [13:11:08.399] signalCondition <- base::signalCondition [13:11:08.399] sys.calls <- base::sys.calls [13:11:08.399] `[[` <- base::`[[` [13:11:08.399] `+` <- base::`+` [13:11:08.399] `<<-` <- base::`<<-` [13:11:08.399] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:08.399] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:08.399] 3L)] [13:11:08.399] } [13:11:08.399] function(cond) { [13:11:08.399] is_error <- inherits(cond, "error") [13:11:08.399] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:08.399] NULL) [13:11:08.399] if (is_error) { [13:11:08.399] sessionInformation <- function() { [13:11:08.399] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:08.399] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:08.399] search = base::search(), system = base::Sys.info()) [13:11:08.399] } [13:11:08.399] ...future.conditions[[length(...future.conditions) + [13:11:08.399] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:08.399] cond$call), session = sessionInformation(), [13:11:08.399] timestamp = base::Sys.time(), signaled = 0L) [13:11:08.399] signalCondition(cond) [13:11:08.399] } [13:11:08.399] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:08.399] signal <- FALSE && inherits(cond, character(0)) [13:11:08.399] ...future.conditions[[length(...future.conditions) + [13:11:08.399] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:08.399] if (FALSE && !signal) { [13:11:08.399] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.399] { [13:11:08.399] inherits <- base::inherits [13:11:08.399] invokeRestart <- base::invokeRestart [13:11:08.399] is.null <- base::is.null [13:11:08.399] muffled <- FALSE [13:11:08.399] if (inherits(cond, "message")) { [13:11:08.399] muffled <- grepl(pattern, "muffleMessage") [13:11:08.399] if (muffled) [13:11:08.399] invokeRestart("muffleMessage") [13:11:08.399] } [13:11:08.399] else if (inherits(cond, "warning")) { [13:11:08.399] muffled <- grepl(pattern, "muffleWarning") [13:11:08.399] if (muffled) [13:11:08.399] invokeRestart("muffleWarning") [13:11:08.399] } [13:11:08.399] else if (inherits(cond, "condition")) { [13:11:08.399] if (!is.null(pattern)) { [13:11:08.399] computeRestarts <- base::computeRestarts [13:11:08.399] grepl <- base::grepl [13:11:08.399] restarts <- computeRestarts(cond) [13:11:08.399] for (restart in restarts) { [13:11:08.399] name <- restart$name [13:11:08.399] if (is.null(name)) [13:11:08.399] next [13:11:08.399] if (!grepl(pattern, name)) [13:11:08.399] next [13:11:08.399] invokeRestart(restart) [13:11:08.399] muffled <- TRUE [13:11:08.399] break [13:11:08.399] } [13:11:08.399] } [13:11:08.399] } [13:11:08.399] invisible(muffled) [13:11:08.399] } [13:11:08.399] muffleCondition(cond, pattern = "^muffle") [13:11:08.399] } [13:11:08.399] } [13:11:08.399] else { [13:11:08.399] if (TRUE) { [13:11:08.399] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.399] { [13:11:08.399] inherits <- base::inherits [13:11:08.399] invokeRestart <- base::invokeRestart [13:11:08.399] is.null <- base::is.null [13:11:08.399] muffled <- FALSE [13:11:08.399] if (inherits(cond, "message")) { [13:11:08.399] muffled <- grepl(pattern, "muffleMessage") [13:11:08.399] if (muffled) [13:11:08.399] invokeRestart("muffleMessage") [13:11:08.399] } [13:11:08.399] else if (inherits(cond, "warning")) { [13:11:08.399] muffled <- grepl(pattern, "muffleWarning") [13:11:08.399] if (muffled) [13:11:08.399] invokeRestart("muffleWarning") [13:11:08.399] } [13:11:08.399] else if (inherits(cond, "condition")) { [13:11:08.399] if (!is.null(pattern)) { [13:11:08.399] computeRestarts <- base::computeRestarts [13:11:08.399] grepl <- base::grepl [13:11:08.399] restarts <- computeRestarts(cond) [13:11:08.399] for (restart in restarts) { [13:11:08.399] name <- restart$name [13:11:08.399] if (is.null(name)) [13:11:08.399] next [13:11:08.399] if (!grepl(pattern, name)) [13:11:08.399] next [13:11:08.399] invokeRestart(restart) [13:11:08.399] muffled <- TRUE [13:11:08.399] break [13:11:08.399] } [13:11:08.399] } [13:11:08.399] } [13:11:08.399] invisible(muffled) [13:11:08.399] } [13:11:08.399] muffleCondition(cond, pattern = "^muffle") [13:11:08.399] } [13:11:08.399] } [13:11:08.399] } [13:11:08.399] })) [13:11:08.399] }, error = function(ex) { [13:11:08.399] base::structure(base::list(value = NULL, visible = NULL, [13:11:08.399] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.399] ...future.rng), started = ...future.startTime, [13:11:08.399] finished = Sys.time(), session_uuid = NA_character_, [13:11:08.399] version = "1.8"), class = "FutureResult") [13:11:08.399] }, finally = { [13:11:08.399] if (!identical(...future.workdir, getwd())) [13:11:08.399] setwd(...future.workdir) [13:11:08.399] { [13:11:08.399] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:08.399] ...future.oldOptions$nwarnings <- NULL [13:11:08.399] } [13:11:08.399] base::options(...future.oldOptions) [13:11:08.399] if (.Platform$OS.type == "windows") { [13:11:08.399] old_names <- names(...future.oldEnvVars) [13:11:08.399] envs <- base::Sys.getenv() [13:11:08.399] names <- names(envs) [13:11:08.399] common <- intersect(names, old_names) [13:11:08.399] added <- setdiff(names, old_names) [13:11:08.399] removed <- setdiff(old_names, names) [13:11:08.399] changed <- common[...future.oldEnvVars[common] != [13:11:08.399] envs[common]] [13:11:08.399] NAMES <- toupper(changed) [13:11:08.399] args <- list() [13:11:08.399] for (kk in seq_along(NAMES)) { [13:11:08.399] name <- changed[[kk]] [13:11:08.399] NAME <- NAMES[[kk]] [13:11:08.399] if (name != NAME && is.element(NAME, old_names)) [13:11:08.399] next [13:11:08.399] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.399] } [13:11:08.399] NAMES <- toupper(added) [13:11:08.399] for (kk in seq_along(NAMES)) { [13:11:08.399] name <- added[[kk]] [13:11:08.399] NAME <- NAMES[[kk]] [13:11:08.399] if (name != NAME && is.element(NAME, old_names)) [13:11:08.399] next [13:11:08.399] args[[name]] <- "" [13:11:08.399] } [13:11:08.399] NAMES <- toupper(removed) [13:11:08.399] for (kk in seq_along(NAMES)) { [13:11:08.399] name <- removed[[kk]] [13:11:08.399] NAME <- NAMES[[kk]] [13:11:08.399] if (name != NAME && is.element(NAME, old_names)) [13:11:08.399] next [13:11:08.399] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.399] } [13:11:08.399] if (length(args) > 0) [13:11:08.399] base::do.call(base::Sys.setenv, args = args) [13:11:08.399] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:08.399] } [13:11:08.399] else { [13:11:08.399] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:08.399] } [13:11:08.399] { [13:11:08.399] if (base::length(...future.futureOptionsAdded) > [13:11:08.399] 0L) { [13:11:08.399] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:08.399] base::names(opts) <- ...future.futureOptionsAdded [13:11:08.399] base::options(opts) [13:11:08.399] } [13:11:08.399] { [13:11:08.399] NULL [13:11:08.399] options(future.plan = NULL) [13:11:08.399] if (is.na(NA_character_)) [13:11:08.399] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.399] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:08.399] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:08.399] .init = FALSE) [13:11:08.399] } [13:11:08.399] } [13:11:08.399] } [13:11:08.399] }) [13:11:08.399] if (TRUE) { [13:11:08.399] base::sink(type = "output", split = FALSE) [13:11:08.399] if (TRUE) { [13:11:08.399] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:08.399] } [13:11:08.399] else { [13:11:08.399] ...future.result["stdout"] <- base::list(NULL) [13:11:08.399] } [13:11:08.399] base::close(...future.stdout) [13:11:08.399] ...future.stdout <- NULL [13:11:08.399] } [13:11:08.399] ...future.result$conditions <- ...future.conditions [13:11:08.399] ...future.result$finished <- base::Sys.time() [13:11:08.399] ...future.result [13:11:08.399] } [13:11:08.403] - Launch lazy future ... done [13:11:08.403] 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:11:08.414] getGlobalsAndPackages() ... [13:11:08.414] Searching for globals... [13:11:08.416] - globals found: [8] 'FUN', '[[', 'x', 'ii', '...', '{', 'get', 'parent.env' [13:11:08.417] Searching for globals ... DONE [13:11:08.417] Resolving globals: FALSE [13:11:08.417] Tweak future expression to call with '...' arguments ... [13:11:08.417] { [13:11:08.417] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:11:08.417] } [13:11:08.417] Tweak future expression to call with '...' arguments ... DONE [13:11:08.418] The total size of the 4 globals is 17.95 KiB (18384 bytes) [13:11:08.419] 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:11:08.419] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:11:08.419] - packages: [1] 'listenv' [13:11:08.419] getGlobalsAndPackages() ... DONE [13:11:08.420] run() for 'Future' ... [13:11:08.420] - state: 'created' [13:11:08.420] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:08.422] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:08.423] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:08.423] - Field: 'label' [13:11:08.423] - Field: 'local' [13:11:08.423] - Field: 'owner' [13:11:08.423] - Field: 'envir' [13:11:08.423] - Field: 'packages' [13:11:08.424] - Field: 'gc' [13:11:08.424] - Field: 'conditions' [13:11:08.424] - Field: 'expr' [13:11:08.424] - Field: 'uuid' [13:11:08.424] - Field: 'seed' [13:11:08.424] - Field: 'version' [13:11:08.425] - Field: 'result' [13:11:08.425] - Field: 'asynchronous' [13:11:08.425] - Field: 'calls' [13:11:08.425] - Field: 'globals' [13:11:08.425] - Field: 'stdout' [13:11:08.425] - Field: 'earlySignal' [13:11:08.426] - Field: 'lazy' [13:11:08.426] - Field: 'state' [13:11:08.426] - Field: '.cluster' [13:11:08.426] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:08.426] - Launch lazy future ... [13:11:08.426] Packages needed by the future expression (n = 1): 'listenv' [13:11:08.427] Packages needed by future strategies (n = 0): [13:11:08.427] { [13:11:08.427] { [13:11:08.427] { [13:11:08.427] ...future.startTime <- base::Sys.time() [13:11:08.427] { [13:11:08.427] { [13:11:08.427] { [13:11:08.427] { [13:11:08.427] base::local({ [13:11:08.427] has_future <- base::requireNamespace("future", [13:11:08.427] quietly = TRUE) [13:11:08.427] if (has_future) { [13:11:08.427] ns <- base::getNamespace("future") [13:11:08.427] version <- ns[[".package"]][["version"]] [13:11:08.427] if (is.null(version)) [13:11:08.427] version <- utils::packageVersion("future") [13:11:08.427] } [13:11:08.427] else { [13:11:08.427] version <- NULL [13:11:08.427] } [13:11:08.427] if (!has_future || version < "1.8.0") { [13:11:08.427] info <- base::c(r_version = base::gsub("R version ", [13:11:08.427] "", base::R.version$version.string), [13:11:08.427] platform = base::sprintf("%s (%s-bit)", [13:11:08.427] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:08.427] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:08.427] "release", "version")], collapse = " "), [13:11:08.427] hostname = base::Sys.info()[["nodename"]]) [13:11:08.427] info <- base::sprintf("%s: %s", base::names(info), [13:11:08.427] info) [13:11:08.427] info <- base::paste(info, collapse = "; ") [13:11:08.427] if (!has_future) { [13:11:08.427] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:08.427] info) [13:11:08.427] } [13:11:08.427] else { [13:11:08.427] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:08.427] info, version) [13:11:08.427] } [13:11:08.427] base::stop(msg) [13:11:08.427] } [13:11:08.427] }) [13:11:08.427] } [13:11:08.427] base::local({ [13:11:08.427] for (pkg in "listenv") { [13:11:08.427] base::loadNamespace(pkg) [13:11:08.427] base::library(pkg, character.only = TRUE) [13:11:08.427] } [13:11:08.427] }) [13:11:08.427] } [13:11:08.427] ...future.strategy.old <- future::plan("list") [13:11:08.427] options(future.plan = NULL) [13:11:08.427] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.427] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:08.427] } [13:11:08.427] ...future.workdir <- getwd() [13:11:08.427] } [13:11:08.427] ...future.oldOptions <- base::as.list(base::.Options) [13:11:08.427] ...future.oldEnvVars <- base::Sys.getenv() [13:11:08.427] } [13:11:08.427] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:08.427] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:08.427] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:08.427] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:08.427] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:08.427] future.stdout.windows.reencode = NULL, width = 80L) [13:11:08.427] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:08.427] base::names(...future.oldOptions)) [13:11:08.427] } [13:11:08.427] if (FALSE) { [13:11:08.427] } [13:11:08.427] else { [13:11:08.427] if (TRUE) { [13:11:08.427] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:08.427] open = "w") [13:11:08.427] } [13:11:08.427] else { [13:11:08.427] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:08.427] windows = "NUL", "/dev/null"), open = "w") [13:11:08.427] } [13:11:08.427] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:08.427] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:08.427] base::sink(type = "output", split = FALSE) [13:11:08.427] base::close(...future.stdout) [13:11:08.427] }, add = TRUE) [13:11:08.427] } [13:11:08.427] ...future.frame <- base::sys.nframe() [13:11:08.427] ...future.conditions <- base::list() [13:11:08.427] ...future.rng <- base::globalenv()$.Random.seed [13:11:08.427] if (FALSE) { [13:11:08.427] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:08.427] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:08.427] } [13:11:08.427] ...future.result <- base::tryCatch({ [13:11:08.427] base::withCallingHandlers({ [13:11:08.427] ...future.value <- base::withVisible(base::local({ [13:11:08.427] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:11:08.427] })) [13:11:08.427] future::FutureResult(value = ...future.value$value, [13:11:08.427] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.427] ...future.rng), globalenv = if (FALSE) [13:11:08.427] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:08.427] ...future.globalenv.names)) [13:11:08.427] else NULL, started = ...future.startTime, version = "1.8") [13:11:08.427] }, condition = base::local({ [13:11:08.427] c <- base::c [13:11:08.427] inherits <- base::inherits [13:11:08.427] invokeRestart <- base::invokeRestart [13:11:08.427] length <- base::length [13:11:08.427] list <- base::list [13:11:08.427] seq.int <- base::seq.int [13:11:08.427] signalCondition <- base::signalCondition [13:11:08.427] sys.calls <- base::sys.calls [13:11:08.427] `[[` <- base::`[[` [13:11:08.427] `+` <- base::`+` [13:11:08.427] `<<-` <- base::`<<-` [13:11:08.427] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:08.427] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:08.427] 3L)] [13:11:08.427] } [13:11:08.427] function(cond) { [13:11:08.427] is_error <- inherits(cond, "error") [13:11:08.427] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:08.427] NULL) [13:11:08.427] if (is_error) { [13:11:08.427] sessionInformation <- function() { [13:11:08.427] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:08.427] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:08.427] search = base::search(), system = base::Sys.info()) [13:11:08.427] } [13:11:08.427] ...future.conditions[[length(...future.conditions) + [13:11:08.427] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:08.427] cond$call), session = sessionInformation(), [13:11:08.427] timestamp = base::Sys.time(), signaled = 0L) [13:11:08.427] signalCondition(cond) [13:11:08.427] } [13:11:08.427] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:08.427] signal <- FALSE && inherits(cond, character(0)) [13:11:08.427] ...future.conditions[[length(...future.conditions) + [13:11:08.427] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:08.427] if (FALSE && !signal) { [13:11:08.427] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.427] { [13:11:08.427] inherits <- base::inherits [13:11:08.427] invokeRestart <- base::invokeRestart [13:11:08.427] is.null <- base::is.null [13:11:08.427] muffled <- FALSE [13:11:08.427] if (inherits(cond, "message")) { [13:11:08.427] muffled <- grepl(pattern, "muffleMessage") [13:11:08.427] if (muffled) [13:11:08.427] invokeRestart("muffleMessage") [13:11:08.427] } [13:11:08.427] else if (inherits(cond, "warning")) { [13:11:08.427] muffled <- grepl(pattern, "muffleWarning") [13:11:08.427] if (muffled) [13:11:08.427] invokeRestart("muffleWarning") [13:11:08.427] } [13:11:08.427] else if (inherits(cond, "condition")) { [13:11:08.427] if (!is.null(pattern)) { [13:11:08.427] computeRestarts <- base::computeRestarts [13:11:08.427] grepl <- base::grepl [13:11:08.427] restarts <- computeRestarts(cond) [13:11:08.427] for (restart in restarts) { [13:11:08.427] name <- restart$name [13:11:08.427] if (is.null(name)) [13:11:08.427] next [13:11:08.427] if (!grepl(pattern, name)) [13:11:08.427] next [13:11:08.427] invokeRestart(restart) [13:11:08.427] muffled <- TRUE [13:11:08.427] break [13:11:08.427] } [13:11:08.427] } [13:11:08.427] } [13:11:08.427] invisible(muffled) [13:11:08.427] } [13:11:08.427] muffleCondition(cond, pattern = "^muffle") [13:11:08.427] } [13:11:08.427] } [13:11:08.427] else { [13:11:08.427] if (TRUE) { [13:11:08.427] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.427] { [13:11:08.427] inherits <- base::inherits [13:11:08.427] invokeRestart <- base::invokeRestart [13:11:08.427] is.null <- base::is.null [13:11:08.427] muffled <- FALSE [13:11:08.427] if (inherits(cond, "message")) { [13:11:08.427] muffled <- grepl(pattern, "muffleMessage") [13:11:08.427] if (muffled) [13:11:08.427] invokeRestart("muffleMessage") [13:11:08.427] } [13:11:08.427] else if (inherits(cond, "warning")) { [13:11:08.427] muffled <- grepl(pattern, "muffleWarning") [13:11:08.427] if (muffled) [13:11:08.427] invokeRestart("muffleWarning") [13:11:08.427] } [13:11:08.427] else if (inherits(cond, "condition")) { [13:11:08.427] if (!is.null(pattern)) { [13:11:08.427] computeRestarts <- base::computeRestarts [13:11:08.427] grepl <- base::grepl [13:11:08.427] restarts <- computeRestarts(cond) [13:11:08.427] for (restart in restarts) { [13:11:08.427] name <- restart$name [13:11:08.427] if (is.null(name)) [13:11:08.427] next [13:11:08.427] if (!grepl(pattern, name)) [13:11:08.427] next [13:11:08.427] invokeRestart(restart) [13:11:08.427] muffled <- TRUE [13:11:08.427] break [13:11:08.427] } [13:11:08.427] } [13:11:08.427] } [13:11:08.427] invisible(muffled) [13:11:08.427] } [13:11:08.427] muffleCondition(cond, pattern = "^muffle") [13:11:08.427] } [13:11:08.427] } [13:11:08.427] } [13:11:08.427] })) [13:11:08.427] }, error = function(ex) { [13:11:08.427] base::structure(base::list(value = NULL, visible = NULL, [13:11:08.427] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.427] ...future.rng), started = ...future.startTime, [13:11:08.427] finished = Sys.time(), session_uuid = NA_character_, [13:11:08.427] version = "1.8"), class = "FutureResult") [13:11:08.427] }, finally = { [13:11:08.427] if (!identical(...future.workdir, getwd())) [13:11:08.427] setwd(...future.workdir) [13:11:08.427] { [13:11:08.427] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:08.427] ...future.oldOptions$nwarnings <- NULL [13:11:08.427] } [13:11:08.427] base::options(...future.oldOptions) [13:11:08.427] if (.Platform$OS.type == "windows") { [13:11:08.427] old_names <- names(...future.oldEnvVars) [13:11:08.427] envs <- base::Sys.getenv() [13:11:08.427] names <- names(envs) [13:11:08.427] common <- intersect(names, old_names) [13:11:08.427] added <- setdiff(names, old_names) [13:11:08.427] removed <- setdiff(old_names, names) [13:11:08.427] changed <- common[...future.oldEnvVars[common] != [13:11:08.427] envs[common]] [13:11:08.427] NAMES <- toupper(changed) [13:11:08.427] args <- list() [13:11:08.427] for (kk in seq_along(NAMES)) { [13:11:08.427] name <- changed[[kk]] [13:11:08.427] NAME <- NAMES[[kk]] [13:11:08.427] if (name != NAME && is.element(NAME, old_names)) [13:11:08.427] next [13:11:08.427] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.427] } [13:11:08.427] NAMES <- toupper(added) [13:11:08.427] for (kk in seq_along(NAMES)) { [13:11:08.427] name <- added[[kk]] [13:11:08.427] NAME <- NAMES[[kk]] [13:11:08.427] if (name != NAME && is.element(NAME, old_names)) [13:11:08.427] next [13:11:08.427] args[[name]] <- "" [13:11:08.427] } [13:11:08.427] NAMES <- toupper(removed) [13:11:08.427] for (kk in seq_along(NAMES)) { [13:11:08.427] name <- removed[[kk]] [13:11:08.427] NAME <- NAMES[[kk]] [13:11:08.427] if (name != NAME && is.element(NAME, old_names)) [13:11:08.427] next [13:11:08.427] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.427] } [13:11:08.427] if (length(args) > 0) [13:11:08.427] base::do.call(base::Sys.setenv, args = args) [13:11:08.427] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:08.427] } [13:11:08.427] else { [13:11:08.427] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:08.427] } [13:11:08.427] { [13:11:08.427] if (base::length(...future.futureOptionsAdded) > [13:11:08.427] 0L) { [13:11:08.427] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:08.427] base::names(opts) <- ...future.futureOptionsAdded [13:11:08.427] base::options(opts) [13:11:08.427] } [13:11:08.427] { [13:11:08.427] NULL [13:11:08.427] options(future.plan = NULL) [13:11:08.427] if (is.na(NA_character_)) [13:11:08.427] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.427] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:08.427] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:08.427] .init = FALSE) [13:11:08.427] } [13:11:08.427] } [13:11:08.427] } [13:11:08.427] }) [13:11:08.427] if (TRUE) { [13:11:08.427] base::sink(type = "output", split = FALSE) [13:11:08.427] if (TRUE) { [13:11:08.427] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:08.427] } [13:11:08.427] else { [13:11:08.427] ...future.result["stdout"] <- base::list(NULL) [13:11:08.427] } [13:11:08.427] base::close(...future.stdout) [13:11:08.427] ...future.stdout <- NULL [13:11:08.427] } [13:11:08.427] ...future.result$conditions <- ...future.conditions [13:11:08.427] ...future.result$finished <- base::Sys.time() [13:11:08.427] ...future.result [13:11:08.427] } [13:11:08.431] - Launch lazy future ... done [13:11:08.431] run() for 'MiraiFuture' ... done [13:11:08.432] getGlobalsAndPackages() ... [13:11:08.432] Searching for globals... [13:11:08.436] - globals found: [8] 'FUN', '[[', 'x', 'ii', '...', '{', 'get', 'parent.env' [13:11:08.436] Searching for globals ... DONE [13:11:08.436] Resolving globals: FALSE [13:11:08.436] Tweak future expression to call with '...' arguments ... [13:11:08.436] { [13:11:08.436] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:11:08.436] } [13:11:08.437] Tweak future expression to call with '...' arguments ... DONE [13:11:08.437] The total size of the 4 globals is 17.95 KiB (18384 bytes) [13:11:08.438] 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:11:08.438] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:11:08.438] - packages: [1] 'listenv' [13:11:08.439] getGlobalsAndPackages() ... DONE [13:11:08.439] run() for 'Future' ... [13:11:08.439] - state: 'created' [13:11:08.439] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:08.441] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:08.442] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:08.442] - Field: 'label' [13:11:08.442] - Field: 'local' [13:11:08.442] - Field: 'owner' [13:11:08.442] - Field: 'envir' [13:11:08.443] - Field: 'packages' [13:11:08.443] - Field: 'gc' [13:11:08.443] - Field: 'conditions' [13:11:08.443] - Field: 'expr' [13:11:08.443] - Field: 'uuid' [13:11:08.443] - Field: 'seed' [13:11:08.444] - Field: 'version' [13:11:08.444] - Field: 'result' [13:11:08.444] - Field: 'asynchronous' [13:11:08.444] - Field: 'calls' [13:11:08.444] - Field: 'globals' [13:11:08.445] - Field: 'stdout' [13:11:08.445] - Field: 'earlySignal' [13:11:08.445] - Field: 'lazy' [13:11:08.445] - Field: 'state' [13:11:08.445] - Field: '.cluster' [13:11:08.445] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:08.446] - Launch lazy future ... [13:11:08.446] Packages needed by the future expression (n = 1): 'listenv' [13:11:08.446] Packages needed by future strategies (n = 0): [13:11:08.446] { [13:11:08.446] { [13:11:08.446] { [13:11:08.446] ...future.startTime <- base::Sys.time() [13:11:08.446] { [13:11:08.446] { [13:11:08.446] { [13:11:08.446] { [13:11:08.446] base::local({ [13:11:08.446] has_future <- base::requireNamespace("future", [13:11:08.446] quietly = TRUE) [13:11:08.446] if (has_future) { [13:11:08.446] ns <- base::getNamespace("future") [13:11:08.446] version <- ns[[".package"]][["version"]] [13:11:08.446] if (is.null(version)) [13:11:08.446] version <- utils::packageVersion("future") [13:11:08.446] } [13:11:08.446] else { [13:11:08.446] version <- NULL [13:11:08.446] } [13:11:08.446] if (!has_future || version < "1.8.0") { [13:11:08.446] info <- base::c(r_version = base::gsub("R version ", [13:11:08.446] "", base::R.version$version.string), [13:11:08.446] platform = base::sprintf("%s (%s-bit)", [13:11:08.446] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:08.446] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:08.446] "release", "version")], collapse = " "), [13:11:08.446] hostname = base::Sys.info()[["nodename"]]) [13:11:08.446] info <- base::sprintf("%s: %s", base::names(info), [13:11:08.446] info) [13:11:08.446] info <- base::paste(info, collapse = "; ") [13:11:08.446] if (!has_future) { [13:11:08.446] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:08.446] info) [13:11:08.446] } [13:11:08.446] else { [13:11:08.446] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:08.446] info, version) [13:11:08.446] } [13:11:08.446] base::stop(msg) [13:11:08.446] } [13:11:08.446] }) [13:11:08.446] } [13:11:08.446] base::local({ [13:11:08.446] for (pkg in "listenv") { [13:11:08.446] base::loadNamespace(pkg) [13:11:08.446] base::library(pkg, character.only = TRUE) [13:11:08.446] } [13:11:08.446] }) [13:11:08.446] } [13:11:08.446] ...future.strategy.old <- future::plan("list") [13:11:08.446] options(future.plan = NULL) [13:11:08.446] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.446] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:08.446] } [13:11:08.446] ...future.workdir <- getwd() [13:11:08.446] } [13:11:08.446] ...future.oldOptions <- base::as.list(base::.Options) [13:11:08.446] ...future.oldEnvVars <- base::Sys.getenv() [13:11:08.446] } [13:11:08.446] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:08.446] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:08.446] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:08.446] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:08.446] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:08.446] future.stdout.windows.reencode = NULL, width = 80L) [13:11:08.446] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:08.446] base::names(...future.oldOptions)) [13:11:08.446] } [13:11:08.446] if (FALSE) { [13:11:08.446] } [13:11:08.446] else { [13:11:08.446] if (TRUE) { [13:11:08.446] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:08.446] open = "w") [13:11:08.446] } [13:11:08.446] else { [13:11:08.446] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:08.446] windows = "NUL", "/dev/null"), open = "w") [13:11:08.446] } [13:11:08.446] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:08.446] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:08.446] base::sink(type = "output", split = FALSE) [13:11:08.446] base::close(...future.stdout) [13:11:08.446] }, add = TRUE) [13:11:08.446] } [13:11:08.446] ...future.frame <- base::sys.nframe() [13:11:08.446] ...future.conditions <- base::list() [13:11:08.446] ...future.rng <- base::globalenv()$.Random.seed [13:11:08.446] if (FALSE) { [13:11:08.446] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:08.446] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:08.446] } [13:11:08.446] ...future.result <- base::tryCatch({ [13:11:08.446] base::withCallingHandlers({ [13:11:08.446] ...future.value <- base::withVisible(base::local({ [13:11:08.446] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:11:08.446] })) [13:11:08.446] future::FutureResult(value = ...future.value$value, [13:11:08.446] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.446] ...future.rng), globalenv = if (FALSE) [13:11:08.446] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:08.446] ...future.globalenv.names)) [13:11:08.446] else NULL, started = ...future.startTime, version = "1.8") [13:11:08.446] }, condition = base::local({ [13:11:08.446] c <- base::c [13:11:08.446] inherits <- base::inherits [13:11:08.446] invokeRestart <- base::invokeRestart [13:11:08.446] length <- base::length [13:11:08.446] list <- base::list [13:11:08.446] seq.int <- base::seq.int [13:11:08.446] signalCondition <- base::signalCondition [13:11:08.446] sys.calls <- base::sys.calls [13:11:08.446] `[[` <- base::`[[` [13:11:08.446] `+` <- base::`+` [13:11:08.446] `<<-` <- base::`<<-` [13:11:08.446] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:08.446] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:08.446] 3L)] [13:11:08.446] } [13:11:08.446] function(cond) { [13:11:08.446] is_error <- inherits(cond, "error") [13:11:08.446] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:08.446] NULL) [13:11:08.446] if (is_error) { [13:11:08.446] sessionInformation <- function() { [13:11:08.446] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:08.446] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:08.446] search = base::search(), system = base::Sys.info()) [13:11:08.446] } [13:11:08.446] ...future.conditions[[length(...future.conditions) + [13:11:08.446] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:08.446] cond$call), session = sessionInformation(), [13:11:08.446] timestamp = base::Sys.time(), signaled = 0L) [13:11:08.446] signalCondition(cond) [13:11:08.446] } [13:11:08.446] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:08.446] signal <- FALSE && inherits(cond, character(0)) [13:11:08.446] ...future.conditions[[length(...future.conditions) + [13:11:08.446] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:08.446] if (FALSE && !signal) { [13:11:08.446] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.446] { [13:11:08.446] inherits <- base::inherits [13:11:08.446] invokeRestart <- base::invokeRestart [13:11:08.446] is.null <- base::is.null [13:11:08.446] muffled <- FALSE [13:11:08.446] if (inherits(cond, "message")) { [13:11:08.446] muffled <- grepl(pattern, "muffleMessage") [13:11:08.446] if (muffled) [13:11:08.446] invokeRestart("muffleMessage") [13:11:08.446] } [13:11:08.446] else if (inherits(cond, "warning")) { [13:11:08.446] muffled <- grepl(pattern, "muffleWarning") [13:11:08.446] if (muffled) [13:11:08.446] invokeRestart("muffleWarning") [13:11:08.446] } [13:11:08.446] else if (inherits(cond, "condition")) { [13:11:08.446] if (!is.null(pattern)) { [13:11:08.446] computeRestarts <- base::computeRestarts [13:11:08.446] grepl <- base::grepl [13:11:08.446] restarts <- computeRestarts(cond) [13:11:08.446] for (restart in restarts) { [13:11:08.446] name <- restart$name [13:11:08.446] if (is.null(name)) [13:11:08.446] next [13:11:08.446] if (!grepl(pattern, name)) [13:11:08.446] next [13:11:08.446] invokeRestart(restart) [13:11:08.446] muffled <- TRUE [13:11:08.446] break [13:11:08.446] } [13:11:08.446] } [13:11:08.446] } [13:11:08.446] invisible(muffled) [13:11:08.446] } [13:11:08.446] muffleCondition(cond, pattern = "^muffle") [13:11:08.446] } [13:11:08.446] } [13:11:08.446] else { [13:11:08.446] if (TRUE) { [13:11:08.446] muffleCondition <- function (cond, pattern = "^muffle") [13:11:08.446] { [13:11:08.446] inherits <- base::inherits [13:11:08.446] invokeRestart <- base::invokeRestart [13:11:08.446] is.null <- base::is.null [13:11:08.446] muffled <- FALSE [13:11:08.446] if (inherits(cond, "message")) { [13:11:08.446] muffled <- grepl(pattern, "muffleMessage") [13:11:08.446] if (muffled) [13:11:08.446] invokeRestart("muffleMessage") [13:11:08.446] } [13:11:08.446] else if (inherits(cond, "warning")) { [13:11:08.446] muffled <- grepl(pattern, "muffleWarning") [13:11:08.446] if (muffled) [13:11:08.446] invokeRestart("muffleWarning") [13:11:08.446] } [13:11:08.446] else if (inherits(cond, "condition")) { [13:11:08.446] if (!is.null(pattern)) { [13:11:08.446] computeRestarts <- base::computeRestarts [13:11:08.446] grepl <- base::grepl [13:11:08.446] restarts <- computeRestarts(cond) [13:11:08.446] for (restart in restarts) { [13:11:08.446] name <- restart$name [13:11:08.446] if (is.null(name)) [13:11:08.446] next [13:11:08.446] if (!grepl(pattern, name)) [13:11:08.446] next [13:11:08.446] invokeRestart(restart) [13:11:08.446] muffled <- TRUE [13:11:08.446] break [13:11:08.446] } [13:11:08.446] } [13:11:08.446] } [13:11:08.446] invisible(muffled) [13:11:08.446] } [13:11:08.446] muffleCondition(cond, pattern = "^muffle") [13:11:08.446] } [13:11:08.446] } [13:11:08.446] } [13:11:08.446] })) [13:11:08.446] }, error = function(ex) { [13:11:08.446] base::structure(base::list(value = NULL, visible = NULL, [13:11:08.446] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:08.446] ...future.rng), started = ...future.startTime, [13:11:08.446] finished = Sys.time(), session_uuid = NA_character_, [13:11:08.446] version = "1.8"), class = "FutureResult") [13:11:08.446] }, finally = { [13:11:08.446] if (!identical(...future.workdir, getwd())) [13:11:08.446] setwd(...future.workdir) [13:11:08.446] { [13:11:08.446] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:08.446] ...future.oldOptions$nwarnings <- NULL [13:11:08.446] } [13:11:08.446] base::options(...future.oldOptions) [13:11:08.446] if (.Platform$OS.type == "windows") { [13:11:08.446] old_names <- names(...future.oldEnvVars) [13:11:08.446] envs <- base::Sys.getenv() [13:11:08.446] names <- names(envs) [13:11:08.446] common <- intersect(names, old_names) [13:11:08.446] added <- setdiff(names, old_names) [13:11:08.446] removed <- setdiff(old_names, names) [13:11:08.446] changed <- common[...future.oldEnvVars[common] != [13:11:08.446] envs[common]] [13:11:08.446] NAMES <- toupper(changed) [13:11:08.446] args <- list() [13:11:08.446] for (kk in seq_along(NAMES)) { [13:11:08.446] name <- changed[[kk]] [13:11:08.446] NAME <- NAMES[[kk]] [13:11:08.446] if (name != NAME && is.element(NAME, old_names)) [13:11:08.446] next [13:11:08.446] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.446] } [13:11:08.446] NAMES <- toupper(added) [13:11:08.446] for (kk in seq_along(NAMES)) { [13:11:08.446] name <- added[[kk]] [13:11:08.446] NAME <- NAMES[[kk]] [13:11:08.446] if (name != NAME && is.element(NAME, old_names)) [13:11:08.446] next [13:11:08.446] args[[name]] <- "" [13:11:08.446] } [13:11:08.446] NAMES <- toupper(removed) [13:11:08.446] for (kk in seq_along(NAMES)) { [13:11:08.446] name <- removed[[kk]] [13:11:08.446] NAME <- NAMES[[kk]] [13:11:08.446] if (name != NAME && is.element(NAME, old_names)) [13:11:08.446] next [13:11:08.446] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:08.446] } [13:11:08.446] if (length(args) > 0) [13:11:08.446] base::do.call(base::Sys.setenv, args = args) [13:11:08.446] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:08.446] } [13:11:08.446] else { [13:11:08.446] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:08.446] } [13:11:08.446] { [13:11:08.446] if (base::length(...future.futureOptionsAdded) > [13:11:08.446] 0L) { [13:11:08.446] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:08.446] base::names(opts) <- ...future.futureOptionsAdded [13:11:08.446] base::options(opts) [13:11:08.446] } [13:11:08.446] { [13:11:08.446] NULL [13:11:08.446] options(future.plan = NULL) [13:11:08.446] if (is.na(NA_character_)) [13:11:08.446] Sys.unsetenv("R_FUTURE_PLAN") [13:11:08.446] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:08.446] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:08.446] .init = FALSE) [13:11:08.446] } [13:11:08.446] } [13:11:08.446] } [13:11:08.446] }) [13:11:08.446] if (TRUE) { [13:11:08.446] base::sink(type = "output", split = FALSE) [13:11:08.446] if (TRUE) { [13:11:08.446] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:08.446] } [13:11:08.446] else { [13:11:08.446] ...future.result["stdout"] <- base::list(NULL) [13:11:08.446] } [13:11:08.446] base::close(...future.stdout) [13:11:08.446] ...future.stdout <- NULL [13:11:08.446] } [13:11:08.446] ...future.result$conditions <- ...future.conditions [13:11:08.446] ...future.result$finished <- base::Sys.time() [13:11:08.446] ...future.result [13:11:08.446] } [13:11:08.451] - Launch lazy future ... done [13:11:08.451] 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.57 0.06 1.03