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:31:08.831] plan(): Setting new future strategy stack: [13:31:08.832] List of future strategies: [13:31:08.832] 1. mirai_multisession: [13:31:08.832] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:31:08.832] - tweaked: FALSE [13:31:08.832] - call: future::plan(future.mirai::mirai_multisession) [13:31:08.844] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:31:08.845] < mirai | $data > [13:31:08.849] getGlobalsAndPackages() ... [13:31:08.850] Not searching for globals [13:31:08.850] - globals: [0] [13:31:08.850] getGlobalsAndPackages() ... DONE [13:31:08.851] getGlobalsAndPackages() ... [13:31:08.851] [13:31:08.851] - globals: [0] [13:31:08.851] getGlobalsAndPackages() ... DONE [13:31:09.126] Packages needed by the future expression (n = 0): [13:31:09.126] Packages needed by future strategies (n = 0): [13:31:09.127] { [13:31:09.127] { [13:31:09.127] { [13:31:09.127] ...future.startTime <- base::Sys.time() [13:31:09.127] { [13:31:09.127] { [13:31:09.127] { [13:31:09.127] base::local({ [13:31:09.127] has_future <- base::requireNamespace("future", [13:31:09.127] quietly = TRUE) [13:31:09.127] if (has_future) { [13:31:09.127] ns <- base::getNamespace("future") [13:31:09.127] version <- ns[[".package"]][["version"]] [13:31:09.127] if (is.null(version)) [13:31:09.127] version <- utils::packageVersion("future") [13:31:09.127] } [13:31:09.127] else { [13:31:09.127] version <- NULL [13:31:09.127] } [13:31:09.127] if (!has_future || version < "1.8.0") { [13:31:09.127] info <- base::c(r_version = base::gsub("R version ", [13:31:09.127] "", base::R.version$version.string), [13:31:09.127] platform = base::sprintf("%s (%s-bit)", [13:31:09.127] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.127] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.127] "release", "version")], collapse = " "), [13:31:09.127] hostname = base::Sys.info()[["nodename"]]) [13:31:09.127] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.127] info) [13:31:09.127] info <- base::paste(info, collapse = "; ") [13:31:09.127] if (!has_future) { [13:31:09.127] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.127] info) [13:31:09.127] } [13:31:09.127] else { [13:31:09.127] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.127] info, version) [13:31:09.127] } [13:31:09.127] base::stop(msg) [13:31:09.127] } [13:31:09.127] }) [13:31:09.127] } [13:31:09.127] ...future.strategy.old <- future::plan("list") [13:31:09.127] options(future.plan = NULL) [13:31:09.127] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.127] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.127] } [13:31:09.127] ...future.workdir <- getwd() [13:31:09.127] } [13:31:09.127] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.127] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.127] } [13:31:09.127] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.127] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.127] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.127] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.127] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.127] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.127] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.127] base::names(...future.oldOptions)) [13:31:09.127] } [13:31:09.127] if (FALSE) { [13:31:09.127] } [13:31:09.127] else { [13:31:09.127] if (TRUE) { [13:31:09.127] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.127] open = "w") [13:31:09.127] } [13:31:09.127] else { [13:31:09.127] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.127] windows = "NUL", "/dev/null"), open = "w") [13:31:09.127] } [13:31:09.127] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.127] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.127] base::sink(type = "output", split = FALSE) [13:31:09.127] base::close(...future.stdout) [13:31:09.127] }, add = TRUE) [13:31:09.127] } [13:31:09.127] ...future.frame <- base::sys.nframe() [13:31:09.127] ...future.conditions <- base::list() [13:31:09.127] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.127] if (FALSE) { [13:31:09.127] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.127] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.127] } [13:31:09.127] ...future.result <- base::tryCatch({ [13:31:09.127] base::withCallingHandlers({ [13:31:09.127] ...future.value <- base::withVisible(base::local(NA)) [13:31:09.127] future::FutureResult(value = ...future.value$value, [13:31:09.127] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.127] ...future.rng), globalenv = if (FALSE) [13:31:09.127] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.127] ...future.globalenv.names)) [13:31:09.127] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.127] }, condition = base::local({ [13:31:09.127] c <- base::c [13:31:09.127] inherits <- base::inherits [13:31:09.127] invokeRestart <- base::invokeRestart [13:31:09.127] length <- base::length [13:31:09.127] list <- base::list [13:31:09.127] seq.int <- base::seq.int [13:31:09.127] signalCondition <- base::signalCondition [13:31:09.127] sys.calls <- base::sys.calls [13:31:09.127] `[[` <- base::`[[` [13:31:09.127] `+` <- base::`+` [13:31:09.127] `<<-` <- base::`<<-` [13:31:09.127] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.127] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.127] 3L)] [13:31:09.127] } [13:31:09.127] function(cond) { [13:31:09.127] is_error <- inherits(cond, "error") [13:31:09.127] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.127] NULL) [13:31:09.127] if (is_error) { [13:31:09.127] sessionInformation <- function() { [13:31:09.127] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.127] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.127] search = base::search(), system = base::Sys.info()) [13:31:09.127] } [13:31:09.127] ...future.conditions[[length(...future.conditions) + [13:31:09.127] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.127] cond$call), session = sessionInformation(), [13:31:09.127] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.127] signalCondition(cond) [13:31:09.127] } [13:31:09.127] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.127] signal <- FALSE && inherits(cond, character(0)) [13:31:09.127] ...future.conditions[[length(...future.conditions) + [13:31:09.127] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.127] if (FALSE && !signal) { [13:31:09.127] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.127] { [13:31:09.127] inherits <- base::inherits [13:31:09.127] invokeRestart <- base::invokeRestart [13:31:09.127] is.null <- base::is.null [13:31:09.127] muffled <- FALSE [13:31:09.127] if (inherits(cond, "message")) { [13:31:09.127] muffled <- grepl(pattern, "muffleMessage") [13:31:09.127] if (muffled) [13:31:09.127] invokeRestart("muffleMessage") [13:31:09.127] } [13:31:09.127] else if (inherits(cond, "warning")) { [13:31:09.127] muffled <- grepl(pattern, "muffleWarning") [13:31:09.127] if (muffled) [13:31:09.127] invokeRestart("muffleWarning") [13:31:09.127] } [13:31:09.127] else if (inherits(cond, "condition")) { [13:31:09.127] if (!is.null(pattern)) { [13:31:09.127] computeRestarts <- base::computeRestarts [13:31:09.127] grepl <- base::grepl [13:31:09.127] restarts <- computeRestarts(cond) [13:31:09.127] for (restart in restarts) { [13:31:09.127] name <- restart$name [13:31:09.127] if (is.null(name)) [13:31:09.127] next [13:31:09.127] if (!grepl(pattern, name)) [13:31:09.127] next [13:31:09.127] invokeRestart(restart) [13:31:09.127] muffled <- TRUE [13:31:09.127] break [13:31:09.127] } [13:31:09.127] } [13:31:09.127] } [13:31:09.127] invisible(muffled) [13:31:09.127] } [13:31:09.127] muffleCondition(cond, pattern = "^muffle") [13:31:09.127] } [13:31:09.127] } [13:31:09.127] else { [13:31:09.127] if (TRUE) { [13:31:09.127] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.127] { [13:31:09.127] inherits <- base::inherits [13:31:09.127] invokeRestart <- base::invokeRestart [13:31:09.127] is.null <- base::is.null [13:31:09.127] muffled <- FALSE [13:31:09.127] if (inherits(cond, "message")) { [13:31:09.127] muffled <- grepl(pattern, "muffleMessage") [13:31:09.127] if (muffled) [13:31:09.127] invokeRestart("muffleMessage") [13:31:09.127] } [13:31:09.127] else if (inherits(cond, "warning")) { [13:31:09.127] muffled <- grepl(pattern, "muffleWarning") [13:31:09.127] if (muffled) [13:31:09.127] invokeRestart("muffleWarning") [13:31:09.127] } [13:31:09.127] else if (inherits(cond, "condition")) { [13:31:09.127] if (!is.null(pattern)) { [13:31:09.127] computeRestarts <- base::computeRestarts [13:31:09.127] grepl <- base::grepl [13:31:09.127] restarts <- computeRestarts(cond) [13:31:09.127] for (restart in restarts) { [13:31:09.127] name <- restart$name [13:31:09.127] if (is.null(name)) [13:31:09.127] next [13:31:09.127] if (!grepl(pattern, name)) [13:31:09.127] next [13:31:09.127] invokeRestart(restart) [13:31:09.127] muffled <- TRUE [13:31:09.127] break [13:31:09.127] } [13:31:09.127] } [13:31:09.127] } [13:31:09.127] invisible(muffled) [13:31:09.127] } [13:31:09.127] muffleCondition(cond, pattern = "^muffle") [13:31:09.127] } [13:31:09.127] } [13:31:09.127] } [13:31:09.127] })) [13:31:09.127] }, error = function(ex) { [13:31:09.127] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.127] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.127] ...future.rng), started = ...future.startTime, [13:31:09.127] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.127] version = "1.8"), class = "FutureResult") [13:31:09.127] }, finally = { [13:31:09.127] if (!identical(...future.workdir, getwd())) [13:31:09.127] setwd(...future.workdir) [13:31:09.127] { [13:31:09.127] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.127] ...future.oldOptions$nwarnings <- NULL [13:31:09.127] } [13:31:09.127] base::options(...future.oldOptions) [13:31:09.127] if (.Platform$OS.type == "windows") { [13:31:09.127] old_names <- names(...future.oldEnvVars) [13:31:09.127] envs <- base::Sys.getenv() [13:31:09.127] names <- names(envs) [13:31:09.127] common <- intersect(names, old_names) [13:31:09.127] added <- setdiff(names, old_names) [13:31:09.127] removed <- setdiff(old_names, names) [13:31:09.127] changed <- common[...future.oldEnvVars[common] != [13:31:09.127] envs[common]] [13:31:09.127] NAMES <- toupper(changed) [13:31:09.127] args <- list() [13:31:09.127] for (kk in seq_along(NAMES)) { [13:31:09.127] name <- changed[[kk]] [13:31:09.127] NAME <- NAMES[[kk]] [13:31:09.127] if (name != NAME && is.element(NAME, old_names)) [13:31:09.127] next [13:31:09.127] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.127] } [13:31:09.127] NAMES <- toupper(added) [13:31:09.127] for (kk in seq_along(NAMES)) { [13:31:09.127] name <- added[[kk]] [13:31:09.127] NAME <- NAMES[[kk]] [13:31:09.127] if (name != NAME && is.element(NAME, old_names)) [13:31:09.127] next [13:31:09.127] args[[name]] <- "" [13:31:09.127] } [13:31:09.127] NAMES <- toupper(removed) [13:31:09.127] for (kk in seq_along(NAMES)) { [13:31:09.127] name <- removed[[kk]] [13:31:09.127] NAME <- NAMES[[kk]] [13:31:09.127] if (name != NAME && is.element(NAME, old_names)) [13:31:09.127] next [13:31:09.127] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.127] } [13:31:09.127] if (length(args) > 0) [13:31:09.127] base::do.call(base::Sys.setenv, args = args) [13:31:09.127] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.127] } [13:31:09.127] else { [13:31:09.127] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.127] } [13:31:09.127] { [13:31:09.127] if (base::length(...future.futureOptionsAdded) > [13:31:09.127] 0L) { [13:31:09.127] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.127] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.127] base::options(opts) [13:31:09.127] } [13:31:09.127] { [13:31:09.127] NULL [13:31:09.127] options(future.plan = NULL) [13:31:09.127] if (is.na(NA_character_)) [13:31:09.127] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.127] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.127] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.127] .init = FALSE) [13:31:09.127] } [13:31:09.127] } [13:31:09.127] } [13:31:09.127] }) [13:31:09.127] if (TRUE) { [13:31:09.127] base::sink(type = "output", split = FALSE) [13:31:09.127] if (TRUE) { [13:31:09.127] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.127] } [13:31:09.127] else { [13:31:09.127] ...future.result["stdout"] <- base::list(NULL) [13:31:09.127] } [13:31:09.127] base::close(...future.stdout) [13:31:09.127] ...future.stdout <- NULL [13:31:09.127] } [13:31:09.127] ...future.result$conditions <- ...future.conditions [13:31:09.127] ...future.result$finished <- base::Sys.time() [13:31:09.127] ...future.result [13:31:09.127] } [13:31:09.229] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:31:09.229] plan(): nbrOfWorkers() = 2 > library("listenv") > > plan(mirai_multisession) [13:31:09.234] plan(): Setting new future strategy stack: [13:31:09.234] List of future strategies: [13:31:09.234] 1. mirai_multisession: [13:31:09.234] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:31:09.234] - tweaked: FALSE [13:31:09.234] - call: plan(mirai_multisession) [13:31:09.247] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:31:09.247] < mirai | $data > [13:31:09.250] getGlobalsAndPackages() ... [13:31:09.250] Not searching for globals [13:31:09.250] - globals: [0] [13:31:09.250] getGlobalsAndPackages() ... DONE [13:31:09.250] getGlobalsAndPackages() ... [13:31:09.250] [13:31:09.251] - globals: [0] [13:31:09.251] getGlobalsAndPackages() ... DONE [13:31:09.251] Packages needed by the future expression (n = 0): [13:31:09.251] Packages needed by future strategies (n = 0): [13:31:09.252] { [13:31:09.252] { [13:31:09.252] { [13:31:09.252] ...future.startTime <- base::Sys.time() [13:31:09.252] { [13:31:09.252] { [13:31:09.252] { [13:31:09.252] base::local({ [13:31:09.252] has_future <- base::requireNamespace("future", [13:31:09.252] quietly = TRUE) [13:31:09.252] if (has_future) { [13:31:09.252] ns <- base::getNamespace("future") [13:31:09.252] version <- ns[[".package"]][["version"]] [13:31:09.252] if (is.null(version)) [13:31:09.252] version <- utils::packageVersion("future") [13:31:09.252] } [13:31:09.252] else { [13:31:09.252] version <- NULL [13:31:09.252] } [13:31:09.252] if (!has_future || version < "1.8.0") { [13:31:09.252] info <- base::c(r_version = base::gsub("R version ", [13:31:09.252] "", base::R.version$version.string), [13:31:09.252] platform = base::sprintf("%s (%s-bit)", [13:31:09.252] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.252] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.252] "release", "version")], collapse = " "), [13:31:09.252] hostname = base::Sys.info()[["nodename"]]) [13:31:09.252] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.252] info) [13:31:09.252] info <- base::paste(info, collapse = "; ") [13:31:09.252] if (!has_future) { [13:31:09.252] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.252] info) [13:31:09.252] } [13:31:09.252] else { [13:31:09.252] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.252] info, version) [13:31:09.252] } [13:31:09.252] base::stop(msg) [13:31:09.252] } [13:31:09.252] }) [13:31:09.252] } [13:31:09.252] ...future.strategy.old <- future::plan("list") [13:31:09.252] options(future.plan = NULL) [13:31:09.252] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.252] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.252] } [13:31:09.252] ...future.workdir <- getwd() [13:31:09.252] } [13:31:09.252] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.252] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.252] } [13:31:09.252] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.252] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.252] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.252] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.252] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.252] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.252] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.252] base::names(...future.oldOptions)) [13:31:09.252] } [13:31:09.252] if (FALSE) { [13:31:09.252] } [13:31:09.252] else { [13:31:09.252] if (TRUE) { [13:31:09.252] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.252] open = "w") [13:31:09.252] } [13:31:09.252] else { [13:31:09.252] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.252] windows = "NUL", "/dev/null"), open = "w") [13:31:09.252] } [13:31:09.252] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.252] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.252] base::sink(type = "output", split = FALSE) [13:31:09.252] base::close(...future.stdout) [13:31:09.252] }, add = TRUE) [13:31:09.252] } [13:31:09.252] ...future.frame <- base::sys.nframe() [13:31:09.252] ...future.conditions <- base::list() [13:31:09.252] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.252] if (FALSE) { [13:31:09.252] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.252] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.252] } [13:31:09.252] ...future.result <- base::tryCatch({ [13:31:09.252] base::withCallingHandlers({ [13:31:09.252] ...future.value <- base::withVisible(base::local(NA)) [13:31:09.252] future::FutureResult(value = ...future.value$value, [13:31:09.252] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.252] ...future.rng), globalenv = if (FALSE) [13:31:09.252] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.252] ...future.globalenv.names)) [13:31:09.252] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.252] }, condition = base::local({ [13:31:09.252] c <- base::c [13:31:09.252] inherits <- base::inherits [13:31:09.252] invokeRestart <- base::invokeRestart [13:31:09.252] length <- base::length [13:31:09.252] list <- base::list [13:31:09.252] seq.int <- base::seq.int [13:31:09.252] signalCondition <- base::signalCondition [13:31:09.252] sys.calls <- base::sys.calls [13:31:09.252] `[[` <- base::`[[` [13:31:09.252] `+` <- base::`+` [13:31:09.252] `<<-` <- base::`<<-` [13:31:09.252] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.252] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.252] 3L)] [13:31:09.252] } [13:31:09.252] function(cond) { [13:31:09.252] is_error <- inherits(cond, "error") [13:31:09.252] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.252] NULL) [13:31:09.252] if (is_error) { [13:31:09.252] sessionInformation <- function() { [13:31:09.252] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.252] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.252] search = base::search(), system = base::Sys.info()) [13:31:09.252] } [13:31:09.252] ...future.conditions[[length(...future.conditions) + [13:31:09.252] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.252] cond$call), session = sessionInformation(), [13:31:09.252] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.252] signalCondition(cond) [13:31:09.252] } [13:31:09.252] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.252] signal <- FALSE && inherits(cond, character(0)) [13:31:09.252] ...future.conditions[[length(...future.conditions) + [13:31:09.252] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.252] if (FALSE && !signal) { [13:31:09.252] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.252] { [13:31:09.252] inherits <- base::inherits [13:31:09.252] invokeRestart <- base::invokeRestart [13:31:09.252] is.null <- base::is.null [13:31:09.252] muffled <- FALSE [13:31:09.252] if (inherits(cond, "message")) { [13:31:09.252] muffled <- grepl(pattern, "muffleMessage") [13:31:09.252] if (muffled) [13:31:09.252] invokeRestart("muffleMessage") [13:31:09.252] } [13:31:09.252] else if (inherits(cond, "warning")) { [13:31:09.252] muffled <- grepl(pattern, "muffleWarning") [13:31:09.252] if (muffled) [13:31:09.252] invokeRestart("muffleWarning") [13:31:09.252] } [13:31:09.252] else if (inherits(cond, "condition")) { [13:31:09.252] if (!is.null(pattern)) { [13:31:09.252] computeRestarts <- base::computeRestarts [13:31:09.252] grepl <- base::grepl [13:31:09.252] restarts <- computeRestarts(cond) [13:31:09.252] for (restart in restarts) { [13:31:09.252] name <- restart$name [13:31:09.252] if (is.null(name)) [13:31:09.252] next [13:31:09.252] if (!grepl(pattern, name)) [13:31:09.252] next [13:31:09.252] invokeRestart(restart) [13:31:09.252] muffled <- TRUE [13:31:09.252] break [13:31:09.252] } [13:31:09.252] } [13:31:09.252] } [13:31:09.252] invisible(muffled) [13:31:09.252] } [13:31:09.252] muffleCondition(cond, pattern = "^muffle") [13:31:09.252] } [13:31:09.252] } [13:31:09.252] else { [13:31:09.252] if (TRUE) { [13:31:09.252] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.252] { [13:31:09.252] inherits <- base::inherits [13:31:09.252] invokeRestart <- base::invokeRestart [13:31:09.252] is.null <- base::is.null [13:31:09.252] muffled <- FALSE [13:31:09.252] if (inherits(cond, "message")) { [13:31:09.252] muffled <- grepl(pattern, "muffleMessage") [13:31:09.252] if (muffled) [13:31:09.252] invokeRestart("muffleMessage") [13:31:09.252] } [13:31:09.252] else if (inherits(cond, "warning")) { [13:31:09.252] muffled <- grepl(pattern, "muffleWarning") [13:31:09.252] if (muffled) [13:31:09.252] invokeRestart("muffleWarning") [13:31:09.252] } [13:31:09.252] else if (inherits(cond, "condition")) { [13:31:09.252] if (!is.null(pattern)) { [13:31:09.252] computeRestarts <- base::computeRestarts [13:31:09.252] grepl <- base::grepl [13:31:09.252] restarts <- computeRestarts(cond) [13:31:09.252] for (restart in restarts) { [13:31:09.252] name <- restart$name [13:31:09.252] if (is.null(name)) [13:31:09.252] next [13:31:09.252] if (!grepl(pattern, name)) [13:31:09.252] next [13:31:09.252] invokeRestart(restart) [13:31:09.252] muffled <- TRUE [13:31:09.252] break [13:31:09.252] } [13:31:09.252] } [13:31:09.252] } [13:31:09.252] invisible(muffled) [13:31:09.252] } [13:31:09.252] muffleCondition(cond, pattern = "^muffle") [13:31:09.252] } [13:31:09.252] } [13:31:09.252] } [13:31:09.252] })) [13:31:09.252] }, error = function(ex) { [13:31:09.252] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.252] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.252] ...future.rng), started = ...future.startTime, [13:31:09.252] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.252] version = "1.8"), class = "FutureResult") [13:31:09.252] }, finally = { [13:31:09.252] if (!identical(...future.workdir, getwd())) [13:31:09.252] setwd(...future.workdir) [13:31:09.252] { [13:31:09.252] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.252] ...future.oldOptions$nwarnings <- NULL [13:31:09.252] } [13:31:09.252] base::options(...future.oldOptions) [13:31:09.252] if (.Platform$OS.type == "windows") { [13:31:09.252] old_names <- names(...future.oldEnvVars) [13:31:09.252] envs <- base::Sys.getenv() [13:31:09.252] names <- names(envs) [13:31:09.252] common <- intersect(names, old_names) [13:31:09.252] added <- setdiff(names, old_names) [13:31:09.252] removed <- setdiff(old_names, names) [13:31:09.252] changed <- common[...future.oldEnvVars[common] != [13:31:09.252] envs[common]] [13:31:09.252] NAMES <- toupper(changed) [13:31:09.252] args <- list() [13:31:09.252] for (kk in seq_along(NAMES)) { [13:31:09.252] name <- changed[[kk]] [13:31:09.252] NAME <- NAMES[[kk]] [13:31:09.252] if (name != NAME && is.element(NAME, old_names)) [13:31:09.252] next [13:31:09.252] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.252] } [13:31:09.252] NAMES <- toupper(added) [13:31:09.252] for (kk in seq_along(NAMES)) { [13:31:09.252] name <- added[[kk]] [13:31:09.252] NAME <- NAMES[[kk]] [13:31:09.252] if (name != NAME && is.element(NAME, old_names)) [13:31:09.252] next [13:31:09.252] args[[name]] <- "" [13:31:09.252] } [13:31:09.252] NAMES <- toupper(removed) [13:31:09.252] for (kk in seq_along(NAMES)) { [13:31:09.252] name <- removed[[kk]] [13:31:09.252] NAME <- NAMES[[kk]] [13:31:09.252] if (name != NAME && is.element(NAME, old_names)) [13:31:09.252] next [13:31:09.252] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.252] } [13:31:09.252] if (length(args) > 0) [13:31:09.252] base::do.call(base::Sys.setenv, args = args) [13:31:09.252] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.252] } [13:31:09.252] else { [13:31:09.252] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.252] } [13:31:09.252] { [13:31:09.252] if (base::length(...future.futureOptionsAdded) > [13:31:09.252] 0L) { [13:31:09.252] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.252] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.252] base::options(opts) [13:31:09.252] } [13:31:09.252] { [13:31:09.252] NULL [13:31:09.252] options(future.plan = NULL) [13:31:09.252] if (is.na(NA_character_)) [13:31:09.252] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.252] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.252] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.252] .init = FALSE) [13:31:09.252] } [13:31:09.252] } [13:31:09.252] } [13:31:09.252] }) [13:31:09.252] if (TRUE) { [13:31:09.252] base::sink(type = "output", split = FALSE) [13:31:09.252] if (TRUE) { [13:31:09.252] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.252] } [13:31:09.252] else { [13:31:09.252] ...future.result["stdout"] <- base::list(NULL) [13:31:09.252] } [13:31:09.252] base::close(...future.stdout) [13:31:09.252] ...future.stdout <- NULL [13:31:09.252] } [13:31:09.252] ...future.result$conditions <- ...future.conditions [13:31:09.252] ...future.result$finished <- base::Sys.time() [13:31:09.252] ...future.result [13:31:09.252] } [13:31:09.353] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:31:09.353] plan(): nbrOfWorkers() = 2 > > message("*** Tricky use cases related to globals ...") *** Tricky use cases related to globals ... > > message("- Globals with the same name as 'base' objects ...") - Globals with the same name as 'base' objects ... > > ## 'col' is masked by 'base::col' (Issue #55) > > col <- 3 > x %<-% { stopifnot(is.numeric(col)); col } [13:31:09.355] getGlobalsAndPackages() ... [13:31:09.355] Searching for globals... [13:31:09.364] - globals found: [4] '{', 'stopifnot', 'is.numeric', 'col' [13:31:09.364] Searching for globals ... DONE [13:31:09.364] Resolving globals: FALSE [13:31:09.365] The total size of the 1 globals is 56 bytes (56 bytes) [13:31:09.366] The total size of the 1 globals exported for future expression ('{; stopifnot(is.numeric(col)); col; }') is 56 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There is one global: 'col' (56 bytes of class 'numeric') [13:31:09.366] - globals: [1] 'col' [13:31:09.366] [13:31:09.366] getGlobalsAndPackages() ... DONE [13:31:09.367] run() for 'Future' ... [13:31:09.367] - state: 'created' [13:31:09.367] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.370] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.370] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.370] - Field: 'label' [13:31:09.370] - Field: 'local' [13:31:09.370] - Field: 'owner' [13:31:09.371] - Field: 'envir' [13:31:09.371] - Field: 'packages' [13:31:09.371] - Field: 'gc' [13:31:09.371] - Field: 'conditions' [13:31:09.371] - Field: 'expr' [13:31:09.371] - Field: 'uuid' [13:31:09.372] - Field: 'seed' [13:31:09.372] - Field: 'version' [13:31:09.372] - Field: 'result' [13:31:09.372] - Field: 'asynchronous' [13:31:09.372] - Field: 'calls' [13:31:09.373] - Field: 'globals' [13:31:09.373] - Field: 'stdout' [13:31:09.373] - Field: 'earlySignal' [13:31:09.373] - Field: 'lazy' [13:31:09.373] - Field: 'state' [13:31:09.373] - Field: '.cluster' [13:31:09.374] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.374] - Launch lazy future ... [13:31:09.374] Packages needed by the future expression (n = 0): [13:31:09.374] Packages needed by future strategies (n = 0): [13:31:09.375] { [13:31:09.375] { [13:31:09.375] { [13:31:09.375] ...future.startTime <- base::Sys.time() [13:31:09.375] { [13:31:09.375] { [13:31:09.375] { [13:31:09.375] base::local({ [13:31:09.375] has_future <- base::requireNamespace("future", [13:31:09.375] quietly = TRUE) [13:31:09.375] if (has_future) { [13:31:09.375] ns <- base::getNamespace("future") [13:31:09.375] version <- ns[[".package"]][["version"]] [13:31:09.375] if (is.null(version)) [13:31:09.375] version <- utils::packageVersion("future") [13:31:09.375] } [13:31:09.375] else { [13:31:09.375] version <- NULL [13:31:09.375] } [13:31:09.375] if (!has_future || version < "1.8.0") { [13:31:09.375] info <- base::c(r_version = base::gsub("R version ", [13:31:09.375] "", base::R.version$version.string), [13:31:09.375] platform = base::sprintf("%s (%s-bit)", [13:31:09.375] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.375] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.375] "release", "version")], collapse = " "), [13:31:09.375] hostname = base::Sys.info()[["nodename"]]) [13:31:09.375] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.375] info) [13:31:09.375] info <- base::paste(info, collapse = "; ") [13:31:09.375] if (!has_future) { [13:31:09.375] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.375] info) [13:31:09.375] } [13:31:09.375] else { [13:31:09.375] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.375] info, version) [13:31:09.375] } [13:31:09.375] base::stop(msg) [13:31:09.375] } [13:31:09.375] }) [13:31:09.375] } [13:31:09.375] ...future.strategy.old <- future::plan("list") [13:31:09.375] options(future.plan = NULL) [13:31:09.375] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.375] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.375] } [13:31:09.375] ...future.workdir <- getwd() [13:31:09.375] } [13:31:09.375] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.375] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.375] } [13:31:09.375] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.375] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.375] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.375] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.375] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.375] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.375] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.375] base::names(...future.oldOptions)) [13:31:09.375] } [13:31:09.375] if (FALSE) { [13:31:09.375] } [13:31:09.375] else { [13:31:09.375] if (TRUE) { [13:31:09.375] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.375] open = "w") [13:31:09.375] } [13:31:09.375] else { [13:31:09.375] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.375] windows = "NUL", "/dev/null"), open = "w") [13:31:09.375] } [13:31:09.375] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.375] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.375] base::sink(type = "output", split = FALSE) [13:31:09.375] base::close(...future.stdout) [13:31:09.375] }, add = TRUE) [13:31:09.375] } [13:31:09.375] ...future.frame <- base::sys.nframe() [13:31:09.375] ...future.conditions <- base::list() [13:31:09.375] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.375] if (FALSE) { [13:31:09.375] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.375] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.375] } [13:31:09.375] ...future.result <- base::tryCatch({ [13:31:09.375] base::withCallingHandlers({ [13:31:09.375] ...future.value <- base::withVisible(base::local({ [13:31:09.375] stopifnot(is.numeric(col)) [13:31:09.375] col [13:31:09.375] })) [13:31:09.375] future::FutureResult(value = ...future.value$value, [13:31:09.375] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.375] ...future.rng), globalenv = if (FALSE) [13:31:09.375] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.375] ...future.globalenv.names)) [13:31:09.375] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.375] }, condition = base::local({ [13:31:09.375] c <- base::c [13:31:09.375] inherits <- base::inherits [13:31:09.375] invokeRestart <- base::invokeRestart [13:31:09.375] length <- base::length [13:31:09.375] list <- base::list [13:31:09.375] seq.int <- base::seq.int [13:31:09.375] signalCondition <- base::signalCondition [13:31:09.375] sys.calls <- base::sys.calls [13:31:09.375] `[[` <- base::`[[` [13:31:09.375] `+` <- base::`+` [13:31:09.375] `<<-` <- base::`<<-` [13:31:09.375] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.375] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.375] 3L)] [13:31:09.375] } [13:31:09.375] function(cond) { [13:31:09.375] is_error <- inherits(cond, "error") [13:31:09.375] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.375] NULL) [13:31:09.375] if (is_error) { [13:31:09.375] sessionInformation <- function() { [13:31:09.375] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.375] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.375] search = base::search(), system = base::Sys.info()) [13:31:09.375] } [13:31:09.375] ...future.conditions[[length(...future.conditions) + [13:31:09.375] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.375] cond$call), session = sessionInformation(), [13:31:09.375] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.375] signalCondition(cond) [13:31:09.375] } [13:31:09.375] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.375] signal <- FALSE && inherits(cond, character(0)) [13:31:09.375] ...future.conditions[[length(...future.conditions) + [13:31:09.375] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.375] if (FALSE && !signal) { [13:31:09.375] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.375] { [13:31:09.375] inherits <- base::inherits [13:31:09.375] invokeRestart <- base::invokeRestart [13:31:09.375] is.null <- base::is.null [13:31:09.375] muffled <- FALSE [13:31:09.375] if (inherits(cond, "message")) { [13:31:09.375] muffled <- grepl(pattern, "muffleMessage") [13:31:09.375] if (muffled) [13:31:09.375] invokeRestart("muffleMessage") [13:31:09.375] } [13:31:09.375] else if (inherits(cond, "warning")) { [13:31:09.375] muffled <- grepl(pattern, "muffleWarning") [13:31:09.375] if (muffled) [13:31:09.375] invokeRestart("muffleWarning") [13:31:09.375] } [13:31:09.375] else if (inherits(cond, "condition")) { [13:31:09.375] if (!is.null(pattern)) { [13:31:09.375] computeRestarts <- base::computeRestarts [13:31:09.375] grepl <- base::grepl [13:31:09.375] restarts <- computeRestarts(cond) [13:31:09.375] for (restart in restarts) { [13:31:09.375] name <- restart$name [13:31:09.375] if (is.null(name)) [13:31:09.375] next [13:31:09.375] if (!grepl(pattern, name)) [13:31:09.375] next [13:31:09.375] invokeRestart(restart) [13:31:09.375] muffled <- TRUE [13:31:09.375] break [13:31:09.375] } [13:31:09.375] } [13:31:09.375] } [13:31:09.375] invisible(muffled) [13:31:09.375] } [13:31:09.375] muffleCondition(cond, pattern = "^muffle") [13:31:09.375] } [13:31:09.375] } [13:31:09.375] else { [13:31:09.375] if (TRUE) { [13:31:09.375] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.375] { [13:31:09.375] inherits <- base::inherits [13:31:09.375] invokeRestart <- base::invokeRestart [13:31:09.375] is.null <- base::is.null [13:31:09.375] muffled <- FALSE [13:31:09.375] if (inherits(cond, "message")) { [13:31:09.375] muffled <- grepl(pattern, "muffleMessage") [13:31:09.375] if (muffled) [13:31:09.375] invokeRestart("muffleMessage") [13:31:09.375] } [13:31:09.375] else if (inherits(cond, "warning")) { [13:31:09.375] muffled <- grepl(pattern, "muffleWarning") [13:31:09.375] if (muffled) [13:31:09.375] invokeRestart("muffleWarning") [13:31:09.375] } [13:31:09.375] else if (inherits(cond, "condition")) { [13:31:09.375] if (!is.null(pattern)) { [13:31:09.375] computeRestarts <- base::computeRestarts [13:31:09.375] grepl <- base::grepl [13:31:09.375] restarts <- computeRestarts(cond) [13:31:09.375] for (restart in restarts) { [13:31:09.375] name <- restart$name [13:31:09.375] if (is.null(name)) [13:31:09.375] next [13:31:09.375] if (!grepl(pattern, name)) [13:31:09.375] next [13:31:09.375] invokeRestart(restart) [13:31:09.375] muffled <- TRUE [13:31:09.375] break [13:31:09.375] } [13:31:09.375] } [13:31:09.375] } [13:31:09.375] invisible(muffled) [13:31:09.375] } [13:31:09.375] muffleCondition(cond, pattern = "^muffle") [13:31:09.375] } [13:31:09.375] } [13:31:09.375] } [13:31:09.375] })) [13:31:09.375] }, error = function(ex) { [13:31:09.375] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.375] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.375] ...future.rng), started = ...future.startTime, [13:31:09.375] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.375] version = "1.8"), class = "FutureResult") [13:31:09.375] }, finally = { [13:31:09.375] if (!identical(...future.workdir, getwd())) [13:31:09.375] setwd(...future.workdir) [13:31:09.375] { [13:31:09.375] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.375] ...future.oldOptions$nwarnings <- NULL [13:31:09.375] } [13:31:09.375] base::options(...future.oldOptions) [13:31:09.375] if (.Platform$OS.type == "windows") { [13:31:09.375] old_names <- names(...future.oldEnvVars) [13:31:09.375] envs <- base::Sys.getenv() [13:31:09.375] names <- names(envs) [13:31:09.375] common <- intersect(names, old_names) [13:31:09.375] added <- setdiff(names, old_names) [13:31:09.375] removed <- setdiff(old_names, names) [13:31:09.375] changed <- common[...future.oldEnvVars[common] != [13:31:09.375] envs[common]] [13:31:09.375] NAMES <- toupper(changed) [13:31:09.375] args <- list() [13:31:09.375] for (kk in seq_along(NAMES)) { [13:31:09.375] name <- changed[[kk]] [13:31:09.375] NAME <- NAMES[[kk]] [13:31:09.375] if (name != NAME && is.element(NAME, old_names)) [13:31:09.375] next [13:31:09.375] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.375] } [13:31:09.375] NAMES <- toupper(added) [13:31:09.375] for (kk in seq_along(NAMES)) { [13:31:09.375] name <- added[[kk]] [13:31:09.375] NAME <- NAMES[[kk]] [13:31:09.375] if (name != NAME && is.element(NAME, old_names)) [13:31:09.375] next [13:31:09.375] args[[name]] <- "" [13:31:09.375] } [13:31:09.375] NAMES <- toupper(removed) [13:31:09.375] for (kk in seq_along(NAMES)) { [13:31:09.375] name <- removed[[kk]] [13:31:09.375] NAME <- NAMES[[kk]] [13:31:09.375] if (name != NAME && is.element(NAME, old_names)) [13:31:09.375] next [13:31:09.375] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.375] } [13:31:09.375] if (length(args) > 0) [13:31:09.375] base::do.call(base::Sys.setenv, args = args) [13:31:09.375] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.375] } [13:31:09.375] else { [13:31:09.375] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.375] } [13:31:09.375] { [13:31:09.375] if (base::length(...future.futureOptionsAdded) > [13:31:09.375] 0L) { [13:31:09.375] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.375] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.375] base::options(opts) [13:31:09.375] } [13:31:09.375] { [13:31:09.375] NULL [13:31:09.375] options(future.plan = NULL) [13:31:09.375] if (is.na(NA_character_)) [13:31:09.375] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.375] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.375] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.375] .init = FALSE) [13:31:09.375] } [13:31:09.375] } [13:31:09.375] } [13:31:09.375] }) [13:31:09.375] if (TRUE) { [13:31:09.375] base::sink(type = "output", split = FALSE) [13:31:09.375] if (TRUE) { [13:31:09.375] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.375] } [13:31:09.375] else { [13:31:09.375] ...future.result["stdout"] <- base::list(NULL) [13:31:09.375] } [13:31:09.375] base::close(...future.stdout) [13:31:09.375] ...future.stdout <- NULL [13:31:09.375] } [13:31:09.375] ...future.result$conditions <- ...future.conditions [13:31:09.375] ...future.result$finished <- base::Sys.time() [13:31:09.375] ...future.result [13:31:09.375] } [13:31:09.378] - Launch lazy future ... done [13:31:09.379] run() for 'MiraiFuture' ... done > print(x) [1] 3 > stopifnot(x == col) > > message("- flapply(x, FUN = base::vector, ...) ...") - flapply(x, FUN = base::vector, ...) ... > > flapply <- function(x, FUN, ...) { + res <- listenv() + for (ii in seq_along(x)) { + res[[ii]] %<-% FUN(x[[ii]], ...) + } + names(res) <- names(x) + + ## Make sure 'x', 'FUN' and 'ii' are truly + ## exported to the future environment + rm(list = c("x", "FUN", "ii")) + + as.list(res) + } > > x <- list(a = "integer", b = "numeric", c = "character", c = "list") > str(list(x = x)) List of 1 $ x:List of 4 ..$ a: chr "integer" ..$ b: chr "numeric" ..$ c: chr "character" ..$ c: chr "list" > > y0 <- lapply(x, FUN = base::vector, length = 2L) > str(list(y0 = y0)) List of 1 $ y0:List of 4 ..$ a: int [1:2] 0 0 ..$ b: num [1:2] 0 0 ..$ c: chr [1:2] "" "" ..$ c:List of 2 .. ..$ : NULL .. ..$ : NULL > > y <- flapply(x, FUN = base::vector, length = 2L) [13:31:09.393] getGlobalsAndPackages() ... [13:31:09.393] Searching for globals... [13:31:09.397] - globals found: [6] 'FUN', '[[', 'x', 'ii', '...', '.Internal' [13:31:09.397] Searching for globals ... DONE [13:31:09.398] Resolving globals: FALSE [13:31:09.398] Tweak future expression to call with '...' arguments ... [13:31:09.398] { [13:31:09.398] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:09.398] } [13:31:09.398] Tweak future expression to call with '...' arguments ... DONE [13:31:09.399] The total size of the 4 globals is 2.69 KiB (2752 bytes) [13:31:09.400] The total size of the 4 globals exported for future expression ('FUN(x[[ii]], ...)') is 2.69 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'FUN' (2.13 KiB of class 'function'), 'x' (456 bytes of class 'list') and 'ii' (56 bytes of class 'numeric') [13:31:09.400] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:31:09.400] [13:31:09.400] getGlobalsAndPackages() ... DONE [13:31:09.401] run() for 'Future' ... [13:31:09.401] - state: 'created' [13:31:09.401] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.403] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.403] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.404] - Field: 'label' [13:31:09.404] - Field: 'local' [13:31:09.404] - Field: 'owner' [13:31:09.404] - Field: 'envir' [13:31:09.404] - Field: 'packages' [13:31:09.404] - Field: 'gc' [13:31:09.405] - Field: 'conditions' [13:31:09.405] - Field: 'expr' [13:31:09.405] - Field: 'uuid' [13:31:09.405] - Field: 'seed' [13:31:09.405] - Field: 'version' [13:31:09.405] - Field: 'result' [13:31:09.406] - Field: 'asynchronous' [13:31:09.406] - Field: 'calls' [13:31:09.406] - Field: 'globals' [13:31:09.406] - Field: 'stdout' [13:31:09.406] - Field: 'earlySignal' [13:31:09.406] - Field: 'lazy' [13:31:09.407] - Field: 'state' [13:31:09.407] - Field: '.cluster' [13:31:09.407] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.407] - Launch lazy future ... [13:31:09.407] Packages needed by the future expression (n = 0): [13:31:09.407] Packages needed by future strategies (n = 0): [13:31:09.408] { [13:31:09.408] { [13:31:09.408] { [13:31:09.408] ...future.startTime <- base::Sys.time() [13:31:09.408] { [13:31:09.408] { [13:31:09.408] { [13:31:09.408] base::local({ [13:31:09.408] has_future <- base::requireNamespace("future", [13:31:09.408] quietly = TRUE) [13:31:09.408] if (has_future) { [13:31:09.408] ns <- base::getNamespace("future") [13:31:09.408] version <- ns[[".package"]][["version"]] [13:31:09.408] if (is.null(version)) [13:31:09.408] version <- utils::packageVersion("future") [13:31:09.408] } [13:31:09.408] else { [13:31:09.408] version <- NULL [13:31:09.408] } [13:31:09.408] if (!has_future || version < "1.8.0") { [13:31:09.408] info <- base::c(r_version = base::gsub("R version ", [13:31:09.408] "", base::R.version$version.string), [13:31:09.408] platform = base::sprintf("%s (%s-bit)", [13:31:09.408] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.408] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.408] "release", "version")], collapse = " "), [13:31:09.408] hostname = base::Sys.info()[["nodename"]]) [13:31:09.408] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.408] info) [13:31:09.408] info <- base::paste(info, collapse = "; ") [13:31:09.408] if (!has_future) { [13:31:09.408] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.408] info) [13:31:09.408] } [13:31:09.408] else { [13:31:09.408] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.408] info, version) [13:31:09.408] } [13:31:09.408] base::stop(msg) [13:31:09.408] } [13:31:09.408] }) [13:31:09.408] } [13:31:09.408] ...future.strategy.old <- future::plan("list") [13:31:09.408] options(future.plan = NULL) [13:31:09.408] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.408] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.408] } [13:31:09.408] ...future.workdir <- getwd() [13:31:09.408] } [13:31:09.408] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.408] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.408] } [13:31:09.408] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.408] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.408] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.408] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.408] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.408] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.408] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.408] base::names(...future.oldOptions)) [13:31:09.408] } [13:31:09.408] if (FALSE) { [13:31:09.408] } [13:31:09.408] else { [13:31:09.408] if (TRUE) { [13:31:09.408] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.408] open = "w") [13:31:09.408] } [13:31:09.408] else { [13:31:09.408] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.408] windows = "NUL", "/dev/null"), open = "w") [13:31:09.408] } [13:31:09.408] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.408] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.408] base::sink(type = "output", split = FALSE) [13:31:09.408] base::close(...future.stdout) [13:31:09.408] }, add = TRUE) [13:31:09.408] } [13:31:09.408] ...future.frame <- base::sys.nframe() [13:31:09.408] ...future.conditions <- base::list() [13:31:09.408] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.408] if (FALSE) { [13:31:09.408] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.408] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.408] } [13:31:09.408] ...future.result <- base::tryCatch({ [13:31:09.408] base::withCallingHandlers({ [13:31:09.408] ...future.value <- base::withVisible(base::local({ [13:31:09.408] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:09.408] })) [13:31:09.408] future::FutureResult(value = ...future.value$value, [13:31:09.408] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.408] ...future.rng), globalenv = if (FALSE) [13:31:09.408] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.408] ...future.globalenv.names)) [13:31:09.408] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.408] }, condition = base::local({ [13:31:09.408] c <- base::c [13:31:09.408] inherits <- base::inherits [13:31:09.408] invokeRestart <- base::invokeRestart [13:31:09.408] length <- base::length [13:31:09.408] list <- base::list [13:31:09.408] seq.int <- base::seq.int [13:31:09.408] signalCondition <- base::signalCondition [13:31:09.408] sys.calls <- base::sys.calls [13:31:09.408] `[[` <- base::`[[` [13:31:09.408] `+` <- base::`+` [13:31:09.408] `<<-` <- base::`<<-` [13:31:09.408] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.408] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.408] 3L)] [13:31:09.408] } [13:31:09.408] function(cond) { [13:31:09.408] is_error <- inherits(cond, "error") [13:31:09.408] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.408] NULL) [13:31:09.408] if (is_error) { [13:31:09.408] sessionInformation <- function() { [13:31:09.408] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.408] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.408] search = base::search(), system = base::Sys.info()) [13:31:09.408] } [13:31:09.408] ...future.conditions[[length(...future.conditions) + [13:31:09.408] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.408] cond$call), session = sessionInformation(), [13:31:09.408] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.408] signalCondition(cond) [13:31:09.408] } [13:31:09.408] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.408] signal <- FALSE && inherits(cond, character(0)) [13:31:09.408] ...future.conditions[[length(...future.conditions) + [13:31:09.408] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.408] if (FALSE && !signal) { [13:31:09.408] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.408] { [13:31:09.408] inherits <- base::inherits [13:31:09.408] invokeRestart <- base::invokeRestart [13:31:09.408] is.null <- base::is.null [13:31:09.408] muffled <- FALSE [13:31:09.408] if (inherits(cond, "message")) { [13:31:09.408] muffled <- grepl(pattern, "muffleMessage") [13:31:09.408] if (muffled) [13:31:09.408] invokeRestart("muffleMessage") [13:31:09.408] } [13:31:09.408] else if (inherits(cond, "warning")) { [13:31:09.408] muffled <- grepl(pattern, "muffleWarning") [13:31:09.408] if (muffled) [13:31:09.408] invokeRestart("muffleWarning") [13:31:09.408] } [13:31:09.408] else if (inherits(cond, "condition")) { [13:31:09.408] if (!is.null(pattern)) { [13:31:09.408] computeRestarts <- base::computeRestarts [13:31:09.408] grepl <- base::grepl [13:31:09.408] restarts <- computeRestarts(cond) [13:31:09.408] for (restart in restarts) { [13:31:09.408] name <- restart$name [13:31:09.408] if (is.null(name)) [13:31:09.408] next [13:31:09.408] if (!grepl(pattern, name)) [13:31:09.408] next [13:31:09.408] invokeRestart(restart) [13:31:09.408] muffled <- TRUE [13:31:09.408] break [13:31:09.408] } [13:31:09.408] } [13:31:09.408] } [13:31:09.408] invisible(muffled) [13:31:09.408] } [13:31:09.408] muffleCondition(cond, pattern = "^muffle") [13:31:09.408] } [13:31:09.408] } [13:31:09.408] else { [13:31:09.408] if (TRUE) { [13:31:09.408] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.408] { [13:31:09.408] inherits <- base::inherits [13:31:09.408] invokeRestart <- base::invokeRestart [13:31:09.408] is.null <- base::is.null [13:31:09.408] muffled <- FALSE [13:31:09.408] if (inherits(cond, "message")) { [13:31:09.408] muffled <- grepl(pattern, "muffleMessage") [13:31:09.408] if (muffled) [13:31:09.408] invokeRestart("muffleMessage") [13:31:09.408] } [13:31:09.408] else if (inherits(cond, "warning")) { [13:31:09.408] muffled <- grepl(pattern, "muffleWarning") [13:31:09.408] if (muffled) [13:31:09.408] invokeRestart("muffleWarning") [13:31:09.408] } [13:31:09.408] else if (inherits(cond, "condition")) { [13:31:09.408] if (!is.null(pattern)) { [13:31:09.408] computeRestarts <- base::computeRestarts [13:31:09.408] grepl <- base::grepl [13:31:09.408] restarts <- computeRestarts(cond) [13:31:09.408] for (restart in restarts) { [13:31:09.408] name <- restart$name [13:31:09.408] if (is.null(name)) [13:31:09.408] next [13:31:09.408] if (!grepl(pattern, name)) [13:31:09.408] next [13:31:09.408] invokeRestart(restart) [13:31:09.408] muffled <- TRUE [13:31:09.408] break [13:31:09.408] } [13:31:09.408] } [13:31:09.408] } [13:31:09.408] invisible(muffled) [13:31:09.408] } [13:31:09.408] muffleCondition(cond, pattern = "^muffle") [13:31:09.408] } [13:31:09.408] } [13:31:09.408] } [13:31:09.408] })) [13:31:09.408] }, error = function(ex) { [13:31:09.408] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.408] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.408] ...future.rng), started = ...future.startTime, [13:31:09.408] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.408] version = "1.8"), class = "FutureResult") [13:31:09.408] }, finally = { [13:31:09.408] if (!identical(...future.workdir, getwd())) [13:31:09.408] setwd(...future.workdir) [13:31:09.408] { [13:31:09.408] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.408] ...future.oldOptions$nwarnings <- NULL [13:31:09.408] } [13:31:09.408] base::options(...future.oldOptions) [13:31:09.408] if (.Platform$OS.type == "windows") { [13:31:09.408] old_names <- names(...future.oldEnvVars) [13:31:09.408] envs <- base::Sys.getenv() [13:31:09.408] names <- names(envs) [13:31:09.408] common <- intersect(names, old_names) [13:31:09.408] added <- setdiff(names, old_names) [13:31:09.408] removed <- setdiff(old_names, names) [13:31:09.408] changed <- common[...future.oldEnvVars[common] != [13:31:09.408] envs[common]] [13:31:09.408] NAMES <- toupper(changed) [13:31:09.408] args <- list() [13:31:09.408] for (kk in seq_along(NAMES)) { [13:31:09.408] name <- changed[[kk]] [13:31:09.408] NAME <- NAMES[[kk]] [13:31:09.408] if (name != NAME && is.element(NAME, old_names)) [13:31:09.408] next [13:31:09.408] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.408] } [13:31:09.408] NAMES <- toupper(added) [13:31:09.408] for (kk in seq_along(NAMES)) { [13:31:09.408] name <- added[[kk]] [13:31:09.408] NAME <- NAMES[[kk]] [13:31:09.408] if (name != NAME && is.element(NAME, old_names)) [13:31:09.408] next [13:31:09.408] args[[name]] <- "" [13:31:09.408] } [13:31:09.408] NAMES <- toupper(removed) [13:31:09.408] for (kk in seq_along(NAMES)) { [13:31:09.408] name <- removed[[kk]] [13:31:09.408] NAME <- NAMES[[kk]] [13:31:09.408] if (name != NAME && is.element(NAME, old_names)) [13:31:09.408] next [13:31:09.408] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.408] } [13:31:09.408] if (length(args) > 0) [13:31:09.408] base::do.call(base::Sys.setenv, args = args) [13:31:09.408] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.408] } [13:31:09.408] else { [13:31:09.408] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.408] } [13:31:09.408] { [13:31:09.408] if (base::length(...future.futureOptionsAdded) > [13:31:09.408] 0L) { [13:31:09.408] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.408] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.408] base::options(opts) [13:31:09.408] } [13:31:09.408] { [13:31:09.408] NULL [13:31:09.408] options(future.plan = NULL) [13:31:09.408] if (is.na(NA_character_)) [13:31:09.408] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.408] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.408] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.408] .init = FALSE) [13:31:09.408] } [13:31:09.408] } [13:31:09.408] } [13:31:09.408] }) [13:31:09.408] if (TRUE) { [13:31:09.408] base::sink(type = "output", split = FALSE) [13:31:09.408] if (TRUE) { [13:31:09.408] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.408] } [13:31:09.408] else { [13:31:09.408] ...future.result["stdout"] <- base::list(NULL) [13:31:09.408] } [13:31:09.408] base::close(...future.stdout) [13:31:09.408] ...future.stdout <- NULL [13:31:09.408] } [13:31:09.408] ...future.result$conditions <- ...future.conditions [13:31:09.408] ...future.result$finished <- base::Sys.time() [13:31:09.408] ...future.result [13:31:09.408] } [13:31:09.412] - Launch lazy future ... done [13:31:09.412] run() for 'MiraiFuture' ... done [13:31:09.413] getGlobalsAndPackages() ... [13:31:09.413] Searching for globals... [13:31:09.415] - globals found: [6] 'FUN', '[[', 'x', 'ii', '...', '.Internal' [13:31:09.415] Searching for globals ... DONE [13:31:09.415] Resolving globals: FALSE [13:31:09.416] Tweak future expression to call with '...' arguments ... [13:31:09.416] { [13:31:09.416] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:09.416] } [13:31:09.416] Tweak future expression to call with '...' arguments ... DONE [13:31:09.417] The total size of the 4 globals is 2.69 KiB (2752 bytes) [13:31:09.417] The total size of the 4 globals exported for future expression ('FUN(x[[ii]], ...)') is 2.69 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'FUN' (2.13 KiB of class 'function'), 'x' (456 bytes of class 'list') and 'ii' (56 bytes of class 'numeric') [13:31:09.417] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:31:09.418] [13:31:09.418] getGlobalsAndPackages() ... DONE [13:31:09.418] run() for 'Future' ... [13:31:09.418] - state: 'created' [13:31:09.418] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.421] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.421] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.421] - Field: 'label' [13:31:09.421] - Field: 'local' [13:31:09.421] - Field: 'owner' [13:31:09.422] - Field: 'envir' [13:31:09.422] - Field: 'packages' [13:31:09.422] - Field: 'gc' [13:31:09.422] - Field: 'conditions' [13:31:09.422] - Field: 'expr' [13:31:09.422] - Field: 'uuid' [13:31:09.423] - Field: 'seed' [13:31:09.423] - Field: 'version' [13:31:09.423] - Field: 'result' [13:31:09.423] - Field: 'asynchronous' [13:31:09.423] - Field: 'calls' [13:31:09.423] - Field: 'globals' [13:31:09.424] - Field: 'stdout' [13:31:09.424] - Field: 'earlySignal' [13:31:09.424] - Field: 'lazy' [13:31:09.424] - Field: 'state' [13:31:09.424] - Field: '.cluster' [13:31:09.425] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.425] - Launch lazy future ... [13:31:09.425] Packages needed by the future expression (n = 0): [13:31:09.425] Packages needed by future strategies (n = 0): [13:31:09.426] { [13:31:09.426] { [13:31:09.426] { [13:31:09.426] ...future.startTime <- base::Sys.time() [13:31:09.426] { [13:31:09.426] { [13:31:09.426] { [13:31:09.426] base::local({ [13:31:09.426] has_future <- base::requireNamespace("future", [13:31:09.426] quietly = TRUE) [13:31:09.426] if (has_future) { [13:31:09.426] ns <- base::getNamespace("future") [13:31:09.426] version <- ns[[".package"]][["version"]] [13:31:09.426] if (is.null(version)) [13:31:09.426] version <- utils::packageVersion("future") [13:31:09.426] } [13:31:09.426] else { [13:31:09.426] version <- NULL [13:31:09.426] } [13:31:09.426] if (!has_future || version < "1.8.0") { [13:31:09.426] info <- base::c(r_version = base::gsub("R version ", [13:31:09.426] "", base::R.version$version.string), [13:31:09.426] platform = base::sprintf("%s (%s-bit)", [13:31:09.426] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.426] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.426] "release", "version")], collapse = " "), [13:31:09.426] hostname = base::Sys.info()[["nodename"]]) [13:31:09.426] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.426] info) [13:31:09.426] info <- base::paste(info, collapse = "; ") [13:31:09.426] if (!has_future) { [13:31:09.426] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.426] info) [13:31:09.426] } [13:31:09.426] else { [13:31:09.426] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.426] info, version) [13:31:09.426] } [13:31:09.426] base::stop(msg) [13:31:09.426] } [13:31:09.426] }) [13:31:09.426] } [13:31:09.426] ...future.strategy.old <- future::plan("list") [13:31:09.426] options(future.plan = NULL) [13:31:09.426] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.426] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.426] } [13:31:09.426] ...future.workdir <- getwd() [13:31:09.426] } [13:31:09.426] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.426] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.426] } [13:31:09.426] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.426] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.426] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.426] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.426] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.426] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.426] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.426] base::names(...future.oldOptions)) [13:31:09.426] } [13:31:09.426] if (FALSE) { [13:31:09.426] } [13:31:09.426] else { [13:31:09.426] if (TRUE) { [13:31:09.426] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.426] open = "w") [13:31:09.426] } [13:31:09.426] else { [13:31:09.426] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.426] windows = "NUL", "/dev/null"), open = "w") [13:31:09.426] } [13:31:09.426] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.426] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.426] base::sink(type = "output", split = FALSE) [13:31:09.426] base::close(...future.stdout) [13:31:09.426] }, add = TRUE) [13:31:09.426] } [13:31:09.426] ...future.frame <- base::sys.nframe() [13:31:09.426] ...future.conditions <- base::list() [13:31:09.426] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.426] if (FALSE) { [13:31:09.426] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.426] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.426] } [13:31:09.426] ...future.result <- base::tryCatch({ [13:31:09.426] base::withCallingHandlers({ [13:31:09.426] ...future.value <- base::withVisible(base::local({ [13:31:09.426] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:09.426] })) [13:31:09.426] future::FutureResult(value = ...future.value$value, [13:31:09.426] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.426] ...future.rng), globalenv = if (FALSE) [13:31:09.426] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.426] ...future.globalenv.names)) [13:31:09.426] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.426] }, condition = base::local({ [13:31:09.426] c <- base::c [13:31:09.426] inherits <- base::inherits [13:31:09.426] invokeRestart <- base::invokeRestart [13:31:09.426] length <- base::length [13:31:09.426] list <- base::list [13:31:09.426] seq.int <- base::seq.int [13:31:09.426] signalCondition <- base::signalCondition [13:31:09.426] sys.calls <- base::sys.calls [13:31:09.426] `[[` <- base::`[[` [13:31:09.426] `+` <- base::`+` [13:31:09.426] `<<-` <- base::`<<-` [13:31:09.426] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.426] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.426] 3L)] [13:31:09.426] } [13:31:09.426] function(cond) { [13:31:09.426] is_error <- inherits(cond, "error") [13:31:09.426] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.426] NULL) [13:31:09.426] if (is_error) { [13:31:09.426] sessionInformation <- function() { [13:31:09.426] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.426] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.426] search = base::search(), system = base::Sys.info()) [13:31:09.426] } [13:31:09.426] ...future.conditions[[length(...future.conditions) + [13:31:09.426] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.426] cond$call), session = sessionInformation(), [13:31:09.426] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.426] signalCondition(cond) [13:31:09.426] } [13:31:09.426] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.426] signal <- FALSE && inherits(cond, character(0)) [13:31:09.426] ...future.conditions[[length(...future.conditions) + [13:31:09.426] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.426] if (FALSE && !signal) { [13:31:09.426] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.426] { [13:31:09.426] inherits <- base::inherits [13:31:09.426] invokeRestart <- base::invokeRestart [13:31:09.426] is.null <- base::is.null [13:31:09.426] muffled <- FALSE [13:31:09.426] if (inherits(cond, "message")) { [13:31:09.426] muffled <- grepl(pattern, "muffleMessage") [13:31:09.426] if (muffled) [13:31:09.426] invokeRestart("muffleMessage") [13:31:09.426] } [13:31:09.426] else if (inherits(cond, "warning")) { [13:31:09.426] muffled <- grepl(pattern, "muffleWarning") [13:31:09.426] if (muffled) [13:31:09.426] invokeRestart("muffleWarning") [13:31:09.426] } [13:31:09.426] else if (inherits(cond, "condition")) { [13:31:09.426] if (!is.null(pattern)) { [13:31:09.426] computeRestarts <- base::computeRestarts [13:31:09.426] grepl <- base::grepl [13:31:09.426] restarts <- computeRestarts(cond) [13:31:09.426] for (restart in restarts) { [13:31:09.426] name <- restart$name [13:31:09.426] if (is.null(name)) [13:31:09.426] next [13:31:09.426] if (!grepl(pattern, name)) [13:31:09.426] next [13:31:09.426] invokeRestart(restart) [13:31:09.426] muffled <- TRUE [13:31:09.426] break [13:31:09.426] } [13:31:09.426] } [13:31:09.426] } [13:31:09.426] invisible(muffled) [13:31:09.426] } [13:31:09.426] muffleCondition(cond, pattern = "^muffle") [13:31:09.426] } [13:31:09.426] } [13:31:09.426] else { [13:31:09.426] if (TRUE) { [13:31:09.426] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.426] { [13:31:09.426] inherits <- base::inherits [13:31:09.426] invokeRestart <- base::invokeRestart [13:31:09.426] is.null <- base::is.null [13:31:09.426] muffled <- FALSE [13:31:09.426] if (inherits(cond, "message")) { [13:31:09.426] muffled <- grepl(pattern, "muffleMessage") [13:31:09.426] if (muffled) [13:31:09.426] invokeRestart("muffleMessage") [13:31:09.426] } [13:31:09.426] else if (inherits(cond, "warning")) { [13:31:09.426] muffled <- grepl(pattern, "muffleWarning") [13:31:09.426] if (muffled) [13:31:09.426] invokeRestart("muffleWarning") [13:31:09.426] } [13:31:09.426] else if (inherits(cond, "condition")) { [13:31:09.426] if (!is.null(pattern)) { [13:31:09.426] computeRestarts <- base::computeRestarts [13:31:09.426] grepl <- base::grepl [13:31:09.426] restarts <- computeRestarts(cond) [13:31:09.426] for (restart in restarts) { [13:31:09.426] name <- restart$name [13:31:09.426] if (is.null(name)) [13:31:09.426] next [13:31:09.426] if (!grepl(pattern, name)) [13:31:09.426] next [13:31:09.426] invokeRestart(restart) [13:31:09.426] muffled <- TRUE [13:31:09.426] break [13:31:09.426] } [13:31:09.426] } [13:31:09.426] } [13:31:09.426] invisible(muffled) [13:31:09.426] } [13:31:09.426] muffleCondition(cond, pattern = "^muffle") [13:31:09.426] } [13:31:09.426] } [13:31:09.426] } [13:31:09.426] })) [13:31:09.426] }, error = function(ex) { [13:31:09.426] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.426] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.426] ...future.rng), started = ...future.startTime, [13:31:09.426] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.426] version = "1.8"), class = "FutureResult") [13:31:09.426] }, finally = { [13:31:09.426] if (!identical(...future.workdir, getwd())) [13:31:09.426] setwd(...future.workdir) [13:31:09.426] { [13:31:09.426] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.426] ...future.oldOptions$nwarnings <- NULL [13:31:09.426] } [13:31:09.426] base::options(...future.oldOptions) [13:31:09.426] if (.Platform$OS.type == "windows") { [13:31:09.426] old_names <- names(...future.oldEnvVars) [13:31:09.426] envs <- base::Sys.getenv() [13:31:09.426] names <- names(envs) [13:31:09.426] common <- intersect(names, old_names) [13:31:09.426] added <- setdiff(names, old_names) [13:31:09.426] removed <- setdiff(old_names, names) [13:31:09.426] changed <- common[...future.oldEnvVars[common] != [13:31:09.426] envs[common]] [13:31:09.426] NAMES <- toupper(changed) [13:31:09.426] args <- list() [13:31:09.426] for (kk in seq_along(NAMES)) { [13:31:09.426] name <- changed[[kk]] [13:31:09.426] NAME <- NAMES[[kk]] [13:31:09.426] if (name != NAME && is.element(NAME, old_names)) [13:31:09.426] next [13:31:09.426] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.426] } [13:31:09.426] NAMES <- toupper(added) [13:31:09.426] for (kk in seq_along(NAMES)) { [13:31:09.426] name <- added[[kk]] [13:31:09.426] NAME <- NAMES[[kk]] [13:31:09.426] if (name != NAME && is.element(NAME, old_names)) [13:31:09.426] next [13:31:09.426] args[[name]] <- "" [13:31:09.426] } [13:31:09.426] NAMES <- toupper(removed) [13:31:09.426] for (kk in seq_along(NAMES)) { [13:31:09.426] name <- removed[[kk]] [13:31:09.426] NAME <- NAMES[[kk]] [13:31:09.426] if (name != NAME && is.element(NAME, old_names)) [13:31:09.426] next [13:31:09.426] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.426] } [13:31:09.426] if (length(args) > 0) [13:31:09.426] base::do.call(base::Sys.setenv, args = args) [13:31:09.426] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.426] } [13:31:09.426] else { [13:31:09.426] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.426] } [13:31:09.426] { [13:31:09.426] if (base::length(...future.futureOptionsAdded) > [13:31:09.426] 0L) { [13:31:09.426] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.426] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.426] base::options(opts) [13:31:09.426] } [13:31:09.426] { [13:31:09.426] NULL [13:31:09.426] options(future.plan = NULL) [13:31:09.426] if (is.na(NA_character_)) [13:31:09.426] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.426] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.426] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.426] .init = FALSE) [13:31:09.426] } [13:31:09.426] } [13:31:09.426] } [13:31:09.426] }) [13:31:09.426] if (TRUE) { [13:31:09.426] base::sink(type = "output", split = FALSE) [13:31:09.426] if (TRUE) { [13:31:09.426] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.426] } [13:31:09.426] else { [13:31:09.426] ...future.result["stdout"] <- base::list(NULL) [13:31:09.426] } [13:31:09.426] base::close(...future.stdout) [13:31:09.426] ...future.stdout <- NULL [13:31:09.426] } [13:31:09.426] ...future.result$conditions <- ...future.conditions [13:31:09.426] ...future.result$finished <- base::Sys.time() [13:31:09.426] ...future.result [13:31:09.426] } [13:31:09.429] - Launch lazy future ... done [13:31:09.430] run() for 'MiraiFuture' ... done [13:31:09.431] getGlobalsAndPackages() ... [13:31:09.431] Searching for globals... [13:31:09.434] - globals found: [6] 'FUN', '[[', 'x', 'ii', '...', '.Internal' [13:31:09.434] Searching for globals ... DONE [13:31:09.434] Resolving globals: FALSE [13:31:09.434] Tweak future expression to call with '...' arguments ... [13:31:09.434] { [13:31:09.434] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:09.434] } [13:31:09.435] Tweak future expression to call with '...' arguments ... DONE [13:31:09.435] The total size of the 4 globals is 2.69 KiB (2752 bytes) [13:31:09.436] The total size of the 4 globals exported for future expression ('FUN(x[[ii]], ...)') is 2.69 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'FUN' (2.13 KiB of class 'function'), 'x' (456 bytes of class 'list') and 'ii' (56 bytes of class 'numeric') [13:31:09.436] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:31:09.436] [13:31:09.436] getGlobalsAndPackages() ... DONE [13:31:09.437] run() for 'Future' ... [13:31:09.437] - state: 'created' [13:31:09.437] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.439] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.439] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.440] - Field: 'label' [13:31:09.440] - Field: 'local' [13:31:09.440] - Field: 'owner' [13:31:09.440] - Field: 'envir' [13:31:09.440] - Field: 'packages' [13:31:09.440] - Field: 'gc' [13:31:09.441] - Field: 'conditions' [13:31:09.441] - Field: 'expr' [13:31:09.441] - Field: 'uuid' [13:31:09.441] - Field: 'seed' [13:31:09.441] - Field: 'version' [13:31:09.441] - Field: 'result' [13:31:09.442] - Field: 'asynchronous' [13:31:09.442] - Field: 'calls' [13:31:09.442] - Field: 'globals' [13:31:09.442] - Field: 'stdout' [13:31:09.442] - Field: 'earlySignal' [13:31:09.442] - Field: 'lazy' [13:31:09.443] - Field: 'state' [13:31:09.443] - Field: '.cluster' [13:31:09.443] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.443] - Launch lazy future ... [13:31:09.443] Packages needed by the future expression (n = 0): [13:31:09.443] Packages needed by future strategies (n = 0): [13:31:09.444] { [13:31:09.444] { [13:31:09.444] { [13:31:09.444] ...future.startTime <- base::Sys.time() [13:31:09.444] { [13:31:09.444] { [13:31:09.444] { [13:31:09.444] base::local({ [13:31:09.444] has_future <- base::requireNamespace("future", [13:31:09.444] quietly = TRUE) [13:31:09.444] if (has_future) { [13:31:09.444] ns <- base::getNamespace("future") [13:31:09.444] version <- ns[[".package"]][["version"]] [13:31:09.444] if (is.null(version)) [13:31:09.444] version <- utils::packageVersion("future") [13:31:09.444] } [13:31:09.444] else { [13:31:09.444] version <- NULL [13:31:09.444] } [13:31:09.444] if (!has_future || version < "1.8.0") { [13:31:09.444] info <- base::c(r_version = base::gsub("R version ", [13:31:09.444] "", base::R.version$version.string), [13:31:09.444] platform = base::sprintf("%s (%s-bit)", [13:31:09.444] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.444] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.444] "release", "version")], collapse = " "), [13:31:09.444] hostname = base::Sys.info()[["nodename"]]) [13:31:09.444] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.444] info) [13:31:09.444] info <- base::paste(info, collapse = "; ") [13:31:09.444] if (!has_future) { [13:31:09.444] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.444] info) [13:31:09.444] } [13:31:09.444] else { [13:31:09.444] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.444] info, version) [13:31:09.444] } [13:31:09.444] base::stop(msg) [13:31:09.444] } [13:31:09.444] }) [13:31:09.444] } [13:31:09.444] ...future.strategy.old <- future::plan("list") [13:31:09.444] options(future.plan = NULL) [13:31:09.444] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.444] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.444] } [13:31:09.444] ...future.workdir <- getwd() [13:31:09.444] } [13:31:09.444] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.444] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.444] } [13:31:09.444] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.444] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.444] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.444] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.444] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.444] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.444] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.444] base::names(...future.oldOptions)) [13:31:09.444] } [13:31:09.444] if (FALSE) { [13:31:09.444] } [13:31:09.444] else { [13:31:09.444] if (TRUE) { [13:31:09.444] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.444] open = "w") [13:31:09.444] } [13:31:09.444] else { [13:31:09.444] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.444] windows = "NUL", "/dev/null"), open = "w") [13:31:09.444] } [13:31:09.444] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.444] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.444] base::sink(type = "output", split = FALSE) [13:31:09.444] base::close(...future.stdout) [13:31:09.444] }, add = TRUE) [13:31:09.444] } [13:31:09.444] ...future.frame <- base::sys.nframe() [13:31:09.444] ...future.conditions <- base::list() [13:31:09.444] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.444] if (FALSE) { [13:31:09.444] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.444] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.444] } [13:31:09.444] ...future.result <- base::tryCatch({ [13:31:09.444] base::withCallingHandlers({ [13:31:09.444] ...future.value <- base::withVisible(base::local({ [13:31:09.444] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:09.444] })) [13:31:09.444] future::FutureResult(value = ...future.value$value, [13:31:09.444] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.444] ...future.rng), globalenv = if (FALSE) [13:31:09.444] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.444] ...future.globalenv.names)) [13:31:09.444] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.444] }, condition = base::local({ [13:31:09.444] c <- base::c [13:31:09.444] inherits <- base::inherits [13:31:09.444] invokeRestart <- base::invokeRestart [13:31:09.444] length <- base::length [13:31:09.444] list <- base::list [13:31:09.444] seq.int <- base::seq.int [13:31:09.444] signalCondition <- base::signalCondition [13:31:09.444] sys.calls <- base::sys.calls [13:31:09.444] `[[` <- base::`[[` [13:31:09.444] `+` <- base::`+` [13:31:09.444] `<<-` <- base::`<<-` [13:31:09.444] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.444] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.444] 3L)] [13:31:09.444] } [13:31:09.444] function(cond) { [13:31:09.444] is_error <- inherits(cond, "error") [13:31:09.444] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.444] NULL) [13:31:09.444] if (is_error) { [13:31:09.444] sessionInformation <- function() { [13:31:09.444] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.444] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.444] search = base::search(), system = base::Sys.info()) [13:31:09.444] } [13:31:09.444] ...future.conditions[[length(...future.conditions) + [13:31:09.444] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.444] cond$call), session = sessionInformation(), [13:31:09.444] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.444] signalCondition(cond) [13:31:09.444] } [13:31:09.444] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.444] signal <- FALSE && inherits(cond, character(0)) [13:31:09.444] ...future.conditions[[length(...future.conditions) + [13:31:09.444] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.444] if (FALSE && !signal) { [13:31:09.444] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.444] { [13:31:09.444] inherits <- base::inherits [13:31:09.444] invokeRestart <- base::invokeRestart [13:31:09.444] is.null <- base::is.null [13:31:09.444] muffled <- FALSE [13:31:09.444] if (inherits(cond, "message")) { [13:31:09.444] muffled <- grepl(pattern, "muffleMessage") [13:31:09.444] if (muffled) [13:31:09.444] invokeRestart("muffleMessage") [13:31:09.444] } [13:31:09.444] else if (inherits(cond, "warning")) { [13:31:09.444] muffled <- grepl(pattern, "muffleWarning") [13:31:09.444] if (muffled) [13:31:09.444] invokeRestart("muffleWarning") [13:31:09.444] } [13:31:09.444] else if (inherits(cond, "condition")) { [13:31:09.444] if (!is.null(pattern)) { [13:31:09.444] computeRestarts <- base::computeRestarts [13:31:09.444] grepl <- base::grepl [13:31:09.444] restarts <- computeRestarts(cond) [13:31:09.444] for (restart in restarts) { [13:31:09.444] name <- restart$name [13:31:09.444] if (is.null(name)) [13:31:09.444] next [13:31:09.444] if (!grepl(pattern, name)) [13:31:09.444] next [13:31:09.444] invokeRestart(restart) [13:31:09.444] muffled <- TRUE [13:31:09.444] break [13:31:09.444] } [13:31:09.444] } [13:31:09.444] } [13:31:09.444] invisible(muffled) [13:31:09.444] } [13:31:09.444] muffleCondition(cond, pattern = "^muffle") [13:31:09.444] } [13:31:09.444] } [13:31:09.444] else { [13:31:09.444] if (TRUE) { [13:31:09.444] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.444] { [13:31:09.444] inherits <- base::inherits [13:31:09.444] invokeRestart <- base::invokeRestart [13:31:09.444] is.null <- base::is.null [13:31:09.444] muffled <- FALSE [13:31:09.444] if (inherits(cond, "message")) { [13:31:09.444] muffled <- grepl(pattern, "muffleMessage") [13:31:09.444] if (muffled) [13:31:09.444] invokeRestart("muffleMessage") [13:31:09.444] } [13:31:09.444] else if (inherits(cond, "warning")) { [13:31:09.444] muffled <- grepl(pattern, "muffleWarning") [13:31:09.444] if (muffled) [13:31:09.444] invokeRestart("muffleWarning") [13:31:09.444] } [13:31:09.444] else if (inherits(cond, "condition")) { [13:31:09.444] if (!is.null(pattern)) { [13:31:09.444] computeRestarts <- base::computeRestarts [13:31:09.444] grepl <- base::grepl [13:31:09.444] restarts <- computeRestarts(cond) [13:31:09.444] for (restart in restarts) { [13:31:09.444] name <- restart$name [13:31:09.444] if (is.null(name)) [13:31:09.444] next [13:31:09.444] if (!grepl(pattern, name)) [13:31:09.444] next [13:31:09.444] invokeRestart(restart) [13:31:09.444] muffled <- TRUE [13:31:09.444] break [13:31:09.444] } [13:31:09.444] } [13:31:09.444] } [13:31:09.444] invisible(muffled) [13:31:09.444] } [13:31:09.444] muffleCondition(cond, pattern = "^muffle") [13:31:09.444] } [13:31:09.444] } [13:31:09.444] } [13:31:09.444] })) [13:31:09.444] }, error = function(ex) { [13:31:09.444] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.444] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.444] ...future.rng), started = ...future.startTime, [13:31:09.444] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.444] version = "1.8"), class = "FutureResult") [13:31:09.444] }, finally = { [13:31:09.444] if (!identical(...future.workdir, getwd())) [13:31:09.444] setwd(...future.workdir) [13:31:09.444] { [13:31:09.444] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.444] ...future.oldOptions$nwarnings <- NULL [13:31:09.444] } [13:31:09.444] base::options(...future.oldOptions) [13:31:09.444] if (.Platform$OS.type == "windows") { [13:31:09.444] old_names <- names(...future.oldEnvVars) [13:31:09.444] envs <- base::Sys.getenv() [13:31:09.444] names <- names(envs) [13:31:09.444] common <- intersect(names, old_names) [13:31:09.444] added <- setdiff(names, old_names) [13:31:09.444] removed <- setdiff(old_names, names) [13:31:09.444] changed <- common[...future.oldEnvVars[common] != [13:31:09.444] envs[common]] [13:31:09.444] NAMES <- toupper(changed) [13:31:09.444] args <- list() [13:31:09.444] for (kk in seq_along(NAMES)) { [13:31:09.444] name <- changed[[kk]] [13:31:09.444] NAME <- NAMES[[kk]] [13:31:09.444] if (name != NAME && is.element(NAME, old_names)) [13:31:09.444] next [13:31:09.444] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.444] } [13:31:09.444] NAMES <- toupper(added) [13:31:09.444] for (kk in seq_along(NAMES)) { [13:31:09.444] name <- added[[kk]] [13:31:09.444] NAME <- NAMES[[kk]] [13:31:09.444] if (name != NAME && is.element(NAME, old_names)) [13:31:09.444] next [13:31:09.444] args[[name]] <- "" [13:31:09.444] } [13:31:09.444] NAMES <- toupper(removed) [13:31:09.444] for (kk in seq_along(NAMES)) { [13:31:09.444] name <- removed[[kk]] [13:31:09.444] NAME <- NAMES[[kk]] [13:31:09.444] if (name != NAME && is.element(NAME, old_names)) [13:31:09.444] next [13:31:09.444] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.444] } [13:31:09.444] if (length(args) > 0) [13:31:09.444] base::do.call(base::Sys.setenv, args = args) [13:31:09.444] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.444] } [13:31:09.444] else { [13:31:09.444] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.444] } [13:31:09.444] { [13:31:09.444] if (base::length(...future.futureOptionsAdded) > [13:31:09.444] 0L) { [13:31:09.444] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.444] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.444] base::options(opts) [13:31:09.444] } [13:31:09.444] { [13:31:09.444] NULL [13:31:09.444] options(future.plan = NULL) [13:31:09.444] if (is.na(NA_character_)) [13:31:09.444] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.444] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.444] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.444] .init = FALSE) [13:31:09.444] } [13:31:09.444] } [13:31:09.444] } [13:31:09.444] }) [13:31:09.444] if (TRUE) { [13:31:09.444] base::sink(type = "output", split = FALSE) [13:31:09.444] if (TRUE) { [13:31:09.444] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.444] } [13:31:09.444] else { [13:31:09.444] ...future.result["stdout"] <- base::list(NULL) [13:31:09.444] } [13:31:09.444] base::close(...future.stdout) [13:31:09.444] ...future.stdout <- NULL [13:31:09.444] } [13:31:09.444] ...future.result$conditions <- ...future.conditions [13:31:09.444] ...future.result$finished <- base::Sys.time() [13:31:09.444] ...future.result [13:31:09.444] } [13:31:09.448] - Launch lazy future ... done [13:31:09.448] run() for 'MiraiFuture' ... done [13:31:09.448] getGlobalsAndPackages() ... [13:31:09.449] Searching for globals... [13:31:09.451] - globals found: [6] 'FUN', '[[', 'x', 'ii', '...', '.Internal' [13:31:09.451] Searching for globals ... DONE [13:31:09.451] Resolving globals: FALSE [13:31:09.451] Tweak future expression to call with '...' arguments ... [13:31:09.452] { [13:31:09.452] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:09.452] } [13:31:09.452] Tweak future expression to call with '...' arguments ... DONE [13:31:09.453] The total size of the 4 globals is 2.69 KiB (2752 bytes) [13:31:09.453] The total size of the 4 globals exported for future expression ('FUN(x[[ii]], ...)') is 2.69 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'FUN' (2.13 KiB of class 'function'), 'x' (456 bytes of class 'list') and 'ii' (56 bytes of class 'numeric') [13:31:09.453] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:31:09.454] [13:31:09.454] getGlobalsAndPackages() ... DONE [13:31:09.454] run() for 'Future' ... [13:31:09.454] - state: 'created' [13:31:09.454] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.457] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.457] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.457] - Field: 'label' [13:31:09.457] - Field: 'local' [13:31:09.457] - Field: 'owner' [13:31:09.457] - Field: 'envir' [13:31:09.458] - Field: 'packages' [13:31:09.458] - Field: 'gc' [13:31:09.458] - Field: 'conditions' [13:31:09.458] - Field: 'expr' [13:31:09.458] - Field: 'uuid' [13:31:09.458] - Field: 'seed' [13:31:09.459] - Field: 'version' [13:31:09.459] - Field: 'result' [13:31:09.459] - Field: 'asynchronous' [13:31:09.459] - Field: 'calls' [13:31:09.459] - Field: 'globals' [13:31:09.459] - Field: 'stdout' [13:31:09.460] - Field: 'earlySignal' [13:31:09.460] - Field: 'lazy' [13:31:09.460] - Field: 'state' [13:31:09.460] - Field: '.cluster' [13:31:09.460] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.460] - Launch lazy future ... [13:31:09.461] Packages needed by the future expression (n = 0): [13:31:09.461] Packages needed by future strategies (n = 0): [13:31:09.461] { [13:31:09.461] { [13:31:09.461] { [13:31:09.461] ...future.startTime <- base::Sys.time() [13:31:09.461] { [13:31:09.461] { [13:31:09.461] { [13:31:09.461] base::local({ [13:31:09.461] has_future <- base::requireNamespace("future", [13:31:09.461] quietly = TRUE) [13:31:09.461] if (has_future) { [13:31:09.461] ns <- base::getNamespace("future") [13:31:09.461] version <- ns[[".package"]][["version"]] [13:31:09.461] if (is.null(version)) [13:31:09.461] version <- utils::packageVersion("future") [13:31:09.461] } [13:31:09.461] else { [13:31:09.461] version <- NULL [13:31:09.461] } [13:31:09.461] if (!has_future || version < "1.8.0") { [13:31:09.461] info <- base::c(r_version = base::gsub("R version ", [13:31:09.461] "", base::R.version$version.string), [13:31:09.461] platform = base::sprintf("%s (%s-bit)", [13:31:09.461] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.461] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.461] "release", "version")], collapse = " "), [13:31:09.461] hostname = base::Sys.info()[["nodename"]]) [13:31:09.461] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.461] info) [13:31:09.461] info <- base::paste(info, collapse = "; ") [13:31:09.461] if (!has_future) { [13:31:09.461] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.461] info) [13:31:09.461] } [13:31:09.461] else { [13:31:09.461] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.461] info, version) [13:31:09.461] } [13:31:09.461] base::stop(msg) [13:31:09.461] } [13:31:09.461] }) [13:31:09.461] } [13:31:09.461] ...future.strategy.old <- future::plan("list") [13:31:09.461] options(future.plan = NULL) [13:31:09.461] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.461] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.461] } [13:31:09.461] ...future.workdir <- getwd() [13:31:09.461] } [13:31:09.461] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.461] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.461] } [13:31:09.461] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.461] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.461] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.461] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.461] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.461] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.461] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.461] base::names(...future.oldOptions)) [13:31:09.461] } [13:31:09.461] if (FALSE) { [13:31:09.461] } [13:31:09.461] else { [13:31:09.461] if (TRUE) { [13:31:09.461] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.461] open = "w") [13:31:09.461] } [13:31:09.461] else { [13:31:09.461] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.461] windows = "NUL", "/dev/null"), open = "w") [13:31:09.461] } [13:31:09.461] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.461] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.461] base::sink(type = "output", split = FALSE) [13:31:09.461] base::close(...future.stdout) [13:31:09.461] }, add = TRUE) [13:31:09.461] } [13:31:09.461] ...future.frame <- base::sys.nframe() [13:31:09.461] ...future.conditions <- base::list() [13:31:09.461] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.461] if (FALSE) { [13:31:09.461] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.461] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.461] } [13:31:09.461] ...future.result <- base::tryCatch({ [13:31:09.461] base::withCallingHandlers({ [13:31:09.461] ...future.value <- base::withVisible(base::local({ [13:31:09.461] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:09.461] })) [13:31:09.461] future::FutureResult(value = ...future.value$value, [13:31:09.461] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.461] ...future.rng), globalenv = if (FALSE) [13:31:09.461] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.461] ...future.globalenv.names)) [13:31:09.461] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.461] }, condition = base::local({ [13:31:09.461] c <- base::c [13:31:09.461] inherits <- base::inherits [13:31:09.461] invokeRestart <- base::invokeRestart [13:31:09.461] length <- base::length [13:31:09.461] list <- base::list [13:31:09.461] seq.int <- base::seq.int [13:31:09.461] signalCondition <- base::signalCondition [13:31:09.461] sys.calls <- base::sys.calls [13:31:09.461] `[[` <- base::`[[` [13:31:09.461] `+` <- base::`+` [13:31:09.461] `<<-` <- base::`<<-` [13:31:09.461] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.461] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.461] 3L)] [13:31:09.461] } [13:31:09.461] function(cond) { [13:31:09.461] is_error <- inherits(cond, "error") [13:31:09.461] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.461] NULL) [13:31:09.461] if (is_error) { [13:31:09.461] sessionInformation <- function() { [13:31:09.461] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.461] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.461] search = base::search(), system = base::Sys.info()) [13:31:09.461] } [13:31:09.461] ...future.conditions[[length(...future.conditions) + [13:31:09.461] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.461] cond$call), session = sessionInformation(), [13:31:09.461] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.461] signalCondition(cond) [13:31:09.461] } [13:31:09.461] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.461] signal <- FALSE && inherits(cond, character(0)) [13:31:09.461] ...future.conditions[[length(...future.conditions) + [13:31:09.461] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.461] if (FALSE && !signal) { [13:31:09.461] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.461] { [13:31:09.461] inherits <- base::inherits [13:31:09.461] invokeRestart <- base::invokeRestart [13:31:09.461] is.null <- base::is.null [13:31:09.461] muffled <- FALSE [13:31:09.461] if (inherits(cond, "message")) { [13:31:09.461] muffled <- grepl(pattern, "muffleMessage") [13:31:09.461] if (muffled) [13:31:09.461] invokeRestart("muffleMessage") [13:31:09.461] } [13:31:09.461] else if (inherits(cond, "warning")) { [13:31:09.461] muffled <- grepl(pattern, "muffleWarning") [13:31:09.461] if (muffled) [13:31:09.461] invokeRestart("muffleWarning") [13:31:09.461] } [13:31:09.461] else if (inherits(cond, "condition")) { [13:31:09.461] if (!is.null(pattern)) { [13:31:09.461] computeRestarts <- base::computeRestarts [13:31:09.461] grepl <- base::grepl [13:31:09.461] restarts <- computeRestarts(cond) [13:31:09.461] for (restart in restarts) { [13:31:09.461] name <- restart$name [13:31:09.461] if (is.null(name)) [13:31:09.461] next [13:31:09.461] if (!grepl(pattern, name)) [13:31:09.461] next [13:31:09.461] invokeRestart(restart) [13:31:09.461] muffled <- TRUE [13:31:09.461] break [13:31:09.461] } [13:31:09.461] } [13:31:09.461] } [13:31:09.461] invisible(muffled) [13:31:09.461] } [13:31:09.461] muffleCondition(cond, pattern = "^muffle") [13:31:09.461] } [13:31:09.461] } [13:31:09.461] else { [13:31:09.461] if (TRUE) { [13:31:09.461] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.461] { [13:31:09.461] inherits <- base::inherits [13:31:09.461] invokeRestart <- base::invokeRestart [13:31:09.461] is.null <- base::is.null [13:31:09.461] muffled <- FALSE [13:31:09.461] if (inherits(cond, "message")) { [13:31:09.461] muffled <- grepl(pattern, "muffleMessage") [13:31:09.461] if (muffled) [13:31:09.461] invokeRestart("muffleMessage") [13:31:09.461] } [13:31:09.461] else if (inherits(cond, "warning")) { [13:31:09.461] muffled <- grepl(pattern, "muffleWarning") [13:31:09.461] if (muffled) [13:31:09.461] invokeRestart("muffleWarning") [13:31:09.461] } [13:31:09.461] else if (inherits(cond, "condition")) { [13:31:09.461] if (!is.null(pattern)) { [13:31:09.461] computeRestarts <- base::computeRestarts [13:31:09.461] grepl <- base::grepl [13:31:09.461] restarts <- computeRestarts(cond) [13:31:09.461] for (restart in restarts) { [13:31:09.461] name <- restart$name [13:31:09.461] if (is.null(name)) [13:31:09.461] next [13:31:09.461] if (!grepl(pattern, name)) [13:31:09.461] next [13:31:09.461] invokeRestart(restart) [13:31:09.461] muffled <- TRUE [13:31:09.461] break [13:31:09.461] } [13:31:09.461] } [13:31:09.461] } [13:31:09.461] invisible(muffled) [13:31:09.461] } [13:31:09.461] muffleCondition(cond, pattern = "^muffle") [13:31:09.461] } [13:31:09.461] } [13:31:09.461] } [13:31:09.461] })) [13:31:09.461] }, error = function(ex) { [13:31:09.461] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.461] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.461] ...future.rng), started = ...future.startTime, [13:31:09.461] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.461] version = "1.8"), class = "FutureResult") [13:31:09.461] }, finally = { [13:31:09.461] if (!identical(...future.workdir, getwd())) [13:31:09.461] setwd(...future.workdir) [13:31:09.461] { [13:31:09.461] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.461] ...future.oldOptions$nwarnings <- NULL [13:31:09.461] } [13:31:09.461] base::options(...future.oldOptions) [13:31:09.461] if (.Platform$OS.type == "windows") { [13:31:09.461] old_names <- names(...future.oldEnvVars) [13:31:09.461] envs <- base::Sys.getenv() [13:31:09.461] names <- names(envs) [13:31:09.461] common <- intersect(names, old_names) [13:31:09.461] added <- setdiff(names, old_names) [13:31:09.461] removed <- setdiff(old_names, names) [13:31:09.461] changed <- common[...future.oldEnvVars[common] != [13:31:09.461] envs[common]] [13:31:09.461] NAMES <- toupper(changed) [13:31:09.461] args <- list() [13:31:09.461] for (kk in seq_along(NAMES)) { [13:31:09.461] name <- changed[[kk]] [13:31:09.461] NAME <- NAMES[[kk]] [13:31:09.461] if (name != NAME && is.element(NAME, old_names)) [13:31:09.461] next [13:31:09.461] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.461] } [13:31:09.461] NAMES <- toupper(added) [13:31:09.461] for (kk in seq_along(NAMES)) { [13:31:09.461] name <- added[[kk]] [13:31:09.461] NAME <- NAMES[[kk]] [13:31:09.461] if (name != NAME && is.element(NAME, old_names)) [13:31:09.461] next [13:31:09.461] args[[name]] <- "" [13:31:09.461] } [13:31:09.461] NAMES <- toupper(removed) [13:31:09.461] for (kk in seq_along(NAMES)) { [13:31:09.461] name <- removed[[kk]] [13:31:09.461] NAME <- NAMES[[kk]] [13:31:09.461] if (name != NAME && is.element(NAME, old_names)) [13:31:09.461] next [13:31:09.461] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.461] } [13:31:09.461] if (length(args) > 0) [13:31:09.461] base::do.call(base::Sys.setenv, args = args) [13:31:09.461] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.461] } [13:31:09.461] else { [13:31:09.461] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.461] } [13:31:09.461] { [13:31:09.461] if (base::length(...future.futureOptionsAdded) > [13:31:09.461] 0L) { [13:31:09.461] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.461] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.461] base::options(opts) [13:31:09.461] } [13:31:09.461] { [13:31:09.461] NULL [13:31:09.461] options(future.plan = NULL) [13:31:09.461] if (is.na(NA_character_)) [13:31:09.461] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.461] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.461] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.461] .init = FALSE) [13:31:09.461] } [13:31:09.461] } [13:31:09.461] } [13:31:09.461] }) [13:31:09.461] if (TRUE) { [13:31:09.461] base::sink(type = "output", split = FALSE) [13:31:09.461] if (TRUE) { [13:31:09.461] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.461] } [13:31:09.461] else { [13:31:09.461] ...future.result["stdout"] <- base::list(NULL) [13:31:09.461] } [13:31:09.461] base::close(...future.stdout) [13:31:09.461] ...future.stdout <- NULL [13:31:09.461] } [13:31:09.461] ...future.result$conditions <- ...future.conditions [13:31:09.461] ...future.result$finished <- base::Sys.time() [13:31:09.461] ...future.result [13:31:09.461] } [13:31:09.465] - Launch lazy future ... done [13:31:09.465] run() for 'MiraiFuture' ... done > str(list(y = y)) List of 1 $ y:List of 4 ..$ a: int [1:2] 0 0 ..$ b: num [1:2] 0 0 ..$ c: chr [1:2] "" "" ..$ c:List of 2 .. ..$ : NULL .. ..$ : NULL > stopifnot(identical(y, y0)) > > > message("- flapply(x, FUN = future:::hpaste, ...) ...") - flapply(x, FUN = future:::hpaste, ...) ... > > x <- list(a = c("hello", b = 1:100)) > str(list(x = x)) List of 1 $ x:List of 1 ..$ a: Named chr [1:101] "hello" "1" "2" "3" ... .. ..- attr(*, "names")= chr [1:101] "" "b1" "b2" "b3" ... > > y0 <- lapply(x, FUN = future:::hpaste, collapse = "; ", maxHead = 3L) > str(list(y0 = y0)) List of 1 $ y0:List of 1 ..$ a: chr "hello; 1; 2; ...; 100" > > y <- flapply(x, FUN = future:::hpaste, collapse = "; ", maxHead = 3L) [13:31:09.473] getGlobalsAndPackages() ... [13:31:09.473] Searching for globals... [13:31:09.483] - globals found: [26] 'FUN', '[[', 'x', 'ii', '...', 'if', 'missing', 'is.finite', '{', 'is.null', '<-', 'paste', 'length', '==', 'return', '>', '+', '[', 'seq_len', 'rev', 'c', '&&', '!', ':', '(', '-' [13:31:09.484] Searching for globals ... DONE [13:31:09.484] Resolving globals: FALSE [13:31:09.484] Tweak future expression to call with '...' arguments ... [13:31:09.484] { [13:31:09.484] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:09.484] } [13:31:09.484] Tweak future expression to call with '...' arguments ... DONE [13:31:09.486] The total size of the 4 globals is 82.66 KiB (84648 bytes) [13:31:09.486] The total size of the 4 globals exported for future expression ('FUN(x[[ii]], ...)') is 82.66 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'FUN' (69.62 KiB of class 'function'), 'x' (12.83 KiB of class 'list') and 'future.call.arguments' (168 bytes of class 'list') [13:31:09.486] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:31:09.487] - packages: [1] 'future' [13:31:09.487] getGlobalsAndPackages() ... DONE [13:31:09.487] run() for 'Future' ... [13:31:09.487] - state: 'created' [13:31:09.488] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.491] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.491] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.491] - Field: 'label' [13:31:09.491] - Field: 'local' [13:31:09.491] - Field: 'owner' [13:31:09.492] - Field: 'envir' [13:31:09.492] - Field: 'packages' [13:31:09.492] - Field: 'gc' [13:31:09.492] - Field: 'conditions' [13:31:09.492] - Field: 'expr' [13:31:09.492] - Field: 'uuid' [13:31:09.493] - Field: 'seed' [13:31:09.493] - Field: 'version' [13:31:09.493] - Field: 'result' [13:31:09.493] - Field: 'asynchronous' [13:31:09.493] - Field: 'calls' [13:31:09.493] - Field: 'globals' [13:31:09.494] - Field: 'stdout' [13:31:09.494] - Field: 'earlySignal' [13:31:09.494] - Field: 'lazy' [13:31:09.494] - Field: 'state' [13:31:09.494] - Field: '.cluster' [13:31:09.494] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.495] - Launch lazy future ... [13:31:09.495] Packages needed by the future expression (n = 1): 'future' [13:31:09.495] Packages needed by future strategies (n = 0): [13:31:09.496] { [13:31:09.496] { [13:31:09.496] { [13:31:09.496] ...future.startTime <- base::Sys.time() [13:31:09.496] { [13:31:09.496] { [13:31:09.496] { [13:31:09.496] { [13:31:09.496] base::local({ [13:31:09.496] has_future <- base::requireNamespace("future", [13:31:09.496] quietly = TRUE) [13:31:09.496] if (has_future) { [13:31:09.496] ns <- base::getNamespace("future") [13:31:09.496] version <- ns[[".package"]][["version"]] [13:31:09.496] if (is.null(version)) [13:31:09.496] version <- utils::packageVersion("future") [13:31:09.496] } [13:31:09.496] else { [13:31:09.496] version <- NULL [13:31:09.496] } [13:31:09.496] if (!has_future || version < "1.8.0") { [13:31:09.496] info <- base::c(r_version = base::gsub("R version ", [13:31:09.496] "", base::R.version$version.string), [13:31:09.496] platform = base::sprintf("%s (%s-bit)", [13:31:09.496] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.496] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.496] "release", "version")], collapse = " "), [13:31:09.496] hostname = base::Sys.info()[["nodename"]]) [13:31:09.496] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.496] info) [13:31:09.496] info <- base::paste(info, collapse = "; ") [13:31:09.496] if (!has_future) { [13:31:09.496] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.496] info) [13:31:09.496] } [13:31:09.496] else { [13:31:09.496] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.496] info, version) [13:31:09.496] } [13:31:09.496] base::stop(msg) [13:31:09.496] } [13:31:09.496] }) [13:31:09.496] } [13:31:09.496] base::local({ [13:31:09.496] for (pkg in "future") { [13:31:09.496] base::loadNamespace(pkg) [13:31:09.496] base::library(pkg, character.only = TRUE) [13:31:09.496] } [13:31:09.496] }) [13:31:09.496] } [13:31:09.496] ...future.strategy.old <- future::plan("list") [13:31:09.496] options(future.plan = NULL) [13:31:09.496] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.496] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.496] } [13:31:09.496] ...future.workdir <- getwd() [13:31:09.496] } [13:31:09.496] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.496] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.496] } [13:31:09.496] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.496] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.496] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.496] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.496] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.496] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.496] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.496] base::names(...future.oldOptions)) [13:31:09.496] } [13:31:09.496] if (FALSE) { [13:31:09.496] } [13:31:09.496] else { [13:31:09.496] if (TRUE) { [13:31:09.496] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.496] open = "w") [13:31:09.496] } [13:31:09.496] else { [13:31:09.496] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.496] windows = "NUL", "/dev/null"), open = "w") [13:31:09.496] } [13:31:09.496] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.496] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.496] base::sink(type = "output", split = FALSE) [13:31:09.496] base::close(...future.stdout) [13:31:09.496] }, add = TRUE) [13:31:09.496] } [13:31:09.496] ...future.frame <- base::sys.nframe() [13:31:09.496] ...future.conditions <- base::list() [13:31:09.496] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.496] if (FALSE) { [13:31:09.496] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.496] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.496] } [13:31:09.496] ...future.result <- base::tryCatch({ [13:31:09.496] base::withCallingHandlers({ [13:31:09.496] ...future.value <- base::withVisible(base::local({ [13:31:09.496] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:09.496] })) [13:31:09.496] future::FutureResult(value = ...future.value$value, [13:31:09.496] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.496] ...future.rng), globalenv = if (FALSE) [13:31:09.496] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.496] ...future.globalenv.names)) [13:31:09.496] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.496] }, condition = base::local({ [13:31:09.496] c <- base::c [13:31:09.496] inherits <- base::inherits [13:31:09.496] invokeRestart <- base::invokeRestart [13:31:09.496] length <- base::length [13:31:09.496] list <- base::list [13:31:09.496] seq.int <- base::seq.int [13:31:09.496] signalCondition <- base::signalCondition [13:31:09.496] sys.calls <- base::sys.calls [13:31:09.496] `[[` <- base::`[[` [13:31:09.496] `+` <- base::`+` [13:31:09.496] `<<-` <- base::`<<-` [13:31:09.496] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.496] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.496] 3L)] [13:31:09.496] } [13:31:09.496] function(cond) { [13:31:09.496] is_error <- inherits(cond, "error") [13:31:09.496] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.496] NULL) [13:31:09.496] if (is_error) { [13:31:09.496] sessionInformation <- function() { [13:31:09.496] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.496] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.496] search = base::search(), system = base::Sys.info()) [13:31:09.496] } [13:31:09.496] ...future.conditions[[length(...future.conditions) + [13:31:09.496] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.496] cond$call), session = sessionInformation(), [13:31:09.496] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.496] signalCondition(cond) [13:31:09.496] } [13:31:09.496] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.496] signal <- FALSE && inherits(cond, character(0)) [13:31:09.496] ...future.conditions[[length(...future.conditions) + [13:31:09.496] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.496] if (FALSE && !signal) { [13:31:09.496] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.496] { [13:31:09.496] inherits <- base::inherits [13:31:09.496] invokeRestart <- base::invokeRestart [13:31:09.496] is.null <- base::is.null [13:31:09.496] muffled <- FALSE [13:31:09.496] if (inherits(cond, "message")) { [13:31:09.496] muffled <- grepl(pattern, "muffleMessage") [13:31:09.496] if (muffled) [13:31:09.496] invokeRestart("muffleMessage") [13:31:09.496] } [13:31:09.496] else if (inherits(cond, "warning")) { [13:31:09.496] muffled <- grepl(pattern, "muffleWarning") [13:31:09.496] if (muffled) [13:31:09.496] invokeRestart("muffleWarning") [13:31:09.496] } [13:31:09.496] else if (inherits(cond, "condition")) { [13:31:09.496] if (!is.null(pattern)) { [13:31:09.496] computeRestarts <- base::computeRestarts [13:31:09.496] grepl <- base::grepl [13:31:09.496] restarts <- computeRestarts(cond) [13:31:09.496] for (restart in restarts) { [13:31:09.496] name <- restart$name [13:31:09.496] if (is.null(name)) [13:31:09.496] next [13:31:09.496] if (!grepl(pattern, name)) [13:31:09.496] next [13:31:09.496] invokeRestart(restart) [13:31:09.496] muffled <- TRUE [13:31:09.496] break [13:31:09.496] } [13:31:09.496] } [13:31:09.496] } [13:31:09.496] invisible(muffled) [13:31:09.496] } [13:31:09.496] muffleCondition(cond, pattern = "^muffle") [13:31:09.496] } [13:31:09.496] } [13:31:09.496] else { [13:31:09.496] if (TRUE) { [13:31:09.496] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.496] { [13:31:09.496] inherits <- base::inherits [13:31:09.496] invokeRestart <- base::invokeRestart [13:31:09.496] is.null <- base::is.null [13:31:09.496] muffled <- FALSE [13:31:09.496] if (inherits(cond, "message")) { [13:31:09.496] muffled <- grepl(pattern, "muffleMessage") [13:31:09.496] if (muffled) [13:31:09.496] invokeRestart("muffleMessage") [13:31:09.496] } [13:31:09.496] else if (inherits(cond, "warning")) { [13:31:09.496] muffled <- grepl(pattern, "muffleWarning") [13:31:09.496] if (muffled) [13:31:09.496] invokeRestart("muffleWarning") [13:31:09.496] } [13:31:09.496] else if (inherits(cond, "condition")) { [13:31:09.496] if (!is.null(pattern)) { [13:31:09.496] computeRestarts <- base::computeRestarts [13:31:09.496] grepl <- base::grepl [13:31:09.496] restarts <- computeRestarts(cond) [13:31:09.496] for (restart in restarts) { [13:31:09.496] name <- restart$name [13:31:09.496] if (is.null(name)) [13:31:09.496] next [13:31:09.496] if (!grepl(pattern, name)) [13:31:09.496] next [13:31:09.496] invokeRestart(restart) [13:31:09.496] muffled <- TRUE [13:31:09.496] break [13:31:09.496] } [13:31:09.496] } [13:31:09.496] } [13:31:09.496] invisible(muffled) [13:31:09.496] } [13:31:09.496] muffleCondition(cond, pattern = "^muffle") [13:31:09.496] } [13:31:09.496] } [13:31:09.496] } [13:31:09.496] })) [13:31:09.496] }, error = function(ex) { [13:31:09.496] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.496] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.496] ...future.rng), started = ...future.startTime, [13:31:09.496] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.496] version = "1.8"), class = "FutureResult") [13:31:09.496] }, finally = { [13:31:09.496] if (!identical(...future.workdir, getwd())) [13:31:09.496] setwd(...future.workdir) [13:31:09.496] { [13:31:09.496] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.496] ...future.oldOptions$nwarnings <- NULL [13:31:09.496] } [13:31:09.496] base::options(...future.oldOptions) [13:31:09.496] if (.Platform$OS.type == "windows") { [13:31:09.496] old_names <- names(...future.oldEnvVars) [13:31:09.496] envs <- base::Sys.getenv() [13:31:09.496] names <- names(envs) [13:31:09.496] common <- intersect(names, old_names) [13:31:09.496] added <- setdiff(names, old_names) [13:31:09.496] removed <- setdiff(old_names, names) [13:31:09.496] changed <- common[...future.oldEnvVars[common] != [13:31:09.496] envs[common]] [13:31:09.496] NAMES <- toupper(changed) [13:31:09.496] args <- list() [13:31:09.496] for (kk in seq_along(NAMES)) { [13:31:09.496] name <- changed[[kk]] [13:31:09.496] NAME <- NAMES[[kk]] [13:31:09.496] if (name != NAME && is.element(NAME, old_names)) [13:31:09.496] next [13:31:09.496] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.496] } [13:31:09.496] NAMES <- toupper(added) [13:31:09.496] for (kk in seq_along(NAMES)) { [13:31:09.496] name <- added[[kk]] [13:31:09.496] NAME <- NAMES[[kk]] [13:31:09.496] if (name != NAME && is.element(NAME, old_names)) [13:31:09.496] next [13:31:09.496] args[[name]] <- "" [13:31:09.496] } [13:31:09.496] NAMES <- toupper(removed) [13:31:09.496] for (kk in seq_along(NAMES)) { [13:31:09.496] name <- removed[[kk]] [13:31:09.496] NAME <- NAMES[[kk]] [13:31:09.496] if (name != NAME && is.element(NAME, old_names)) [13:31:09.496] next [13:31:09.496] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.496] } [13:31:09.496] if (length(args) > 0) [13:31:09.496] base::do.call(base::Sys.setenv, args = args) [13:31:09.496] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.496] } [13:31:09.496] else { [13:31:09.496] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.496] } [13:31:09.496] { [13:31:09.496] if (base::length(...future.futureOptionsAdded) > [13:31:09.496] 0L) { [13:31:09.496] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.496] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.496] base::options(opts) [13:31:09.496] } [13:31:09.496] { [13:31:09.496] NULL [13:31:09.496] options(future.plan = NULL) [13:31:09.496] if (is.na(NA_character_)) [13:31:09.496] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.496] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.496] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.496] .init = FALSE) [13:31:09.496] } [13:31:09.496] } [13:31:09.496] } [13:31:09.496] }) [13:31:09.496] if (TRUE) { [13:31:09.496] base::sink(type = "output", split = FALSE) [13:31:09.496] if (TRUE) { [13:31:09.496] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.496] } [13:31:09.496] else { [13:31:09.496] ...future.result["stdout"] <- base::list(NULL) [13:31:09.496] } [13:31:09.496] base::close(...future.stdout) [13:31:09.496] ...future.stdout <- NULL [13:31:09.496] } [13:31:09.496] ...future.result$conditions <- ...future.conditions [13:31:09.496] ...future.result$finished <- base::Sys.time() [13:31:09.496] ...future.result [13:31:09.496] } [13:31:09.500] - Launch lazy future ... done [13:31:09.500] run() for 'MiraiFuture' ... done > str(list(y = y)) List of 1 $ y:List of 1 ..$ a: chr "hello; 1; 2; ...; 100" > stopifnot(identical(y, y0)) > > > message("- flapply(x, FUN = listenv::listenv, ...) ...") - flapply(x, FUN = listenv::listenv, ...) ... > > x <- list() > > y <- listenv() > y$A <- 3L > x$a <- y > > y <- listenv() > y$A <- 3L > y$B <- c("hello", b = 1:100) > x$b <- y > > print(x) $a A 'listenv' vector with 1 element ('A'). $b A 'listenv' vector with 2 elements ('A', 'B'). > > y0 <- lapply(x, FUN = listenv::mapping) > str(list(y0 = y0)) List of 1 $ y0:List of 2 ..$ a: Named chr "A" .. ..- attr(*, "names")= chr "A" ..$ b: Named chr [1:2] "A" "B" .. ..- attr(*, "names")= chr [1:2] "A" "B" > > y <- flapply(x, FUN = listenv::mapping) [13:31:09.510] getGlobalsAndPackages() ... [13:31:09.510] Searching for globals... [13:31:09.513] - globals found: [8] 'FUN', '[[', 'x', 'ii', '...', '{', 'get', 'parent.env' [13:31:09.513] Searching for globals ... DONE [13:31:09.513] Resolving globals: FALSE [13:31:09.513] Tweak future expression to call with '...' arguments ... [13:31:09.514] { [13:31:09.514] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:09.514] } [13:31:09.514] Tweak future expression to call with '...' arguments ... DONE [13:31:09.515] The total size of the 4 globals is 17.95 KiB (18384 bytes) [13:31:09.515] The total size of the 4 globals exported for future expression ('FUN(x[[ii]], ...)') is 17.95 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'x' (13.05 KiB of class 'list'), 'FUN' (4.85 KiB of class 'function') and 'ii' (56 bytes of class 'numeric') [13:31:09.515] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:31:09.516] - packages: [1] 'listenv' [13:31:09.516] getGlobalsAndPackages() ... DONE [13:31:09.516] run() for 'Future' ... [13:31:09.516] - state: 'created' [13:31:09.517] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.519] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.519] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.519] - Field: 'label' [13:31:09.519] - Field: 'local' [13:31:09.519] - Field: 'owner' [13:31:09.520] - Field: 'envir' [13:31:09.520] - Field: 'packages' [13:31:09.520] - Field: 'gc' [13:31:09.520] - Field: 'conditions' [13:31:09.520] - Field: 'expr' [13:31:09.521] - Field: 'uuid' [13:31:09.521] - Field: 'seed' [13:31:09.521] - Field: 'version' [13:31:09.521] - Field: 'result' [13:31:09.521] - Field: 'asynchronous' [13:31:09.521] - Field: 'calls' [13:31:09.522] - Field: 'globals' [13:31:09.522] - Field: 'stdout' [13:31:09.522] - Field: 'earlySignal' [13:31:09.522] - Field: 'lazy' [13:31:09.522] - Field: 'state' [13:31:09.522] - Field: '.cluster' [13:31:09.523] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.523] - Launch lazy future ... [13:31:09.523] Packages needed by the future expression (n = 1): 'listenv' [13:31:09.523] Packages needed by future strategies (n = 0): [13:31:09.524] { [13:31:09.524] { [13:31:09.524] { [13:31:09.524] ...future.startTime <- base::Sys.time() [13:31:09.524] { [13:31:09.524] { [13:31:09.524] { [13:31:09.524] { [13:31:09.524] base::local({ [13:31:09.524] has_future <- base::requireNamespace("future", [13:31:09.524] quietly = TRUE) [13:31:09.524] if (has_future) { [13:31:09.524] ns <- base::getNamespace("future") [13:31:09.524] version <- ns[[".package"]][["version"]] [13:31:09.524] if (is.null(version)) [13:31:09.524] version <- utils::packageVersion("future") [13:31:09.524] } [13:31:09.524] else { [13:31:09.524] version <- NULL [13:31:09.524] } [13:31:09.524] if (!has_future || version < "1.8.0") { [13:31:09.524] info <- base::c(r_version = base::gsub("R version ", [13:31:09.524] "", base::R.version$version.string), [13:31:09.524] platform = base::sprintf("%s (%s-bit)", [13:31:09.524] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.524] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.524] "release", "version")], collapse = " "), [13:31:09.524] hostname = base::Sys.info()[["nodename"]]) [13:31:09.524] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.524] info) [13:31:09.524] info <- base::paste(info, collapse = "; ") [13:31:09.524] if (!has_future) { [13:31:09.524] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.524] info) [13:31:09.524] } [13:31:09.524] else { [13:31:09.524] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.524] info, version) [13:31:09.524] } [13:31:09.524] base::stop(msg) [13:31:09.524] } [13:31:09.524] }) [13:31:09.524] } [13:31:09.524] base::local({ [13:31:09.524] for (pkg in "listenv") { [13:31:09.524] base::loadNamespace(pkg) [13:31:09.524] base::library(pkg, character.only = TRUE) [13:31:09.524] } [13:31:09.524] }) [13:31:09.524] } [13:31:09.524] ...future.strategy.old <- future::plan("list") [13:31:09.524] options(future.plan = NULL) [13:31:09.524] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.524] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.524] } [13:31:09.524] ...future.workdir <- getwd() [13:31:09.524] } [13:31:09.524] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.524] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.524] } [13:31:09.524] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.524] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.524] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.524] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.524] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.524] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.524] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.524] base::names(...future.oldOptions)) [13:31:09.524] } [13:31:09.524] if (FALSE) { [13:31:09.524] } [13:31:09.524] else { [13:31:09.524] if (TRUE) { [13:31:09.524] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.524] open = "w") [13:31:09.524] } [13:31:09.524] else { [13:31:09.524] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.524] windows = "NUL", "/dev/null"), open = "w") [13:31:09.524] } [13:31:09.524] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.524] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.524] base::sink(type = "output", split = FALSE) [13:31:09.524] base::close(...future.stdout) [13:31:09.524] }, add = TRUE) [13:31:09.524] } [13:31:09.524] ...future.frame <- base::sys.nframe() [13:31:09.524] ...future.conditions <- base::list() [13:31:09.524] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.524] if (FALSE) { [13:31:09.524] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.524] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.524] } [13:31:09.524] ...future.result <- base::tryCatch({ [13:31:09.524] base::withCallingHandlers({ [13:31:09.524] ...future.value <- base::withVisible(base::local({ [13:31:09.524] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:09.524] })) [13:31:09.524] future::FutureResult(value = ...future.value$value, [13:31:09.524] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.524] ...future.rng), globalenv = if (FALSE) [13:31:09.524] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.524] ...future.globalenv.names)) [13:31:09.524] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.524] }, condition = base::local({ [13:31:09.524] c <- base::c [13:31:09.524] inherits <- base::inherits [13:31:09.524] invokeRestart <- base::invokeRestart [13:31:09.524] length <- base::length [13:31:09.524] list <- base::list [13:31:09.524] seq.int <- base::seq.int [13:31:09.524] signalCondition <- base::signalCondition [13:31:09.524] sys.calls <- base::sys.calls [13:31:09.524] `[[` <- base::`[[` [13:31:09.524] `+` <- base::`+` [13:31:09.524] `<<-` <- base::`<<-` [13:31:09.524] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.524] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.524] 3L)] [13:31:09.524] } [13:31:09.524] function(cond) { [13:31:09.524] is_error <- inherits(cond, "error") [13:31:09.524] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.524] NULL) [13:31:09.524] if (is_error) { [13:31:09.524] sessionInformation <- function() { [13:31:09.524] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.524] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.524] search = base::search(), system = base::Sys.info()) [13:31:09.524] } [13:31:09.524] ...future.conditions[[length(...future.conditions) + [13:31:09.524] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.524] cond$call), session = sessionInformation(), [13:31:09.524] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.524] signalCondition(cond) [13:31:09.524] } [13:31:09.524] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.524] signal <- FALSE && inherits(cond, character(0)) [13:31:09.524] ...future.conditions[[length(...future.conditions) + [13:31:09.524] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.524] if (FALSE && !signal) { [13:31:09.524] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.524] { [13:31:09.524] inherits <- base::inherits [13:31:09.524] invokeRestart <- base::invokeRestart [13:31:09.524] is.null <- base::is.null [13:31:09.524] muffled <- FALSE [13:31:09.524] if (inherits(cond, "message")) { [13:31:09.524] muffled <- grepl(pattern, "muffleMessage") [13:31:09.524] if (muffled) [13:31:09.524] invokeRestart("muffleMessage") [13:31:09.524] } [13:31:09.524] else if (inherits(cond, "warning")) { [13:31:09.524] muffled <- grepl(pattern, "muffleWarning") [13:31:09.524] if (muffled) [13:31:09.524] invokeRestart("muffleWarning") [13:31:09.524] } [13:31:09.524] else if (inherits(cond, "condition")) { [13:31:09.524] if (!is.null(pattern)) { [13:31:09.524] computeRestarts <- base::computeRestarts [13:31:09.524] grepl <- base::grepl [13:31:09.524] restarts <- computeRestarts(cond) [13:31:09.524] for (restart in restarts) { [13:31:09.524] name <- restart$name [13:31:09.524] if (is.null(name)) [13:31:09.524] next [13:31:09.524] if (!grepl(pattern, name)) [13:31:09.524] next [13:31:09.524] invokeRestart(restart) [13:31:09.524] muffled <- TRUE [13:31:09.524] break [13:31:09.524] } [13:31:09.524] } [13:31:09.524] } [13:31:09.524] invisible(muffled) [13:31:09.524] } [13:31:09.524] muffleCondition(cond, pattern = "^muffle") [13:31:09.524] } [13:31:09.524] } [13:31:09.524] else { [13:31:09.524] if (TRUE) { [13:31:09.524] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.524] { [13:31:09.524] inherits <- base::inherits [13:31:09.524] invokeRestart <- base::invokeRestart [13:31:09.524] is.null <- base::is.null [13:31:09.524] muffled <- FALSE [13:31:09.524] if (inherits(cond, "message")) { [13:31:09.524] muffled <- grepl(pattern, "muffleMessage") [13:31:09.524] if (muffled) [13:31:09.524] invokeRestart("muffleMessage") [13:31:09.524] } [13:31:09.524] else if (inherits(cond, "warning")) { [13:31:09.524] muffled <- grepl(pattern, "muffleWarning") [13:31:09.524] if (muffled) [13:31:09.524] invokeRestart("muffleWarning") [13:31:09.524] } [13:31:09.524] else if (inherits(cond, "condition")) { [13:31:09.524] if (!is.null(pattern)) { [13:31:09.524] computeRestarts <- base::computeRestarts [13:31:09.524] grepl <- base::grepl [13:31:09.524] restarts <- computeRestarts(cond) [13:31:09.524] for (restart in restarts) { [13:31:09.524] name <- restart$name [13:31:09.524] if (is.null(name)) [13:31:09.524] next [13:31:09.524] if (!grepl(pattern, name)) [13:31:09.524] next [13:31:09.524] invokeRestart(restart) [13:31:09.524] muffled <- TRUE [13:31:09.524] break [13:31:09.524] } [13:31:09.524] } [13:31:09.524] } [13:31:09.524] invisible(muffled) [13:31:09.524] } [13:31:09.524] muffleCondition(cond, pattern = "^muffle") [13:31:09.524] } [13:31:09.524] } [13:31:09.524] } [13:31:09.524] })) [13:31:09.524] }, error = function(ex) { [13:31:09.524] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.524] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.524] ...future.rng), started = ...future.startTime, [13:31:09.524] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.524] version = "1.8"), class = "FutureResult") [13:31:09.524] }, finally = { [13:31:09.524] if (!identical(...future.workdir, getwd())) [13:31:09.524] setwd(...future.workdir) [13:31:09.524] { [13:31:09.524] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.524] ...future.oldOptions$nwarnings <- NULL [13:31:09.524] } [13:31:09.524] base::options(...future.oldOptions) [13:31:09.524] if (.Platform$OS.type == "windows") { [13:31:09.524] old_names <- names(...future.oldEnvVars) [13:31:09.524] envs <- base::Sys.getenv() [13:31:09.524] names <- names(envs) [13:31:09.524] common <- intersect(names, old_names) [13:31:09.524] added <- setdiff(names, old_names) [13:31:09.524] removed <- setdiff(old_names, names) [13:31:09.524] changed <- common[...future.oldEnvVars[common] != [13:31:09.524] envs[common]] [13:31:09.524] NAMES <- toupper(changed) [13:31:09.524] args <- list() [13:31:09.524] for (kk in seq_along(NAMES)) { [13:31:09.524] name <- changed[[kk]] [13:31:09.524] NAME <- NAMES[[kk]] [13:31:09.524] if (name != NAME && is.element(NAME, old_names)) [13:31:09.524] next [13:31:09.524] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.524] } [13:31:09.524] NAMES <- toupper(added) [13:31:09.524] for (kk in seq_along(NAMES)) { [13:31:09.524] name <- added[[kk]] [13:31:09.524] NAME <- NAMES[[kk]] [13:31:09.524] if (name != NAME && is.element(NAME, old_names)) [13:31:09.524] next [13:31:09.524] args[[name]] <- "" [13:31:09.524] } [13:31:09.524] NAMES <- toupper(removed) [13:31:09.524] for (kk in seq_along(NAMES)) { [13:31:09.524] name <- removed[[kk]] [13:31:09.524] NAME <- NAMES[[kk]] [13:31:09.524] if (name != NAME && is.element(NAME, old_names)) [13:31:09.524] next [13:31:09.524] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.524] } [13:31:09.524] if (length(args) > 0) [13:31:09.524] base::do.call(base::Sys.setenv, args = args) [13:31:09.524] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.524] } [13:31:09.524] else { [13:31:09.524] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.524] } [13:31:09.524] { [13:31:09.524] if (base::length(...future.futureOptionsAdded) > [13:31:09.524] 0L) { [13:31:09.524] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.524] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.524] base::options(opts) [13:31:09.524] } [13:31:09.524] { [13:31:09.524] NULL [13:31:09.524] options(future.plan = NULL) [13:31:09.524] if (is.na(NA_character_)) [13:31:09.524] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.524] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.524] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.524] .init = FALSE) [13:31:09.524] } [13:31:09.524] } [13:31:09.524] } [13:31:09.524] }) [13:31:09.524] if (TRUE) { [13:31:09.524] base::sink(type = "output", split = FALSE) [13:31:09.524] if (TRUE) { [13:31:09.524] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.524] } [13:31:09.524] else { [13:31:09.524] ...future.result["stdout"] <- base::list(NULL) [13:31:09.524] } [13:31:09.524] base::close(...future.stdout) [13:31:09.524] ...future.stdout <- NULL [13:31:09.524] } [13:31:09.524] ...future.result$conditions <- ...future.conditions [13:31:09.524] ...future.result$finished <- base::Sys.time() [13:31:09.524] ...future.result [13:31:09.524] } [13:31:09.528] - Launch lazy future ... done [13:31:09.528] run() for 'MiraiFuture' ... done [13:31:09.528] getGlobalsAndPackages() ... [13:31:09.529] Searching for globals... [13:31:09.532] - globals found: [8] 'FUN', '[[', 'x', 'ii', '...', '{', 'get', 'parent.env' [13:31:09.532] Searching for globals ... DONE [13:31:09.532] Resolving globals: FALSE [13:31:09.533] Tweak future expression to call with '...' arguments ... [13:31:09.533] { [13:31:09.533] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:09.533] } [13:31:09.533] Tweak future expression to call with '...' arguments ... DONE [13:31:09.534] The total size of the 4 globals is 17.95 KiB (18384 bytes) [13:31:09.534] The total size of the 4 globals exported for future expression ('FUN(x[[ii]], ...)') is 17.95 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are 'x' (13.05 KiB of class 'list'), 'FUN' (4.85 KiB of class 'function') and 'ii' (56 bytes of class 'numeric') [13:31:09.535] - globals: [4] 'FUN', 'x', 'ii', 'future.call.arguments' [13:31:09.535] - packages: [1] 'listenv' [13:31:09.535] getGlobalsAndPackages() ... DONE [13:31:09.535] run() for 'Future' ... [13:31:09.536] - state: 'created' [13:31:09.536] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.538] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.538] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.538] - Field: 'label' [13:31:09.539] - Field: 'local' [13:31:09.539] - Field: 'owner' [13:31:09.539] - Field: 'envir' [13:31:09.539] - Field: 'packages' [13:31:09.539] - Field: 'gc' [13:31:09.539] - Field: 'conditions' [13:31:09.540] - Field: 'expr' [13:31:09.540] - Field: 'uuid' [13:31:09.540] - Field: 'seed' [13:31:09.540] - Field: 'version' [13:31:09.540] - Field: 'result' [13:31:09.540] - Field: 'asynchronous' [13:31:09.541] - Field: 'calls' [13:31:09.541] - Field: 'globals' [13:31:09.541] - Field: 'stdout' [13:31:09.541] - Field: 'earlySignal' [13:31:09.541] - Field: 'lazy' [13:31:09.541] - Field: 'state' [13:31:09.542] - Field: '.cluster' [13:31:09.542] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.542] - Launch lazy future ... [13:31:09.542] Packages needed by the future expression (n = 1): 'listenv' [13:31:09.542] Packages needed by future strategies (n = 0): [13:31:09.543] { [13:31:09.543] { [13:31:09.543] { [13:31:09.543] ...future.startTime <- base::Sys.time() [13:31:09.543] { [13:31:09.543] { [13:31:09.543] { [13:31:09.543] { [13:31:09.543] base::local({ [13:31:09.543] has_future <- base::requireNamespace("future", [13:31:09.543] quietly = TRUE) [13:31:09.543] if (has_future) { [13:31:09.543] ns <- base::getNamespace("future") [13:31:09.543] version <- ns[[".package"]][["version"]] [13:31:09.543] if (is.null(version)) [13:31:09.543] version <- utils::packageVersion("future") [13:31:09.543] } [13:31:09.543] else { [13:31:09.543] version <- NULL [13:31:09.543] } [13:31:09.543] if (!has_future || version < "1.8.0") { [13:31:09.543] info <- base::c(r_version = base::gsub("R version ", [13:31:09.543] "", base::R.version$version.string), [13:31:09.543] platform = base::sprintf("%s (%s-bit)", [13:31:09.543] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.543] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.543] "release", "version")], collapse = " "), [13:31:09.543] hostname = base::Sys.info()[["nodename"]]) [13:31:09.543] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.543] info) [13:31:09.543] info <- base::paste(info, collapse = "; ") [13:31:09.543] if (!has_future) { [13:31:09.543] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.543] info) [13:31:09.543] } [13:31:09.543] else { [13:31:09.543] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.543] info, version) [13:31:09.543] } [13:31:09.543] base::stop(msg) [13:31:09.543] } [13:31:09.543] }) [13:31:09.543] } [13:31:09.543] base::local({ [13:31:09.543] for (pkg in "listenv") { [13:31:09.543] base::loadNamespace(pkg) [13:31:09.543] base::library(pkg, character.only = TRUE) [13:31:09.543] } [13:31:09.543] }) [13:31:09.543] } [13:31:09.543] ...future.strategy.old <- future::plan("list") [13:31:09.543] options(future.plan = NULL) [13:31:09.543] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.543] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.543] } [13:31:09.543] ...future.workdir <- getwd() [13:31:09.543] } [13:31:09.543] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.543] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.543] } [13:31:09.543] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.543] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.543] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.543] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.543] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.543] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.543] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.543] base::names(...future.oldOptions)) [13:31:09.543] } [13:31:09.543] if (FALSE) { [13:31:09.543] } [13:31:09.543] else { [13:31:09.543] if (TRUE) { [13:31:09.543] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.543] open = "w") [13:31:09.543] } [13:31:09.543] else { [13:31:09.543] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.543] windows = "NUL", "/dev/null"), open = "w") [13:31:09.543] } [13:31:09.543] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.543] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.543] base::sink(type = "output", split = FALSE) [13:31:09.543] base::close(...future.stdout) [13:31:09.543] }, add = TRUE) [13:31:09.543] } [13:31:09.543] ...future.frame <- base::sys.nframe() [13:31:09.543] ...future.conditions <- base::list() [13:31:09.543] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.543] if (FALSE) { [13:31:09.543] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.543] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.543] } [13:31:09.543] ...future.result <- base::tryCatch({ [13:31:09.543] base::withCallingHandlers({ [13:31:09.543] ...future.value <- base::withVisible(base::local({ [13:31:09.543] do.call(function(...) FUN(x[[ii]], ...), args = future.call.arguments) [13:31:09.543] })) [13:31:09.543] future::FutureResult(value = ...future.value$value, [13:31:09.543] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.543] ...future.rng), globalenv = if (FALSE) [13:31:09.543] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.543] ...future.globalenv.names)) [13:31:09.543] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.543] }, condition = base::local({ [13:31:09.543] c <- base::c [13:31:09.543] inherits <- base::inherits [13:31:09.543] invokeRestart <- base::invokeRestart [13:31:09.543] length <- base::length [13:31:09.543] list <- base::list [13:31:09.543] seq.int <- base::seq.int [13:31:09.543] signalCondition <- base::signalCondition [13:31:09.543] sys.calls <- base::sys.calls [13:31:09.543] `[[` <- base::`[[` [13:31:09.543] `+` <- base::`+` [13:31:09.543] `<<-` <- base::`<<-` [13:31:09.543] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.543] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.543] 3L)] [13:31:09.543] } [13:31:09.543] function(cond) { [13:31:09.543] is_error <- inherits(cond, "error") [13:31:09.543] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.543] NULL) [13:31:09.543] if (is_error) { [13:31:09.543] sessionInformation <- function() { [13:31:09.543] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.543] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.543] search = base::search(), system = base::Sys.info()) [13:31:09.543] } [13:31:09.543] ...future.conditions[[length(...future.conditions) + [13:31:09.543] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.543] cond$call), session = sessionInformation(), [13:31:09.543] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.543] signalCondition(cond) [13:31:09.543] } [13:31:09.543] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.543] signal <- FALSE && inherits(cond, character(0)) [13:31:09.543] ...future.conditions[[length(...future.conditions) + [13:31:09.543] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.543] if (FALSE && !signal) { [13:31:09.543] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.543] { [13:31:09.543] inherits <- base::inherits [13:31:09.543] invokeRestart <- base::invokeRestart [13:31:09.543] is.null <- base::is.null [13:31:09.543] muffled <- FALSE [13:31:09.543] if (inherits(cond, "message")) { [13:31:09.543] muffled <- grepl(pattern, "muffleMessage") [13:31:09.543] if (muffled) [13:31:09.543] invokeRestart("muffleMessage") [13:31:09.543] } [13:31:09.543] else if (inherits(cond, "warning")) { [13:31:09.543] muffled <- grepl(pattern, "muffleWarning") [13:31:09.543] if (muffled) [13:31:09.543] invokeRestart("muffleWarning") [13:31:09.543] } [13:31:09.543] else if (inherits(cond, "condition")) { [13:31:09.543] if (!is.null(pattern)) { [13:31:09.543] computeRestarts <- base::computeRestarts [13:31:09.543] grepl <- base::grepl [13:31:09.543] restarts <- computeRestarts(cond) [13:31:09.543] for (restart in restarts) { [13:31:09.543] name <- restart$name [13:31:09.543] if (is.null(name)) [13:31:09.543] next [13:31:09.543] if (!grepl(pattern, name)) [13:31:09.543] next [13:31:09.543] invokeRestart(restart) [13:31:09.543] muffled <- TRUE [13:31:09.543] break [13:31:09.543] } [13:31:09.543] } [13:31:09.543] } [13:31:09.543] invisible(muffled) [13:31:09.543] } [13:31:09.543] muffleCondition(cond, pattern = "^muffle") [13:31:09.543] } [13:31:09.543] } [13:31:09.543] else { [13:31:09.543] if (TRUE) { [13:31:09.543] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.543] { [13:31:09.543] inherits <- base::inherits [13:31:09.543] invokeRestart <- base::invokeRestart [13:31:09.543] is.null <- base::is.null [13:31:09.543] muffled <- FALSE [13:31:09.543] if (inherits(cond, "message")) { [13:31:09.543] muffled <- grepl(pattern, "muffleMessage") [13:31:09.543] if (muffled) [13:31:09.543] invokeRestart("muffleMessage") [13:31:09.543] } [13:31:09.543] else if (inherits(cond, "warning")) { [13:31:09.543] muffled <- grepl(pattern, "muffleWarning") [13:31:09.543] if (muffled) [13:31:09.543] invokeRestart("muffleWarning") [13:31:09.543] } [13:31:09.543] else if (inherits(cond, "condition")) { [13:31:09.543] if (!is.null(pattern)) { [13:31:09.543] computeRestarts <- base::computeRestarts [13:31:09.543] grepl <- base::grepl [13:31:09.543] restarts <- computeRestarts(cond) [13:31:09.543] for (restart in restarts) { [13:31:09.543] name <- restart$name [13:31:09.543] if (is.null(name)) [13:31:09.543] next [13:31:09.543] if (!grepl(pattern, name)) [13:31:09.543] next [13:31:09.543] invokeRestart(restart) [13:31:09.543] muffled <- TRUE [13:31:09.543] break [13:31:09.543] } [13:31:09.543] } [13:31:09.543] } [13:31:09.543] invisible(muffled) [13:31:09.543] } [13:31:09.543] muffleCondition(cond, pattern = "^muffle") [13:31:09.543] } [13:31:09.543] } [13:31:09.543] } [13:31:09.543] })) [13:31:09.543] }, error = function(ex) { [13:31:09.543] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.543] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.543] ...future.rng), started = ...future.startTime, [13:31:09.543] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.543] version = "1.8"), class = "FutureResult") [13:31:09.543] }, finally = { [13:31:09.543] if (!identical(...future.workdir, getwd())) [13:31:09.543] setwd(...future.workdir) [13:31:09.543] { [13:31:09.543] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.543] ...future.oldOptions$nwarnings <- NULL [13:31:09.543] } [13:31:09.543] base::options(...future.oldOptions) [13:31:09.543] if (.Platform$OS.type == "windows") { [13:31:09.543] old_names <- names(...future.oldEnvVars) [13:31:09.543] envs <- base::Sys.getenv() [13:31:09.543] names <- names(envs) [13:31:09.543] common <- intersect(names, old_names) [13:31:09.543] added <- setdiff(names, old_names) [13:31:09.543] removed <- setdiff(old_names, names) [13:31:09.543] changed <- common[...future.oldEnvVars[common] != [13:31:09.543] envs[common]] [13:31:09.543] NAMES <- toupper(changed) [13:31:09.543] args <- list() [13:31:09.543] for (kk in seq_along(NAMES)) { [13:31:09.543] name <- changed[[kk]] [13:31:09.543] NAME <- NAMES[[kk]] [13:31:09.543] if (name != NAME && is.element(NAME, old_names)) [13:31:09.543] next [13:31:09.543] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.543] } [13:31:09.543] NAMES <- toupper(added) [13:31:09.543] for (kk in seq_along(NAMES)) { [13:31:09.543] name <- added[[kk]] [13:31:09.543] NAME <- NAMES[[kk]] [13:31:09.543] if (name != NAME && is.element(NAME, old_names)) [13:31:09.543] next [13:31:09.543] args[[name]] <- "" [13:31:09.543] } [13:31:09.543] NAMES <- toupper(removed) [13:31:09.543] for (kk in seq_along(NAMES)) { [13:31:09.543] name <- removed[[kk]] [13:31:09.543] NAME <- NAMES[[kk]] [13:31:09.543] if (name != NAME && is.element(NAME, old_names)) [13:31:09.543] next [13:31:09.543] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.543] } [13:31:09.543] if (length(args) > 0) [13:31:09.543] base::do.call(base::Sys.setenv, args = args) [13:31:09.543] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.543] } [13:31:09.543] else { [13:31:09.543] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.543] } [13:31:09.543] { [13:31:09.543] if (base::length(...future.futureOptionsAdded) > [13:31:09.543] 0L) { [13:31:09.543] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.543] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.543] base::options(opts) [13:31:09.543] } [13:31:09.543] { [13:31:09.543] NULL [13:31:09.543] options(future.plan = NULL) [13:31:09.543] if (is.na(NA_character_)) [13:31:09.543] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.543] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.543] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.543] .init = FALSE) [13:31:09.543] } [13:31:09.543] } [13:31:09.543] } [13:31:09.543] }) [13:31:09.543] if (TRUE) { [13:31:09.543] base::sink(type = "output", split = FALSE) [13:31:09.543] if (TRUE) { [13:31:09.543] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.543] } [13:31:09.543] else { [13:31:09.543] ...future.result["stdout"] <- base::list(NULL) [13:31:09.543] } [13:31:09.543] base::close(...future.stdout) [13:31:09.543] ...future.stdout <- NULL [13:31:09.543] } [13:31:09.543] ...future.result$conditions <- ...future.conditions [13:31:09.543] ...future.result$finished <- base::Sys.time() [13:31:09.543] ...future.result [13:31:09.543] } [13:31:09.547] - Launch lazy future ... done [13:31:09.547] run() for 'MiraiFuture' ... done > str(list(y = y)) List of 1 $ y:List of 2 ..$ a: Named chr "A" .. ..- attr(*, "names")= chr "A" ..$ b: Named chr [1:2] "A" "B" .. ..- attr(*, "names")= chr [1:2] "A" "B" > stopifnot(identical(y, y0)) > > > message("*** Tricky use cases related to globals ... DONE") *** Tricky use cases related to globals ... DONE > > source("incl/end.R") > > proc.time() user system elapsed 0.45 0.07 1.03