R Under development (unstable) (2024-05-14 r86553 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > source("incl/start.R") Loading required package: future [10:56:13.948] plan(): Setting new future strategy stack: [10:56:13.950] List of future strategies: [10:56:13.950] 1. mirai_multisession: [10:56:13.950] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [10:56:13.950] - tweaked: FALSE [10:56:13.950] - call: future::plan(future.mirai::mirai_multisession) [10:56:13.962] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [10:56:13.962] < mirai | $data > [10:56:13.967] getGlobalsAndPackages() ... [10:56:13.968] Not searching for globals [10:56:13.968] - globals: [0] [10:56:13.968] getGlobalsAndPackages() ... DONE [10:56:13.969] getGlobalsAndPackages() ... [10:56:13.969] [10:56:13.969] - globals: [0] [10:56:13.969] getGlobalsAndPackages() ... DONE [10:56:14.265] Packages needed by the future expression (n = 0): [10:56:14.266] Packages needed by future strategies (n = 0): [10:56:14.267] { [10:56:14.267] { [10:56:14.267] { [10:56:14.267] ...future.startTime <- base::Sys.time() [10:56:14.267] { [10:56:14.267] { [10:56:14.267] { [10:56:14.267] base::local({ [10:56:14.267] has_future <- base::requireNamespace("future", [10:56:14.267] quietly = TRUE) [10:56:14.267] if (has_future) { [10:56:14.267] ns <- base::getNamespace("future") [10:56:14.267] version <- ns[[".package"]][["version"]] [10:56:14.267] if (is.null(version)) [10:56:14.267] version <- utils::packageVersion("future") [10:56:14.267] } [10:56:14.267] else { [10:56:14.267] version <- NULL [10:56:14.267] } [10:56:14.267] if (!has_future || version < "1.8.0") { [10:56:14.267] info <- base::c(r_version = base::gsub("R version ", [10:56:14.267] "", base::R.version$version.string), [10:56:14.267] platform = base::sprintf("%s (%s-bit)", [10:56:14.267] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:14.267] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:14.267] "release", "version")], collapse = " "), [10:56:14.267] hostname = base::Sys.info()[["nodename"]]) [10:56:14.267] info <- base::sprintf("%s: %s", base::names(info), [10:56:14.267] info) [10:56:14.267] info <- base::paste(info, collapse = "; ") [10:56:14.267] if (!has_future) { [10:56:14.267] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:14.267] info) [10:56:14.267] } [10:56:14.267] else { [10:56:14.267] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:14.267] info, version) [10:56:14.267] } [10:56:14.267] base::stop(msg) [10:56:14.267] } [10:56:14.267] }) [10:56:14.267] } [10:56:14.267] ...future.strategy.old <- future::plan("list") [10:56:14.267] options(future.plan = NULL) [10:56:14.267] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.267] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:14.267] } [10:56:14.267] ...future.workdir <- getwd() [10:56:14.267] } [10:56:14.267] ...future.oldOptions <- base::as.list(base::.Options) [10:56:14.267] ...future.oldEnvVars <- base::Sys.getenv() [10:56:14.267] } [10:56:14.267] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:14.267] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:14.267] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:14.267] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:14.267] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:14.267] future.stdout.windows.reencode = NULL, width = 80L) [10:56:14.267] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:14.267] base::names(...future.oldOptions)) [10:56:14.267] } [10:56:14.267] if (FALSE) { [10:56:14.267] } [10:56:14.267] else { [10:56:14.267] if (TRUE) { [10:56:14.267] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:14.267] open = "w") [10:56:14.267] } [10:56:14.267] else { [10:56:14.267] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:14.267] windows = "NUL", "/dev/null"), open = "w") [10:56:14.267] } [10:56:14.267] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:14.267] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:14.267] base::sink(type = "output", split = FALSE) [10:56:14.267] base::close(...future.stdout) [10:56:14.267] }, add = TRUE) [10:56:14.267] } [10:56:14.267] ...future.frame <- base::sys.nframe() [10:56:14.267] ...future.conditions <- base::list() [10:56:14.267] ...future.rng <- base::globalenv()$.Random.seed [10:56:14.267] if (FALSE) { [10:56:14.267] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:14.267] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:14.267] } [10:56:14.267] ...future.result <- base::tryCatch({ [10:56:14.267] base::withCallingHandlers({ [10:56:14.267] ...future.value <- base::withVisible(base::local(NA)) [10:56:14.267] future::FutureResult(value = ...future.value$value, [10:56:14.267] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.267] ...future.rng), globalenv = if (FALSE) [10:56:14.267] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:14.267] ...future.globalenv.names)) [10:56:14.267] else NULL, started = ...future.startTime, version = "1.8") [10:56:14.267] }, condition = base::local({ [10:56:14.267] c <- base::c [10:56:14.267] inherits <- base::inherits [10:56:14.267] invokeRestart <- base::invokeRestart [10:56:14.267] length <- base::length [10:56:14.267] list <- base::list [10:56:14.267] seq.int <- base::seq.int [10:56:14.267] signalCondition <- base::signalCondition [10:56:14.267] sys.calls <- base::sys.calls [10:56:14.267] `[[` <- base::`[[` [10:56:14.267] `+` <- base::`+` [10:56:14.267] `<<-` <- base::`<<-` [10:56:14.267] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:14.267] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:14.267] 3L)] [10:56:14.267] } [10:56:14.267] function(cond) { [10:56:14.267] is_error <- inherits(cond, "error") [10:56:14.267] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:14.267] NULL) [10:56:14.267] if (is_error) { [10:56:14.267] sessionInformation <- function() { [10:56:14.267] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:14.267] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:14.267] search = base::search(), system = base::Sys.info()) [10:56:14.267] } [10:56:14.267] ...future.conditions[[length(...future.conditions) + [10:56:14.267] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:14.267] cond$call), session = sessionInformation(), [10:56:14.267] timestamp = base::Sys.time(), signaled = 0L) [10:56:14.267] signalCondition(cond) [10:56:14.267] } [10:56:14.267] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:14.267] signal <- FALSE && inherits(cond, character(0)) [10:56:14.267] ...future.conditions[[length(...future.conditions) + [10:56:14.267] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:14.267] if (FALSE && !signal) { [10:56:14.267] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.267] { [10:56:14.267] inherits <- base::inherits [10:56:14.267] invokeRestart <- base::invokeRestart [10:56:14.267] is.null <- base::is.null [10:56:14.267] muffled <- FALSE [10:56:14.267] if (inherits(cond, "message")) { [10:56:14.267] muffled <- grepl(pattern, "muffleMessage") [10:56:14.267] if (muffled) [10:56:14.267] invokeRestart("muffleMessage") [10:56:14.267] } [10:56:14.267] else if (inherits(cond, "warning")) { [10:56:14.267] muffled <- grepl(pattern, "muffleWarning") [10:56:14.267] if (muffled) [10:56:14.267] invokeRestart("muffleWarning") [10:56:14.267] } [10:56:14.267] else if (inherits(cond, "condition")) { [10:56:14.267] if (!is.null(pattern)) { [10:56:14.267] computeRestarts <- base::computeRestarts [10:56:14.267] grepl <- base::grepl [10:56:14.267] restarts <- computeRestarts(cond) [10:56:14.267] for (restart in restarts) { [10:56:14.267] name <- restart$name [10:56:14.267] if (is.null(name)) [10:56:14.267] next [10:56:14.267] if (!grepl(pattern, name)) [10:56:14.267] next [10:56:14.267] invokeRestart(restart) [10:56:14.267] muffled <- TRUE [10:56:14.267] break [10:56:14.267] } [10:56:14.267] } [10:56:14.267] } [10:56:14.267] invisible(muffled) [10:56:14.267] } [10:56:14.267] muffleCondition(cond, pattern = "^muffle") [10:56:14.267] } [10:56:14.267] } [10:56:14.267] else { [10:56:14.267] if (TRUE) { [10:56:14.267] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.267] { [10:56:14.267] inherits <- base::inherits [10:56:14.267] invokeRestart <- base::invokeRestart [10:56:14.267] is.null <- base::is.null [10:56:14.267] muffled <- FALSE [10:56:14.267] if (inherits(cond, "message")) { [10:56:14.267] muffled <- grepl(pattern, "muffleMessage") [10:56:14.267] if (muffled) [10:56:14.267] invokeRestart("muffleMessage") [10:56:14.267] } [10:56:14.267] else if (inherits(cond, "warning")) { [10:56:14.267] muffled <- grepl(pattern, "muffleWarning") [10:56:14.267] if (muffled) [10:56:14.267] invokeRestart("muffleWarning") [10:56:14.267] } [10:56:14.267] else if (inherits(cond, "condition")) { [10:56:14.267] if (!is.null(pattern)) { [10:56:14.267] computeRestarts <- base::computeRestarts [10:56:14.267] grepl <- base::grepl [10:56:14.267] restarts <- computeRestarts(cond) [10:56:14.267] for (restart in restarts) { [10:56:14.267] name <- restart$name [10:56:14.267] if (is.null(name)) [10:56:14.267] next [10:56:14.267] if (!grepl(pattern, name)) [10:56:14.267] next [10:56:14.267] invokeRestart(restart) [10:56:14.267] muffled <- TRUE [10:56:14.267] break [10:56:14.267] } [10:56:14.267] } [10:56:14.267] } [10:56:14.267] invisible(muffled) [10:56:14.267] } [10:56:14.267] muffleCondition(cond, pattern = "^muffle") [10:56:14.267] } [10:56:14.267] } [10:56:14.267] } [10:56:14.267] })) [10:56:14.267] }, error = function(ex) { [10:56:14.267] base::structure(base::list(value = NULL, visible = NULL, [10:56:14.267] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.267] ...future.rng), started = ...future.startTime, [10:56:14.267] finished = Sys.time(), session_uuid = NA_character_, [10:56:14.267] version = "1.8"), class = "FutureResult") [10:56:14.267] }, finally = { [10:56:14.267] if (!identical(...future.workdir, getwd())) [10:56:14.267] setwd(...future.workdir) [10:56:14.267] { [10:56:14.267] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:14.267] ...future.oldOptions$nwarnings <- NULL [10:56:14.267] } [10:56:14.267] base::options(...future.oldOptions) [10:56:14.267] if (.Platform$OS.type == "windows") { [10:56:14.267] old_names <- names(...future.oldEnvVars) [10:56:14.267] envs <- base::Sys.getenv() [10:56:14.267] names <- names(envs) [10:56:14.267] common <- intersect(names, old_names) [10:56:14.267] added <- setdiff(names, old_names) [10:56:14.267] removed <- setdiff(old_names, names) [10:56:14.267] changed <- common[...future.oldEnvVars[common] != [10:56:14.267] envs[common]] [10:56:14.267] NAMES <- toupper(changed) [10:56:14.267] args <- list() [10:56:14.267] for (kk in seq_along(NAMES)) { [10:56:14.267] name <- changed[[kk]] [10:56:14.267] NAME <- NAMES[[kk]] [10:56:14.267] if (name != NAME && is.element(NAME, old_names)) [10:56:14.267] next [10:56:14.267] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.267] } [10:56:14.267] NAMES <- toupper(added) [10:56:14.267] for (kk in seq_along(NAMES)) { [10:56:14.267] name <- added[[kk]] [10:56:14.267] NAME <- NAMES[[kk]] [10:56:14.267] if (name != NAME && is.element(NAME, old_names)) [10:56:14.267] next [10:56:14.267] args[[name]] <- "" [10:56:14.267] } [10:56:14.267] NAMES <- toupper(removed) [10:56:14.267] for (kk in seq_along(NAMES)) { [10:56:14.267] name <- removed[[kk]] [10:56:14.267] NAME <- NAMES[[kk]] [10:56:14.267] if (name != NAME && is.element(NAME, old_names)) [10:56:14.267] next [10:56:14.267] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.267] } [10:56:14.267] if (length(args) > 0) [10:56:14.267] base::do.call(base::Sys.setenv, args = args) [10:56:14.267] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:14.267] } [10:56:14.267] else { [10:56:14.267] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:14.267] } [10:56:14.267] { [10:56:14.267] if (base::length(...future.futureOptionsAdded) > [10:56:14.267] 0L) { [10:56:14.267] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:14.267] base::names(opts) <- ...future.futureOptionsAdded [10:56:14.267] base::options(opts) [10:56:14.267] } [10:56:14.267] { [10:56:14.267] NULL [10:56:14.267] options(future.plan = NULL) [10:56:14.267] if (is.na(NA_character_)) [10:56:14.267] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.267] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:14.267] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:14.267] .init = FALSE) [10:56:14.267] } [10:56:14.267] } [10:56:14.267] } [10:56:14.267] }) [10:56:14.267] if (TRUE) { [10:56:14.267] base::sink(type = "output", split = FALSE) [10:56:14.267] if (TRUE) { [10:56:14.267] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:14.267] } [10:56:14.267] else { [10:56:14.267] ...future.result["stdout"] <- base::list(NULL) [10:56:14.267] } [10:56:14.267] base::close(...future.stdout) [10:56:14.267] ...future.stdout <- NULL [10:56:14.267] } [10:56:14.267] ...future.result$conditions <- ...future.conditions [10:56:14.267] ...future.result$finished <- base::Sys.time() [10:56:14.267] ...future.result [10:56:14.267] } [10:56:14.406] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [10:56:14.406] plan(): nbrOfWorkers() = 2 > > library("datasets") ## cars data set > library("stats") ## lm(), poly(), xtabs() > > plan(mirai_multisession) [10:56:14.408] plan(): Setting new future strategy stack: [10:56:14.408] List of future strategies: [10:56:14.408] 1. mirai_multisession: [10:56:14.408] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [10:56:14.408] - tweaked: FALSE [10:56:14.408] - call: plan(mirai_multisession) [10:56:14.430] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [10:56:14.431] < mirai | $data > [10:56:14.435] getGlobalsAndPackages() ... [10:56:14.435] Not searching for globals [10:56:14.435] - globals: [0] [10:56:14.435] getGlobalsAndPackages() ... DONE [10:56:14.436] getGlobalsAndPackages() ... [10:56:14.436] [10:56:14.436] - globals: [0] [10:56:14.436] getGlobalsAndPackages() ... DONE [10:56:14.437] Packages needed by the future expression (n = 0): [10:56:14.437] Packages needed by future strategies (n = 0): [10:56:14.438] { [10:56:14.438] { [10:56:14.438] { [10:56:14.438] ...future.startTime <- base::Sys.time() [10:56:14.438] { [10:56:14.438] { [10:56:14.438] { [10:56:14.438] base::local({ [10:56:14.438] has_future <- base::requireNamespace("future", [10:56:14.438] quietly = TRUE) [10:56:14.438] if (has_future) { [10:56:14.438] ns <- base::getNamespace("future") [10:56:14.438] version <- ns[[".package"]][["version"]] [10:56:14.438] if (is.null(version)) [10:56:14.438] version <- utils::packageVersion("future") [10:56:14.438] } [10:56:14.438] else { [10:56:14.438] version <- NULL [10:56:14.438] } [10:56:14.438] if (!has_future || version < "1.8.0") { [10:56:14.438] info <- base::c(r_version = base::gsub("R version ", [10:56:14.438] "", base::R.version$version.string), [10:56:14.438] platform = base::sprintf("%s (%s-bit)", [10:56:14.438] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:14.438] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:14.438] "release", "version")], collapse = " "), [10:56:14.438] hostname = base::Sys.info()[["nodename"]]) [10:56:14.438] info <- base::sprintf("%s: %s", base::names(info), [10:56:14.438] info) [10:56:14.438] info <- base::paste(info, collapse = "; ") [10:56:14.438] if (!has_future) { [10:56:14.438] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:14.438] info) [10:56:14.438] } [10:56:14.438] else { [10:56:14.438] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:14.438] info, version) [10:56:14.438] } [10:56:14.438] base::stop(msg) [10:56:14.438] } [10:56:14.438] }) [10:56:14.438] } [10:56:14.438] ...future.strategy.old <- future::plan("list") [10:56:14.438] options(future.plan = NULL) [10:56:14.438] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.438] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:14.438] } [10:56:14.438] ...future.workdir <- getwd() [10:56:14.438] } [10:56:14.438] ...future.oldOptions <- base::as.list(base::.Options) [10:56:14.438] ...future.oldEnvVars <- base::Sys.getenv() [10:56:14.438] } [10:56:14.438] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:14.438] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:14.438] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:14.438] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:14.438] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:14.438] future.stdout.windows.reencode = NULL, width = 80L) [10:56:14.438] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:14.438] base::names(...future.oldOptions)) [10:56:14.438] } [10:56:14.438] if (FALSE) { [10:56:14.438] } [10:56:14.438] else { [10:56:14.438] if (TRUE) { [10:56:14.438] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:14.438] open = "w") [10:56:14.438] } [10:56:14.438] else { [10:56:14.438] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:14.438] windows = "NUL", "/dev/null"), open = "w") [10:56:14.438] } [10:56:14.438] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:14.438] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:14.438] base::sink(type = "output", split = FALSE) [10:56:14.438] base::close(...future.stdout) [10:56:14.438] }, add = TRUE) [10:56:14.438] } [10:56:14.438] ...future.frame <- base::sys.nframe() [10:56:14.438] ...future.conditions <- base::list() [10:56:14.438] ...future.rng <- base::globalenv()$.Random.seed [10:56:14.438] if (FALSE) { [10:56:14.438] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:14.438] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:14.438] } [10:56:14.438] ...future.result <- base::tryCatch({ [10:56:14.438] base::withCallingHandlers({ [10:56:14.438] ...future.value <- base::withVisible(base::local(NA)) [10:56:14.438] future::FutureResult(value = ...future.value$value, [10:56:14.438] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.438] ...future.rng), globalenv = if (FALSE) [10:56:14.438] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:14.438] ...future.globalenv.names)) [10:56:14.438] else NULL, started = ...future.startTime, version = "1.8") [10:56:14.438] }, condition = base::local({ [10:56:14.438] c <- base::c [10:56:14.438] inherits <- base::inherits [10:56:14.438] invokeRestart <- base::invokeRestart [10:56:14.438] length <- base::length [10:56:14.438] list <- base::list [10:56:14.438] seq.int <- base::seq.int [10:56:14.438] signalCondition <- base::signalCondition [10:56:14.438] sys.calls <- base::sys.calls [10:56:14.438] `[[` <- base::`[[` [10:56:14.438] `+` <- base::`+` [10:56:14.438] `<<-` <- base::`<<-` [10:56:14.438] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:14.438] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:14.438] 3L)] [10:56:14.438] } [10:56:14.438] function(cond) { [10:56:14.438] is_error <- inherits(cond, "error") [10:56:14.438] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:14.438] NULL) [10:56:14.438] if (is_error) { [10:56:14.438] sessionInformation <- function() { [10:56:14.438] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:14.438] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:14.438] search = base::search(), system = base::Sys.info()) [10:56:14.438] } [10:56:14.438] ...future.conditions[[length(...future.conditions) + [10:56:14.438] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:14.438] cond$call), session = sessionInformation(), [10:56:14.438] timestamp = base::Sys.time(), signaled = 0L) [10:56:14.438] signalCondition(cond) [10:56:14.438] } [10:56:14.438] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:14.438] signal <- FALSE && inherits(cond, character(0)) [10:56:14.438] ...future.conditions[[length(...future.conditions) + [10:56:14.438] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:14.438] if (FALSE && !signal) { [10:56:14.438] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.438] { [10:56:14.438] inherits <- base::inherits [10:56:14.438] invokeRestart <- base::invokeRestart [10:56:14.438] is.null <- base::is.null [10:56:14.438] muffled <- FALSE [10:56:14.438] if (inherits(cond, "message")) { [10:56:14.438] muffled <- grepl(pattern, "muffleMessage") [10:56:14.438] if (muffled) [10:56:14.438] invokeRestart("muffleMessage") [10:56:14.438] } [10:56:14.438] else if (inherits(cond, "warning")) { [10:56:14.438] muffled <- grepl(pattern, "muffleWarning") [10:56:14.438] if (muffled) [10:56:14.438] invokeRestart("muffleWarning") [10:56:14.438] } [10:56:14.438] else if (inherits(cond, "condition")) { [10:56:14.438] if (!is.null(pattern)) { [10:56:14.438] computeRestarts <- base::computeRestarts [10:56:14.438] grepl <- base::grepl [10:56:14.438] restarts <- computeRestarts(cond) [10:56:14.438] for (restart in restarts) { [10:56:14.438] name <- restart$name [10:56:14.438] if (is.null(name)) [10:56:14.438] next [10:56:14.438] if (!grepl(pattern, name)) [10:56:14.438] next [10:56:14.438] invokeRestart(restart) [10:56:14.438] muffled <- TRUE [10:56:14.438] break [10:56:14.438] } [10:56:14.438] } [10:56:14.438] } [10:56:14.438] invisible(muffled) [10:56:14.438] } [10:56:14.438] muffleCondition(cond, pattern = "^muffle") [10:56:14.438] } [10:56:14.438] } [10:56:14.438] else { [10:56:14.438] if (TRUE) { [10:56:14.438] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.438] { [10:56:14.438] inherits <- base::inherits [10:56:14.438] invokeRestart <- base::invokeRestart [10:56:14.438] is.null <- base::is.null [10:56:14.438] muffled <- FALSE [10:56:14.438] if (inherits(cond, "message")) { [10:56:14.438] muffled <- grepl(pattern, "muffleMessage") [10:56:14.438] if (muffled) [10:56:14.438] invokeRestart("muffleMessage") [10:56:14.438] } [10:56:14.438] else if (inherits(cond, "warning")) { [10:56:14.438] muffled <- grepl(pattern, "muffleWarning") [10:56:14.438] if (muffled) [10:56:14.438] invokeRestart("muffleWarning") [10:56:14.438] } [10:56:14.438] else if (inherits(cond, "condition")) { [10:56:14.438] if (!is.null(pattern)) { [10:56:14.438] computeRestarts <- base::computeRestarts [10:56:14.438] grepl <- base::grepl [10:56:14.438] restarts <- computeRestarts(cond) [10:56:14.438] for (restart in restarts) { [10:56:14.438] name <- restart$name [10:56:14.438] if (is.null(name)) [10:56:14.438] next [10:56:14.438] if (!grepl(pattern, name)) [10:56:14.438] next [10:56:14.438] invokeRestart(restart) [10:56:14.438] muffled <- TRUE [10:56:14.438] break [10:56:14.438] } [10:56:14.438] } [10:56:14.438] } [10:56:14.438] invisible(muffled) [10:56:14.438] } [10:56:14.438] muffleCondition(cond, pattern = "^muffle") [10:56:14.438] } [10:56:14.438] } [10:56:14.438] } [10:56:14.438] })) [10:56:14.438] }, error = function(ex) { [10:56:14.438] base::structure(base::list(value = NULL, visible = NULL, [10:56:14.438] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.438] ...future.rng), started = ...future.startTime, [10:56:14.438] finished = Sys.time(), session_uuid = NA_character_, [10:56:14.438] version = "1.8"), class = "FutureResult") [10:56:14.438] }, finally = { [10:56:14.438] if (!identical(...future.workdir, getwd())) [10:56:14.438] setwd(...future.workdir) [10:56:14.438] { [10:56:14.438] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:14.438] ...future.oldOptions$nwarnings <- NULL [10:56:14.438] } [10:56:14.438] base::options(...future.oldOptions) [10:56:14.438] if (.Platform$OS.type == "windows") { [10:56:14.438] old_names <- names(...future.oldEnvVars) [10:56:14.438] envs <- base::Sys.getenv() [10:56:14.438] names <- names(envs) [10:56:14.438] common <- intersect(names, old_names) [10:56:14.438] added <- setdiff(names, old_names) [10:56:14.438] removed <- setdiff(old_names, names) [10:56:14.438] changed <- common[...future.oldEnvVars[common] != [10:56:14.438] envs[common]] [10:56:14.438] NAMES <- toupper(changed) [10:56:14.438] args <- list() [10:56:14.438] for (kk in seq_along(NAMES)) { [10:56:14.438] name <- changed[[kk]] [10:56:14.438] NAME <- NAMES[[kk]] [10:56:14.438] if (name != NAME && is.element(NAME, old_names)) [10:56:14.438] next [10:56:14.438] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.438] } [10:56:14.438] NAMES <- toupper(added) [10:56:14.438] for (kk in seq_along(NAMES)) { [10:56:14.438] name <- added[[kk]] [10:56:14.438] NAME <- NAMES[[kk]] [10:56:14.438] if (name != NAME && is.element(NAME, old_names)) [10:56:14.438] next [10:56:14.438] args[[name]] <- "" [10:56:14.438] } [10:56:14.438] NAMES <- toupper(removed) [10:56:14.438] for (kk in seq_along(NAMES)) { [10:56:14.438] name <- removed[[kk]] [10:56:14.438] NAME <- NAMES[[kk]] [10:56:14.438] if (name != NAME && is.element(NAME, old_names)) [10:56:14.438] next [10:56:14.438] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.438] } [10:56:14.438] if (length(args) > 0) [10:56:14.438] base::do.call(base::Sys.setenv, args = args) [10:56:14.438] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:14.438] } [10:56:14.438] else { [10:56:14.438] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:14.438] } [10:56:14.438] { [10:56:14.438] if (base::length(...future.futureOptionsAdded) > [10:56:14.438] 0L) { [10:56:14.438] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:14.438] base::names(opts) <- ...future.futureOptionsAdded [10:56:14.438] base::options(opts) [10:56:14.438] } [10:56:14.438] { [10:56:14.438] NULL [10:56:14.438] options(future.plan = NULL) [10:56:14.438] if (is.na(NA_character_)) [10:56:14.438] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.438] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:14.438] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:14.438] .init = FALSE) [10:56:14.438] } [10:56:14.438] } [10:56:14.438] } [10:56:14.438] }) [10:56:14.438] if (TRUE) { [10:56:14.438] base::sink(type = "output", split = FALSE) [10:56:14.438] if (TRUE) { [10:56:14.438] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:14.438] } [10:56:14.438] else { [10:56:14.438] ...future.result["stdout"] <- base::list(NULL) [10:56:14.438] } [10:56:14.438] base::close(...future.stdout) [10:56:14.438] ...future.stdout <- NULL [10:56:14.438] } [10:56:14.438] ...future.result$conditions <- ...future.conditions [10:56:14.438] ...future.result$finished <- base::Sys.time() [10:56:14.438] ...future.result [10:56:14.438] } [10:56:14.553] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [10:56:14.553] plan(): nbrOfWorkers() = 2 > > message("*** Globals - formulas ...") *** Globals - formulas ... > > message("*** Globals - lm() ...") *** Globals - lm() ... > > ## From example("lm", package = "stats") > ctl <- c(4.17, 5.58, 5.18, 6.11, 4.50, 4.61, 5.17, 4.53, 5.33, 5.14) > trt <- c(4.81, 4.17, 4.41, 3.59, 5.87, 3.83, 6.03, 4.89, 4.32, 4.69) > group <- gl(2, 10, 20, labels = c("Ctl", "Trt")) > weight <- c(ctl, trt) > > ## Truth: > fit0 <- lm(weight ~ group - 1) > print(fit0) Call: lm(formula = weight ~ group - 1) Coefficients: groupCtl groupTrt 5.032 4.661 > > ## Explicit future > f <- future({ lm(weight ~ group - 1) }) [10:56:14.558] getGlobalsAndPackages() ... [10:56:14.558] Searching for globals... [10:56:14.569] - globals found: [6] '{', 'lm', 'weight', '-', 'group', '~' [10:56:14.569] Searching for globals ... DONE [10:56:14.569] Resolving globals: FALSE [10:56:14.570] The total size of the 2 globals is 896 bytes (896 bytes) [10:56:14.571] The total size of the 2 globals exported for future expression ('{; lm(weight ~ group - 1); }') is 896 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are two globals: 'group' (688 bytes of class 'numeric') and 'weight' (208 bytes of class 'numeric') [10:56:14.571] - globals: [2] 'weight', 'group' [10:56:14.571] - packages: [1] 'stats' [10:56:14.572] getGlobalsAndPackages() ... DONE [10:56:14.572] run() for 'Future' ... [10:56:14.572] - state: 'created' [10:56:14.573] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:14.575] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:14.575] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:14.576] - Field: 'label' [10:56:14.576] - Field: 'local' [10:56:14.576] - Field: 'owner' [10:56:14.576] - Field: 'envir' [10:56:14.576] - Field: 'packages' [10:56:14.576] - Field: 'gc' [10:56:14.577] - Field: 'conditions' [10:56:14.577] - Field: 'expr' [10:56:14.577] - Field: 'uuid' [10:56:14.577] - Field: 'seed' [10:56:14.577] - Field: 'version' [10:56:14.578] - Field: 'result' [10:56:14.578] - Field: 'asynchronous' [10:56:14.578] - Field: 'calls' [10:56:14.578] - Field: 'globals' [10:56:14.578] - Field: 'stdout' [10:56:14.578] - Field: 'earlySignal' [10:56:14.579] - Field: 'lazy' [10:56:14.579] - Field: 'state' [10:56:14.579] - Field: '.cluster' [10:56:14.579] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:14.579] - Launch lazy future ... [10:56:14.579] Packages needed by the future expression (n = 1): 'stats' [10:56:14.580] Packages needed by future strategies (n = 0): [10:56:14.580] { [10:56:14.580] { [10:56:14.580] { [10:56:14.580] ...future.startTime <- base::Sys.time() [10:56:14.580] { [10:56:14.580] { [10:56:14.580] { [10:56:14.580] { [10:56:14.580] base::local({ [10:56:14.580] has_future <- base::requireNamespace("future", [10:56:14.580] quietly = TRUE) [10:56:14.580] if (has_future) { [10:56:14.580] ns <- base::getNamespace("future") [10:56:14.580] version <- ns[[".package"]][["version"]] [10:56:14.580] if (is.null(version)) [10:56:14.580] version <- utils::packageVersion("future") [10:56:14.580] } [10:56:14.580] else { [10:56:14.580] version <- NULL [10:56:14.580] } [10:56:14.580] if (!has_future || version < "1.8.0") { [10:56:14.580] info <- base::c(r_version = base::gsub("R version ", [10:56:14.580] "", base::R.version$version.string), [10:56:14.580] platform = base::sprintf("%s (%s-bit)", [10:56:14.580] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:14.580] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:14.580] "release", "version")], collapse = " "), [10:56:14.580] hostname = base::Sys.info()[["nodename"]]) [10:56:14.580] info <- base::sprintf("%s: %s", base::names(info), [10:56:14.580] info) [10:56:14.580] info <- base::paste(info, collapse = "; ") [10:56:14.580] if (!has_future) { [10:56:14.580] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:14.580] info) [10:56:14.580] } [10:56:14.580] else { [10:56:14.580] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:14.580] info, version) [10:56:14.580] } [10:56:14.580] base::stop(msg) [10:56:14.580] } [10:56:14.580] }) [10:56:14.580] } [10:56:14.580] base::local({ [10:56:14.580] for (pkg in "stats") { [10:56:14.580] base::loadNamespace(pkg) [10:56:14.580] base::library(pkg, character.only = TRUE) [10:56:14.580] } [10:56:14.580] }) [10:56:14.580] } [10:56:14.580] ...future.strategy.old <- future::plan("list") [10:56:14.580] options(future.plan = NULL) [10:56:14.580] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.580] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:14.580] } [10:56:14.580] ...future.workdir <- getwd() [10:56:14.580] } [10:56:14.580] ...future.oldOptions <- base::as.list(base::.Options) [10:56:14.580] ...future.oldEnvVars <- base::Sys.getenv() [10:56:14.580] } [10:56:14.580] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:14.580] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:14.580] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:14.580] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:14.580] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:14.580] future.stdout.windows.reencode = NULL, width = 80L) [10:56:14.580] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:14.580] base::names(...future.oldOptions)) [10:56:14.580] } [10:56:14.580] if (FALSE) { [10:56:14.580] } [10:56:14.580] else { [10:56:14.580] if (TRUE) { [10:56:14.580] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:14.580] open = "w") [10:56:14.580] } [10:56:14.580] else { [10:56:14.580] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:14.580] windows = "NUL", "/dev/null"), open = "w") [10:56:14.580] } [10:56:14.580] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:14.580] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:14.580] base::sink(type = "output", split = FALSE) [10:56:14.580] base::close(...future.stdout) [10:56:14.580] }, add = TRUE) [10:56:14.580] } [10:56:14.580] ...future.frame <- base::sys.nframe() [10:56:14.580] ...future.conditions <- base::list() [10:56:14.580] ...future.rng <- base::globalenv()$.Random.seed [10:56:14.580] if (FALSE) { [10:56:14.580] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:14.580] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:14.580] } [10:56:14.580] ...future.result <- base::tryCatch({ [10:56:14.580] base::withCallingHandlers({ [10:56:14.580] ...future.value <- base::withVisible(base::local({ [10:56:14.580] lm(weight ~ group - 1) [10:56:14.580] })) [10:56:14.580] future::FutureResult(value = ...future.value$value, [10:56:14.580] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.580] ...future.rng), globalenv = if (FALSE) [10:56:14.580] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:14.580] ...future.globalenv.names)) [10:56:14.580] else NULL, started = ...future.startTime, version = "1.8") [10:56:14.580] }, condition = base::local({ [10:56:14.580] c <- base::c [10:56:14.580] inherits <- base::inherits [10:56:14.580] invokeRestart <- base::invokeRestart [10:56:14.580] length <- base::length [10:56:14.580] list <- base::list [10:56:14.580] seq.int <- base::seq.int [10:56:14.580] signalCondition <- base::signalCondition [10:56:14.580] sys.calls <- base::sys.calls [10:56:14.580] `[[` <- base::`[[` [10:56:14.580] `+` <- base::`+` [10:56:14.580] `<<-` <- base::`<<-` [10:56:14.580] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:14.580] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:14.580] 3L)] [10:56:14.580] } [10:56:14.580] function(cond) { [10:56:14.580] is_error <- inherits(cond, "error") [10:56:14.580] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:14.580] NULL) [10:56:14.580] if (is_error) { [10:56:14.580] sessionInformation <- function() { [10:56:14.580] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:14.580] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:14.580] search = base::search(), system = base::Sys.info()) [10:56:14.580] } [10:56:14.580] ...future.conditions[[length(...future.conditions) + [10:56:14.580] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:14.580] cond$call), session = sessionInformation(), [10:56:14.580] timestamp = base::Sys.time(), signaled = 0L) [10:56:14.580] signalCondition(cond) [10:56:14.580] } [10:56:14.580] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:14.580] signal <- FALSE && inherits(cond, character(0)) [10:56:14.580] ...future.conditions[[length(...future.conditions) + [10:56:14.580] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:14.580] if (FALSE && !signal) { [10:56:14.580] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.580] { [10:56:14.580] inherits <- base::inherits [10:56:14.580] invokeRestart <- base::invokeRestart [10:56:14.580] is.null <- base::is.null [10:56:14.580] muffled <- FALSE [10:56:14.580] if (inherits(cond, "message")) { [10:56:14.580] muffled <- grepl(pattern, "muffleMessage") [10:56:14.580] if (muffled) [10:56:14.580] invokeRestart("muffleMessage") [10:56:14.580] } [10:56:14.580] else if (inherits(cond, "warning")) { [10:56:14.580] muffled <- grepl(pattern, "muffleWarning") [10:56:14.580] if (muffled) [10:56:14.580] invokeRestart("muffleWarning") [10:56:14.580] } [10:56:14.580] else if (inherits(cond, "condition")) { [10:56:14.580] if (!is.null(pattern)) { [10:56:14.580] computeRestarts <- base::computeRestarts [10:56:14.580] grepl <- base::grepl [10:56:14.580] restarts <- computeRestarts(cond) [10:56:14.580] for (restart in restarts) { [10:56:14.580] name <- restart$name [10:56:14.580] if (is.null(name)) [10:56:14.580] next [10:56:14.580] if (!grepl(pattern, name)) [10:56:14.580] next [10:56:14.580] invokeRestart(restart) [10:56:14.580] muffled <- TRUE [10:56:14.580] break [10:56:14.580] } [10:56:14.580] } [10:56:14.580] } [10:56:14.580] invisible(muffled) [10:56:14.580] } [10:56:14.580] muffleCondition(cond, pattern = "^muffle") [10:56:14.580] } [10:56:14.580] } [10:56:14.580] else { [10:56:14.580] if (TRUE) { [10:56:14.580] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.580] { [10:56:14.580] inherits <- base::inherits [10:56:14.580] invokeRestart <- base::invokeRestart [10:56:14.580] is.null <- base::is.null [10:56:14.580] muffled <- FALSE [10:56:14.580] if (inherits(cond, "message")) { [10:56:14.580] muffled <- grepl(pattern, "muffleMessage") [10:56:14.580] if (muffled) [10:56:14.580] invokeRestart("muffleMessage") [10:56:14.580] } [10:56:14.580] else if (inherits(cond, "warning")) { [10:56:14.580] muffled <- grepl(pattern, "muffleWarning") [10:56:14.580] if (muffled) [10:56:14.580] invokeRestart("muffleWarning") [10:56:14.580] } [10:56:14.580] else if (inherits(cond, "condition")) { [10:56:14.580] if (!is.null(pattern)) { [10:56:14.580] computeRestarts <- base::computeRestarts [10:56:14.580] grepl <- base::grepl [10:56:14.580] restarts <- computeRestarts(cond) [10:56:14.580] for (restart in restarts) { [10:56:14.580] name <- restart$name [10:56:14.580] if (is.null(name)) [10:56:14.580] next [10:56:14.580] if (!grepl(pattern, name)) [10:56:14.580] next [10:56:14.580] invokeRestart(restart) [10:56:14.580] muffled <- TRUE [10:56:14.580] break [10:56:14.580] } [10:56:14.580] } [10:56:14.580] } [10:56:14.580] invisible(muffled) [10:56:14.580] } [10:56:14.580] muffleCondition(cond, pattern = "^muffle") [10:56:14.580] } [10:56:14.580] } [10:56:14.580] } [10:56:14.580] })) [10:56:14.580] }, error = function(ex) { [10:56:14.580] base::structure(base::list(value = NULL, visible = NULL, [10:56:14.580] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.580] ...future.rng), started = ...future.startTime, [10:56:14.580] finished = Sys.time(), session_uuid = NA_character_, [10:56:14.580] version = "1.8"), class = "FutureResult") [10:56:14.580] }, finally = { [10:56:14.580] if (!identical(...future.workdir, getwd())) [10:56:14.580] setwd(...future.workdir) [10:56:14.580] { [10:56:14.580] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:14.580] ...future.oldOptions$nwarnings <- NULL [10:56:14.580] } [10:56:14.580] base::options(...future.oldOptions) [10:56:14.580] if (.Platform$OS.type == "windows") { [10:56:14.580] old_names <- names(...future.oldEnvVars) [10:56:14.580] envs <- base::Sys.getenv() [10:56:14.580] names <- names(envs) [10:56:14.580] common <- intersect(names, old_names) [10:56:14.580] added <- setdiff(names, old_names) [10:56:14.580] removed <- setdiff(old_names, names) [10:56:14.580] changed <- common[...future.oldEnvVars[common] != [10:56:14.580] envs[common]] [10:56:14.580] NAMES <- toupper(changed) [10:56:14.580] args <- list() [10:56:14.580] for (kk in seq_along(NAMES)) { [10:56:14.580] name <- changed[[kk]] [10:56:14.580] NAME <- NAMES[[kk]] [10:56:14.580] if (name != NAME && is.element(NAME, old_names)) [10:56:14.580] next [10:56:14.580] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.580] } [10:56:14.580] NAMES <- toupper(added) [10:56:14.580] for (kk in seq_along(NAMES)) { [10:56:14.580] name <- added[[kk]] [10:56:14.580] NAME <- NAMES[[kk]] [10:56:14.580] if (name != NAME && is.element(NAME, old_names)) [10:56:14.580] next [10:56:14.580] args[[name]] <- "" [10:56:14.580] } [10:56:14.580] NAMES <- toupper(removed) [10:56:14.580] for (kk in seq_along(NAMES)) { [10:56:14.580] name <- removed[[kk]] [10:56:14.580] NAME <- NAMES[[kk]] [10:56:14.580] if (name != NAME && is.element(NAME, old_names)) [10:56:14.580] next [10:56:14.580] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.580] } [10:56:14.580] if (length(args) > 0) [10:56:14.580] base::do.call(base::Sys.setenv, args = args) [10:56:14.580] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:14.580] } [10:56:14.580] else { [10:56:14.580] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:14.580] } [10:56:14.580] { [10:56:14.580] if (base::length(...future.futureOptionsAdded) > [10:56:14.580] 0L) { [10:56:14.580] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:14.580] base::names(opts) <- ...future.futureOptionsAdded [10:56:14.580] base::options(opts) [10:56:14.580] } [10:56:14.580] { [10:56:14.580] NULL [10:56:14.580] options(future.plan = NULL) [10:56:14.580] if (is.na(NA_character_)) [10:56:14.580] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.580] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:14.580] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:14.580] .init = FALSE) [10:56:14.580] } [10:56:14.580] } [10:56:14.580] } [10:56:14.580] }) [10:56:14.580] if (TRUE) { [10:56:14.580] base::sink(type = "output", split = FALSE) [10:56:14.580] if (TRUE) { [10:56:14.580] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:14.580] } [10:56:14.580] else { [10:56:14.580] ...future.result["stdout"] <- base::list(NULL) [10:56:14.580] } [10:56:14.580] base::close(...future.stdout) [10:56:14.580] ...future.stdout <- NULL [10:56:14.580] } [10:56:14.580] ...future.result$conditions <- ...future.conditions [10:56:14.580] ...future.result$finished <- base::Sys.time() [10:56:14.580] ...future.result [10:56:14.580] } [10:56:14.584] - Launch lazy future ... done [10:56:14.584] run() for 'MiraiFuture' ... done > fit <- value(f) > print(fit) Call: lm(formula = weight ~ group - 1) Coefficients: groupCtl groupTrt 5.032 4.661 > stopifnot(all.equal(fit, fit0)) > > ## Future assignment > fit %<-% { lm(weight ~ group - 1) } [10:56:14.598] getGlobalsAndPackages() ... [10:56:14.598] Searching for globals... [10:56:14.600] - globals found: [6] '{', 'lm', 'weight', '-', 'group', '~' [10:56:14.600] Searching for globals ... DONE [10:56:14.600] Resolving globals: FALSE [10:56:14.601] The total size of the 2 globals is 896 bytes (896 bytes) [10:56:14.602] The total size of the 2 globals exported for future expression ('{; lm(weight ~ group - 1); }') is 896 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are two globals: 'group' (688 bytes of class 'numeric') and 'weight' (208 bytes of class 'numeric') [10:56:14.602] - globals: [2] 'weight', 'group' [10:56:14.602] - packages: [1] 'stats' [10:56:14.602] getGlobalsAndPackages() ... DONE [10:56:14.603] run() for 'Future' ... [10:56:14.603] - state: 'created' [10:56:14.603] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:14.608] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:14.608] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:14.608] - Field: 'label' [10:56:14.608] - Field: 'local' [10:56:14.609] - Field: 'owner' [10:56:14.609] - Field: 'envir' [10:56:14.609] - Field: 'packages' [10:56:14.609] - Field: 'gc' [10:56:14.609] - Field: 'conditions' [10:56:14.609] - Field: 'expr' [10:56:14.610] - Field: 'uuid' [10:56:14.610] - Field: 'seed' [10:56:14.610] - Field: 'version' [10:56:14.610] - Field: 'result' [10:56:14.610] - Field: 'asynchronous' [10:56:14.610] - Field: 'calls' [10:56:14.611] - Field: 'globals' [10:56:14.611] - Field: 'stdout' [10:56:14.611] - Field: 'earlySignal' [10:56:14.611] - Field: 'lazy' [10:56:14.611] - Field: 'state' [10:56:14.612] - Field: '.cluster' [10:56:14.612] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:14.612] - Launch lazy future ... [10:56:14.612] Packages needed by the future expression (n = 1): 'stats' [10:56:14.612] Packages needed by future strategies (n = 0): [10:56:14.613] { [10:56:14.613] { [10:56:14.613] { [10:56:14.613] ...future.startTime <- base::Sys.time() [10:56:14.613] { [10:56:14.613] { [10:56:14.613] { [10:56:14.613] { [10:56:14.613] base::local({ [10:56:14.613] has_future <- base::requireNamespace("future", [10:56:14.613] quietly = TRUE) [10:56:14.613] if (has_future) { [10:56:14.613] ns <- base::getNamespace("future") [10:56:14.613] version <- ns[[".package"]][["version"]] [10:56:14.613] if (is.null(version)) [10:56:14.613] version <- utils::packageVersion("future") [10:56:14.613] } [10:56:14.613] else { [10:56:14.613] version <- NULL [10:56:14.613] } [10:56:14.613] if (!has_future || version < "1.8.0") { [10:56:14.613] info <- base::c(r_version = base::gsub("R version ", [10:56:14.613] "", base::R.version$version.string), [10:56:14.613] platform = base::sprintf("%s (%s-bit)", [10:56:14.613] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:14.613] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:14.613] "release", "version")], collapse = " "), [10:56:14.613] hostname = base::Sys.info()[["nodename"]]) [10:56:14.613] info <- base::sprintf("%s: %s", base::names(info), [10:56:14.613] info) [10:56:14.613] info <- base::paste(info, collapse = "; ") [10:56:14.613] if (!has_future) { [10:56:14.613] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:14.613] info) [10:56:14.613] } [10:56:14.613] else { [10:56:14.613] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:14.613] info, version) [10:56:14.613] } [10:56:14.613] base::stop(msg) [10:56:14.613] } [10:56:14.613] }) [10:56:14.613] } [10:56:14.613] base::local({ [10:56:14.613] for (pkg in "stats") { [10:56:14.613] base::loadNamespace(pkg) [10:56:14.613] base::library(pkg, character.only = TRUE) [10:56:14.613] } [10:56:14.613] }) [10:56:14.613] } [10:56:14.613] ...future.strategy.old <- future::plan("list") [10:56:14.613] options(future.plan = NULL) [10:56:14.613] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.613] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:14.613] } [10:56:14.613] ...future.workdir <- getwd() [10:56:14.613] } [10:56:14.613] ...future.oldOptions <- base::as.list(base::.Options) [10:56:14.613] ...future.oldEnvVars <- base::Sys.getenv() [10:56:14.613] } [10:56:14.613] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:14.613] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:14.613] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:14.613] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:14.613] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:14.613] future.stdout.windows.reencode = NULL, width = 80L) [10:56:14.613] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:14.613] base::names(...future.oldOptions)) [10:56:14.613] } [10:56:14.613] if (FALSE) { [10:56:14.613] } [10:56:14.613] else { [10:56:14.613] if (TRUE) { [10:56:14.613] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:14.613] open = "w") [10:56:14.613] } [10:56:14.613] else { [10:56:14.613] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:14.613] windows = "NUL", "/dev/null"), open = "w") [10:56:14.613] } [10:56:14.613] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:14.613] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:14.613] base::sink(type = "output", split = FALSE) [10:56:14.613] base::close(...future.stdout) [10:56:14.613] }, add = TRUE) [10:56:14.613] } [10:56:14.613] ...future.frame <- base::sys.nframe() [10:56:14.613] ...future.conditions <- base::list() [10:56:14.613] ...future.rng <- base::globalenv()$.Random.seed [10:56:14.613] if (FALSE) { [10:56:14.613] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:14.613] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:14.613] } [10:56:14.613] ...future.result <- base::tryCatch({ [10:56:14.613] base::withCallingHandlers({ [10:56:14.613] ...future.value <- base::withVisible(base::local({ [10:56:14.613] lm(weight ~ group - 1) [10:56:14.613] })) [10:56:14.613] future::FutureResult(value = ...future.value$value, [10:56:14.613] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.613] ...future.rng), globalenv = if (FALSE) [10:56:14.613] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:14.613] ...future.globalenv.names)) [10:56:14.613] else NULL, started = ...future.startTime, version = "1.8") [10:56:14.613] }, condition = base::local({ [10:56:14.613] c <- base::c [10:56:14.613] inherits <- base::inherits [10:56:14.613] invokeRestart <- base::invokeRestart [10:56:14.613] length <- base::length [10:56:14.613] list <- base::list [10:56:14.613] seq.int <- base::seq.int [10:56:14.613] signalCondition <- base::signalCondition [10:56:14.613] sys.calls <- base::sys.calls [10:56:14.613] `[[` <- base::`[[` [10:56:14.613] `+` <- base::`+` [10:56:14.613] `<<-` <- base::`<<-` [10:56:14.613] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:14.613] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:14.613] 3L)] [10:56:14.613] } [10:56:14.613] function(cond) { [10:56:14.613] is_error <- inherits(cond, "error") [10:56:14.613] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:14.613] NULL) [10:56:14.613] if (is_error) { [10:56:14.613] sessionInformation <- function() { [10:56:14.613] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:14.613] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:14.613] search = base::search(), system = base::Sys.info()) [10:56:14.613] } [10:56:14.613] ...future.conditions[[length(...future.conditions) + [10:56:14.613] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:14.613] cond$call), session = sessionInformation(), [10:56:14.613] timestamp = base::Sys.time(), signaled = 0L) [10:56:14.613] signalCondition(cond) [10:56:14.613] } [10:56:14.613] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:14.613] signal <- FALSE && inherits(cond, character(0)) [10:56:14.613] ...future.conditions[[length(...future.conditions) + [10:56:14.613] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:14.613] if (FALSE && !signal) { [10:56:14.613] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.613] { [10:56:14.613] inherits <- base::inherits [10:56:14.613] invokeRestart <- base::invokeRestart [10:56:14.613] is.null <- base::is.null [10:56:14.613] muffled <- FALSE [10:56:14.613] if (inherits(cond, "message")) { [10:56:14.613] muffled <- grepl(pattern, "muffleMessage") [10:56:14.613] if (muffled) [10:56:14.613] invokeRestart("muffleMessage") [10:56:14.613] } [10:56:14.613] else if (inherits(cond, "warning")) { [10:56:14.613] muffled <- grepl(pattern, "muffleWarning") [10:56:14.613] if (muffled) [10:56:14.613] invokeRestart("muffleWarning") [10:56:14.613] } [10:56:14.613] else if (inherits(cond, "condition")) { [10:56:14.613] if (!is.null(pattern)) { [10:56:14.613] computeRestarts <- base::computeRestarts [10:56:14.613] grepl <- base::grepl [10:56:14.613] restarts <- computeRestarts(cond) [10:56:14.613] for (restart in restarts) { [10:56:14.613] name <- restart$name [10:56:14.613] if (is.null(name)) [10:56:14.613] next [10:56:14.613] if (!grepl(pattern, name)) [10:56:14.613] next [10:56:14.613] invokeRestart(restart) [10:56:14.613] muffled <- TRUE [10:56:14.613] break [10:56:14.613] } [10:56:14.613] } [10:56:14.613] } [10:56:14.613] invisible(muffled) [10:56:14.613] } [10:56:14.613] muffleCondition(cond, pattern = "^muffle") [10:56:14.613] } [10:56:14.613] } [10:56:14.613] else { [10:56:14.613] if (TRUE) { [10:56:14.613] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.613] { [10:56:14.613] inherits <- base::inherits [10:56:14.613] invokeRestart <- base::invokeRestart [10:56:14.613] is.null <- base::is.null [10:56:14.613] muffled <- FALSE [10:56:14.613] if (inherits(cond, "message")) { [10:56:14.613] muffled <- grepl(pattern, "muffleMessage") [10:56:14.613] if (muffled) [10:56:14.613] invokeRestart("muffleMessage") [10:56:14.613] } [10:56:14.613] else if (inherits(cond, "warning")) { [10:56:14.613] muffled <- grepl(pattern, "muffleWarning") [10:56:14.613] if (muffled) [10:56:14.613] invokeRestart("muffleWarning") [10:56:14.613] } [10:56:14.613] else if (inherits(cond, "condition")) { [10:56:14.613] if (!is.null(pattern)) { [10:56:14.613] computeRestarts <- base::computeRestarts [10:56:14.613] grepl <- base::grepl [10:56:14.613] restarts <- computeRestarts(cond) [10:56:14.613] for (restart in restarts) { [10:56:14.613] name <- restart$name [10:56:14.613] if (is.null(name)) [10:56:14.613] next [10:56:14.613] if (!grepl(pattern, name)) [10:56:14.613] next [10:56:14.613] invokeRestart(restart) [10:56:14.613] muffled <- TRUE [10:56:14.613] break [10:56:14.613] } [10:56:14.613] } [10:56:14.613] } [10:56:14.613] invisible(muffled) [10:56:14.613] } [10:56:14.613] muffleCondition(cond, pattern = "^muffle") [10:56:14.613] } [10:56:14.613] } [10:56:14.613] } [10:56:14.613] })) [10:56:14.613] }, error = function(ex) { [10:56:14.613] base::structure(base::list(value = NULL, visible = NULL, [10:56:14.613] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.613] ...future.rng), started = ...future.startTime, [10:56:14.613] finished = Sys.time(), session_uuid = NA_character_, [10:56:14.613] version = "1.8"), class = "FutureResult") [10:56:14.613] }, finally = { [10:56:14.613] if (!identical(...future.workdir, getwd())) [10:56:14.613] setwd(...future.workdir) [10:56:14.613] { [10:56:14.613] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:14.613] ...future.oldOptions$nwarnings <- NULL [10:56:14.613] } [10:56:14.613] base::options(...future.oldOptions) [10:56:14.613] if (.Platform$OS.type == "windows") { [10:56:14.613] old_names <- names(...future.oldEnvVars) [10:56:14.613] envs <- base::Sys.getenv() [10:56:14.613] names <- names(envs) [10:56:14.613] common <- intersect(names, old_names) [10:56:14.613] added <- setdiff(names, old_names) [10:56:14.613] removed <- setdiff(old_names, names) [10:56:14.613] changed <- common[...future.oldEnvVars[common] != [10:56:14.613] envs[common]] [10:56:14.613] NAMES <- toupper(changed) [10:56:14.613] args <- list() [10:56:14.613] for (kk in seq_along(NAMES)) { [10:56:14.613] name <- changed[[kk]] [10:56:14.613] NAME <- NAMES[[kk]] [10:56:14.613] if (name != NAME && is.element(NAME, old_names)) [10:56:14.613] next [10:56:14.613] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.613] } [10:56:14.613] NAMES <- toupper(added) [10:56:14.613] for (kk in seq_along(NAMES)) { [10:56:14.613] name <- added[[kk]] [10:56:14.613] NAME <- NAMES[[kk]] [10:56:14.613] if (name != NAME && is.element(NAME, old_names)) [10:56:14.613] next [10:56:14.613] args[[name]] <- "" [10:56:14.613] } [10:56:14.613] NAMES <- toupper(removed) [10:56:14.613] for (kk in seq_along(NAMES)) { [10:56:14.613] name <- removed[[kk]] [10:56:14.613] NAME <- NAMES[[kk]] [10:56:14.613] if (name != NAME && is.element(NAME, old_names)) [10:56:14.613] next [10:56:14.613] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.613] } [10:56:14.613] if (length(args) > 0) [10:56:14.613] base::do.call(base::Sys.setenv, args = args) [10:56:14.613] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:14.613] } [10:56:14.613] else { [10:56:14.613] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:14.613] } [10:56:14.613] { [10:56:14.613] if (base::length(...future.futureOptionsAdded) > [10:56:14.613] 0L) { [10:56:14.613] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:14.613] base::names(opts) <- ...future.futureOptionsAdded [10:56:14.613] base::options(opts) [10:56:14.613] } [10:56:14.613] { [10:56:14.613] NULL [10:56:14.613] options(future.plan = NULL) [10:56:14.613] if (is.na(NA_character_)) [10:56:14.613] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.613] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:14.613] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:14.613] .init = FALSE) [10:56:14.613] } [10:56:14.613] } [10:56:14.613] } [10:56:14.613] }) [10:56:14.613] if (TRUE) { [10:56:14.613] base::sink(type = "output", split = FALSE) [10:56:14.613] if (TRUE) { [10:56:14.613] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:14.613] } [10:56:14.613] else { [10:56:14.613] ...future.result["stdout"] <- base::list(NULL) [10:56:14.613] } [10:56:14.613] base::close(...future.stdout) [10:56:14.613] ...future.stdout <- NULL [10:56:14.613] } [10:56:14.613] ...future.result$conditions <- ...future.conditions [10:56:14.613] ...future.result$finished <- base::Sys.time() [10:56:14.613] ...future.result [10:56:14.613] } [10:56:14.617] - Launch lazy future ... done [10:56:14.617] run() for 'MiraiFuture' ... done > print(fit) Call: lm(formula = weight ~ group - 1) Coefficients: groupCtl groupTrt 5.032 4.661 > stopifnot(all.equal(fit, fit0)) > > message("*** Globals - lm() ... DONE") *** Globals - lm() ... DONE > > > message("*** Globals - one-side formulas, e.g. xtabs(~ x) ...") *** Globals - one-side formulas, e.g. xtabs(~ x) ... > > x <- c(1, 1, 2, 2, 2) > > ## Truth: > tbl0 <- xtabs(~ x) > print(tbl0) x 1 2 2 3 > > ## Explicit future > f <- future({ xtabs(~ x) }) [10:56:14.627] getGlobalsAndPackages() ... [10:56:14.627] Searching for globals... [10:56:14.628] - globals found: [4] '{', 'xtabs', 'x', '~' [10:56:14.628] Searching for globals ... DONE [10:56:14.629] Resolving globals: FALSE [10:56:14.629] The total size of the 1 globals is 96 bytes (96 bytes) [10:56:14.630] The total size of the 1 globals exported for future expression ('{; xtabs(~x); }') is 96 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There is one global: 'x' (96 bytes of class 'numeric') [10:56:14.630] - globals: [1] 'x' [10:56:14.630] - packages: [1] 'stats' [10:56:14.630] getGlobalsAndPackages() ... DONE [10:56:14.631] run() for 'Future' ... [10:56:14.631] - state: 'created' [10:56:14.631] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:14.633] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:14.634] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:14.634] - Field: 'label' [10:56:14.634] - Field: 'local' [10:56:14.634] - Field: 'owner' [10:56:14.634] - Field: 'envir' [10:56:14.635] - Field: 'packages' [10:56:14.635] - Field: 'gc' [10:56:14.635] - Field: 'conditions' [10:56:14.635] - Field: 'expr' [10:56:14.635] - Field: 'uuid' [10:56:14.635] - Field: 'seed' [10:56:14.636] - Field: 'version' [10:56:14.636] - Field: 'result' [10:56:14.636] - Field: 'asynchronous' [10:56:14.636] - Field: 'calls' [10:56:14.636] - Field: 'globals' [10:56:14.637] - Field: 'stdout' [10:56:14.637] - Field: 'earlySignal' [10:56:14.637] - Field: 'lazy' [10:56:14.637] - Field: 'state' [10:56:14.637] - Field: '.cluster' [10:56:14.637] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:14.638] - Launch lazy future ... [10:56:14.638] Packages needed by the future expression (n = 1): 'stats' [10:56:14.638] Packages needed by future strategies (n = 0): [10:56:14.639] { [10:56:14.639] { [10:56:14.639] { [10:56:14.639] ...future.startTime <- base::Sys.time() [10:56:14.639] { [10:56:14.639] { [10:56:14.639] { [10:56:14.639] { [10:56:14.639] base::local({ [10:56:14.639] has_future <- base::requireNamespace("future", [10:56:14.639] quietly = TRUE) [10:56:14.639] if (has_future) { [10:56:14.639] ns <- base::getNamespace("future") [10:56:14.639] version <- ns[[".package"]][["version"]] [10:56:14.639] if (is.null(version)) [10:56:14.639] version <- utils::packageVersion("future") [10:56:14.639] } [10:56:14.639] else { [10:56:14.639] version <- NULL [10:56:14.639] } [10:56:14.639] if (!has_future || version < "1.8.0") { [10:56:14.639] info <- base::c(r_version = base::gsub("R version ", [10:56:14.639] "", base::R.version$version.string), [10:56:14.639] platform = base::sprintf("%s (%s-bit)", [10:56:14.639] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:14.639] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:14.639] "release", "version")], collapse = " "), [10:56:14.639] hostname = base::Sys.info()[["nodename"]]) [10:56:14.639] info <- base::sprintf("%s: %s", base::names(info), [10:56:14.639] info) [10:56:14.639] info <- base::paste(info, collapse = "; ") [10:56:14.639] if (!has_future) { [10:56:14.639] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:14.639] info) [10:56:14.639] } [10:56:14.639] else { [10:56:14.639] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:14.639] info, version) [10:56:14.639] } [10:56:14.639] base::stop(msg) [10:56:14.639] } [10:56:14.639] }) [10:56:14.639] } [10:56:14.639] base::local({ [10:56:14.639] for (pkg in "stats") { [10:56:14.639] base::loadNamespace(pkg) [10:56:14.639] base::library(pkg, character.only = TRUE) [10:56:14.639] } [10:56:14.639] }) [10:56:14.639] } [10:56:14.639] ...future.strategy.old <- future::plan("list") [10:56:14.639] options(future.plan = NULL) [10:56:14.639] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.639] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:14.639] } [10:56:14.639] ...future.workdir <- getwd() [10:56:14.639] } [10:56:14.639] ...future.oldOptions <- base::as.list(base::.Options) [10:56:14.639] ...future.oldEnvVars <- base::Sys.getenv() [10:56:14.639] } [10:56:14.639] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:14.639] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:14.639] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:14.639] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:14.639] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:14.639] future.stdout.windows.reencode = NULL, width = 80L) [10:56:14.639] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:14.639] base::names(...future.oldOptions)) [10:56:14.639] } [10:56:14.639] if (FALSE) { [10:56:14.639] } [10:56:14.639] else { [10:56:14.639] if (TRUE) { [10:56:14.639] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:14.639] open = "w") [10:56:14.639] } [10:56:14.639] else { [10:56:14.639] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:14.639] windows = "NUL", "/dev/null"), open = "w") [10:56:14.639] } [10:56:14.639] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:14.639] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:14.639] base::sink(type = "output", split = FALSE) [10:56:14.639] base::close(...future.stdout) [10:56:14.639] }, add = TRUE) [10:56:14.639] } [10:56:14.639] ...future.frame <- base::sys.nframe() [10:56:14.639] ...future.conditions <- base::list() [10:56:14.639] ...future.rng <- base::globalenv()$.Random.seed [10:56:14.639] if (FALSE) { [10:56:14.639] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:14.639] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:14.639] } [10:56:14.639] ...future.result <- base::tryCatch({ [10:56:14.639] base::withCallingHandlers({ [10:56:14.639] ...future.value <- base::withVisible(base::local({ [10:56:14.639] xtabs(~x) [10:56:14.639] })) [10:56:14.639] future::FutureResult(value = ...future.value$value, [10:56:14.639] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.639] ...future.rng), globalenv = if (FALSE) [10:56:14.639] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:14.639] ...future.globalenv.names)) [10:56:14.639] else NULL, started = ...future.startTime, version = "1.8") [10:56:14.639] }, condition = base::local({ [10:56:14.639] c <- base::c [10:56:14.639] inherits <- base::inherits [10:56:14.639] invokeRestart <- base::invokeRestart [10:56:14.639] length <- base::length [10:56:14.639] list <- base::list [10:56:14.639] seq.int <- base::seq.int [10:56:14.639] signalCondition <- base::signalCondition [10:56:14.639] sys.calls <- base::sys.calls [10:56:14.639] `[[` <- base::`[[` [10:56:14.639] `+` <- base::`+` [10:56:14.639] `<<-` <- base::`<<-` [10:56:14.639] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:14.639] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:14.639] 3L)] [10:56:14.639] } [10:56:14.639] function(cond) { [10:56:14.639] is_error <- inherits(cond, "error") [10:56:14.639] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:14.639] NULL) [10:56:14.639] if (is_error) { [10:56:14.639] sessionInformation <- function() { [10:56:14.639] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:14.639] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:14.639] search = base::search(), system = base::Sys.info()) [10:56:14.639] } [10:56:14.639] ...future.conditions[[length(...future.conditions) + [10:56:14.639] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:14.639] cond$call), session = sessionInformation(), [10:56:14.639] timestamp = base::Sys.time(), signaled = 0L) [10:56:14.639] signalCondition(cond) [10:56:14.639] } [10:56:14.639] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:14.639] signal <- FALSE && inherits(cond, character(0)) [10:56:14.639] ...future.conditions[[length(...future.conditions) + [10:56:14.639] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:14.639] if (FALSE && !signal) { [10:56:14.639] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.639] { [10:56:14.639] inherits <- base::inherits [10:56:14.639] invokeRestart <- base::invokeRestart [10:56:14.639] is.null <- base::is.null [10:56:14.639] muffled <- FALSE [10:56:14.639] if (inherits(cond, "message")) { [10:56:14.639] muffled <- grepl(pattern, "muffleMessage") [10:56:14.639] if (muffled) [10:56:14.639] invokeRestart("muffleMessage") [10:56:14.639] } [10:56:14.639] else if (inherits(cond, "warning")) { [10:56:14.639] muffled <- grepl(pattern, "muffleWarning") [10:56:14.639] if (muffled) [10:56:14.639] invokeRestart("muffleWarning") [10:56:14.639] } [10:56:14.639] else if (inherits(cond, "condition")) { [10:56:14.639] if (!is.null(pattern)) { [10:56:14.639] computeRestarts <- base::computeRestarts [10:56:14.639] grepl <- base::grepl [10:56:14.639] restarts <- computeRestarts(cond) [10:56:14.639] for (restart in restarts) { [10:56:14.639] name <- restart$name [10:56:14.639] if (is.null(name)) [10:56:14.639] next [10:56:14.639] if (!grepl(pattern, name)) [10:56:14.639] next [10:56:14.639] invokeRestart(restart) [10:56:14.639] muffled <- TRUE [10:56:14.639] break [10:56:14.639] } [10:56:14.639] } [10:56:14.639] } [10:56:14.639] invisible(muffled) [10:56:14.639] } [10:56:14.639] muffleCondition(cond, pattern = "^muffle") [10:56:14.639] } [10:56:14.639] } [10:56:14.639] else { [10:56:14.639] if (TRUE) { [10:56:14.639] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.639] { [10:56:14.639] inherits <- base::inherits [10:56:14.639] invokeRestart <- base::invokeRestart [10:56:14.639] is.null <- base::is.null [10:56:14.639] muffled <- FALSE [10:56:14.639] if (inherits(cond, "message")) { [10:56:14.639] muffled <- grepl(pattern, "muffleMessage") [10:56:14.639] if (muffled) [10:56:14.639] invokeRestart("muffleMessage") [10:56:14.639] } [10:56:14.639] else if (inherits(cond, "warning")) { [10:56:14.639] muffled <- grepl(pattern, "muffleWarning") [10:56:14.639] if (muffled) [10:56:14.639] invokeRestart("muffleWarning") [10:56:14.639] } [10:56:14.639] else if (inherits(cond, "condition")) { [10:56:14.639] if (!is.null(pattern)) { [10:56:14.639] computeRestarts <- base::computeRestarts [10:56:14.639] grepl <- base::grepl [10:56:14.639] restarts <- computeRestarts(cond) [10:56:14.639] for (restart in restarts) { [10:56:14.639] name <- restart$name [10:56:14.639] if (is.null(name)) [10:56:14.639] next [10:56:14.639] if (!grepl(pattern, name)) [10:56:14.639] next [10:56:14.639] invokeRestart(restart) [10:56:14.639] muffled <- TRUE [10:56:14.639] break [10:56:14.639] } [10:56:14.639] } [10:56:14.639] } [10:56:14.639] invisible(muffled) [10:56:14.639] } [10:56:14.639] muffleCondition(cond, pattern = "^muffle") [10:56:14.639] } [10:56:14.639] } [10:56:14.639] } [10:56:14.639] })) [10:56:14.639] }, error = function(ex) { [10:56:14.639] base::structure(base::list(value = NULL, visible = NULL, [10:56:14.639] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.639] ...future.rng), started = ...future.startTime, [10:56:14.639] finished = Sys.time(), session_uuid = NA_character_, [10:56:14.639] version = "1.8"), class = "FutureResult") [10:56:14.639] }, finally = { [10:56:14.639] if (!identical(...future.workdir, getwd())) [10:56:14.639] setwd(...future.workdir) [10:56:14.639] { [10:56:14.639] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:14.639] ...future.oldOptions$nwarnings <- NULL [10:56:14.639] } [10:56:14.639] base::options(...future.oldOptions) [10:56:14.639] if (.Platform$OS.type == "windows") { [10:56:14.639] old_names <- names(...future.oldEnvVars) [10:56:14.639] envs <- base::Sys.getenv() [10:56:14.639] names <- names(envs) [10:56:14.639] common <- intersect(names, old_names) [10:56:14.639] added <- setdiff(names, old_names) [10:56:14.639] removed <- setdiff(old_names, names) [10:56:14.639] changed <- common[...future.oldEnvVars[common] != [10:56:14.639] envs[common]] [10:56:14.639] NAMES <- toupper(changed) [10:56:14.639] args <- list() [10:56:14.639] for (kk in seq_along(NAMES)) { [10:56:14.639] name <- changed[[kk]] [10:56:14.639] NAME <- NAMES[[kk]] [10:56:14.639] if (name != NAME && is.element(NAME, old_names)) [10:56:14.639] next [10:56:14.639] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.639] } [10:56:14.639] NAMES <- toupper(added) [10:56:14.639] for (kk in seq_along(NAMES)) { [10:56:14.639] name <- added[[kk]] [10:56:14.639] NAME <- NAMES[[kk]] [10:56:14.639] if (name != NAME && is.element(NAME, old_names)) [10:56:14.639] next [10:56:14.639] args[[name]] <- "" [10:56:14.639] } [10:56:14.639] NAMES <- toupper(removed) [10:56:14.639] for (kk in seq_along(NAMES)) { [10:56:14.639] name <- removed[[kk]] [10:56:14.639] NAME <- NAMES[[kk]] [10:56:14.639] if (name != NAME && is.element(NAME, old_names)) [10:56:14.639] next [10:56:14.639] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.639] } [10:56:14.639] if (length(args) > 0) [10:56:14.639] base::do.call(base::Sys.setenv, args = args) [10:56:14.639] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:14.639] } [10:56:14.639] else { [10:56:14.639] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:14.639] } [10:56:14.639] { [10:56:14.639] if (base::length(...future.futureOptionsAdded) > [10:56:14.639] 0L) { [10:56:14.639] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:14.639] base::names(opts) <- ...future.futureOptionsAdded [10:56:14.639] base::options(opts) [10:56:14.639] } [10:56:14.639] { [10:56:14.639] NULL [10:56:14.639] options(future.plan = NULL) [10:56:14.639] if (is.na(NA_character_)) [10:56:14.639] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.639] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:14.639] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:14.639] .init = FALSE) [10:56:14.639] } [10:56:14.639] } [10:56:14.639] } [10:56:14.639] }) [10:56:14.639] if (TRUE) { [10:56:14.639] base::sink(type = "output", split = FALSE) [10:56:14.639] if (TRUE) { [10:56:14.639] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:14.639] } [10:56:14.639] else { [10:56:14.639] ...future.result["stdout"] <- base::list(NULL) [10:56:14.639] } [10:56:14.639] base::close(...future.stdout) [10:56:14.639] ...future.stdout <- NULL [10:56:14.639] } [10:56:14.639] ...future.result$conditions <- ...future.conditions [10:56:14.639] ...future.result$finished <- base::Sys.time() [10:56:14.639] ...future.result [10:56:14.639] } [10:56:14.643] - Launch lazy future ... done [10:56:14.643] run() for 'MiraiFuture' ... done > tbl <- value(f) > print(tbl) x 1 2 2 3 > stopifnot(all.equal(tbl, tbl0)) > > ## Future assignment > tbl %<-% { xtabs(~ x) } [10:56:14.648] getGlobalsAndPackages() ... [10:56:14.648] Searching for globals... [10:56:14.652] - globals found: [4] '{', 'xtabs', 'x', '~' [10:56:14.652] Searching for globals ... DONE [10:56:14.652] Resolving globals: FALSE [10:56:14.653] The total size of the 1 globals is 96 bytes (96 bytes) [10:56:14.653] The total size of the 1 globals exported for future expression ('{; xtabs(~x); }') is 96 bytes.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There is one global: 'x' (96 bytes of class 'numeric') [10:56:14.653] - globals: [1] 'x' [10:56:14.654] - packages: [1] 'stats' [10:56:14.654] getGlobalsAndPackages() ... DONE [10:56:14.654] run() for 'Future' ... [10:56:14.654] - state: 'created' [10:56:14.655] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:14.657] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:14.657] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:14.657] - Field: 'label' [10:56:14.658] - Field: 'local' [10:56:14.658] - Field: 'owner' [10:56:14.658] - Field: 'envir' [10:56:14.658] - Field: 'packages' [10:56:14.658] - Field: 'gc' [10:56:14.658] - Field: 'conditions' [10:56:14.659] - Field: 'expr' [10:56:14.659] - Field: 'uuid' [10:56:14.659] - Field: 'seed' [10:56:14.659] - Field: 'version' [10:56:14.659] - Field: 'result' [10:56:14.659] - Field: 'asynchronous' [10:56:14.660] - Field: 'calls' [10:56:14.660] - Field: 'globals' [10:56:14.660] - Field: 'stdout' [10:56:14.660] - Field: 'earlySignal' [10:56:14.660] - Field: 'lazy' [10:56:14.660] - Field: 'state' [10:56:14.661] - Field: '.cluster' [10:56:14.661] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:14.661] - Launch lazy future ... [10:56:14.661] Packages needed by the future expression (n = 1): 'stats' [10:56:14.662] Packages needed by future strategies (n = 0): [10:56:14.662] { [10:56:14.662] { [10:56:14.662] { [10:56:14.662] ...future.startTime <- base::Sys.time() [10:56:14.662] { [10:56:14.662] { [10:56:14.662] { [10:56:14.662] { [10:56:14.662] base::local({ [10:56:14.662] has_future <- base::requireNamespace("future", [10:56:14.662] quietly = TRUE) [10:56:14.662] if (has_future) { [10:56:14.662] ns <- base::getNamespace("future") [10:56:14.662] version <- ns[[".package"]][["version"]] [10:56:14.662] if (is.null(version)) [10:56:14.662] version <- utils::packageVersion("future") [10:56:14.662] } [10:56:14.662] else { [10:56:14.662] version <- NULL [10:56:14.662] } [10:56:14.662] if (!has_future || version < "1.8.0") { [10:56:14.662] info <- base::c(r_version = base::gsub("R version ", [10:56:14.662] "", base::R.version$version.string), [10:56:14.662] platform = base::sprintf("%s (%s-bit)", [10:56:14.662] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:14.662] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:14.662] "release", "version")], collapse = " "), [10:56:14.662] hostname = base::Sys.info()[["nodename"]]) [10:56:14.662] info <- base::sprintf("%s: %s", base::names(info), [10:56:14.662] info) [10:56:14.662] info <- base::paste(info, collapse = "; ") [10:56:14.662] if (!has_future) { [10:56:14.662] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:14.662] info) [10:56:14.662] } [10:56:14.662] else { [10:56:14.662] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:14.662] info, version) [10:56:14.662] } [10:56:14.662] base::stop(msg) [10:56:14.662] } [10:56:14.662] }) [10:56:14.662] } [10:56:14.662] base::local({ [10:56:14.662] for (pkg in "stats") { [10:56:14.662] base::loadNamespace(pkg) [10:56:14.662] base::library(pkg, character.only = TRUE) [10:56:14.662] } [10:56:14.662] }) [10:56:14.662] } [10:56:14.662] ...future.strategy.old <- future::plan("list") [10:56:14.662] options(future.plan = NULL) [10:56:14.662] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.662] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:14.662] } [10:56:14.662] ...future.workdir <- getwd() [10:56:14.662] } [10:56:14.662] ...future.oldOptions <- base::as.list(base::.Options) [10:56:14.662] ...future.oldEnvVars <- base::Sys.getenv() [10:56:14.662] } [10:56:14.662] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:14.662] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:14.662] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:14.662] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:14.662] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:14.662] future.stdout.windows.reencode = NULL, width = 80L) [10:56:14.662] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:14.662] base::names(...future.oldOptions)) [10:56:14.662] } [10:56:14.662] if (FALSE) { [10:56:14.662] } [10:56:14.662] else { [10:56:14.662] if (TRUE) { [10:56:14.662] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:14.662] open = "w") [10:56:14.662] } [10:56:14.662] else { [10:56:14.662] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:14.662] windows = "NUL", "/dev/null"), open = "w") [10:56:14.662] } [10:56:14.662] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:14.662] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:14.662] base::sink(type = "output", split = FALSE) [10:56:14.662] base::close(...future.stdout) [10:56:14.662] }, add = TRUE) [10:56:14.662] } [10:56:14.662] ...future.frame <- base::sys.nframe() [10:56:14.662] ...future.conditions <- base::list() [10:56:14.662] ...future.rng <- base::globalenv()$.Random.seed [10:56:14.662] if (FALSE) { [10:56:14.662] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:14.662] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:14.662] } [10:56:14.662] ...future.result <- base::tryCatch({ [10:56:14.662] base::withCallingHandlers({ [10:56:14.662] ...future.value <- base::withVisible(base::local({ [10:56:14.662] xtabs(~x) [10:56:14.662] })) [10:56:14.662] future::FutureResult(value = ...future.value$value, [10:56:14.662] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.662] ...future.rng), globalenv = if (FALSE) [10:56:14.662] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:14.662] ...future.globalenv.names)) [10:56:14.662] else NULL, started = ...future.startTime, version = "1.8") [10:56:14.662] }, condition = base::local({ [10:56:14.662] c <- base::c [10:56:14.662] inherits <- base::inherits [10:56:14.662] invokeRestart <- base::invokeRestart [10:56:14.662] length <- base::length [10:56:14.662] list <- base::list [10:56:14.662] seq.int <- base::seq.int [10:56:14.662] signalCondition <- base::signalCondition [10:56:14.662] sys.calls <- base::sys.calls [10:56:14.662] `[[` <- base::`[[` [10:56:14.662] `+` <- base::`+` [10:56:14.662] `<<-` <- base::`<<-` [10:56:14.662] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:14.662] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:14.662] 3L)] [10:56:14.662] } [10:56:14.662] function(cond) { [10:56:14.662] is_error <- inherits(cond, "error") [10:56:14.662] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:14.662] NULL) [10:56:14.662] if (is_error) { [10:56:14.662] sessionInformation <- function() { [10:56:14.662] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:14.662] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:14.662] search = base::search(), system = base::Sys.info()) [10:56:14.662] } [10:56:14.662] ...future.conditions[[length(...future.conditions) + [10:56:14.662] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:14.662] cond$call), session = sessionInformation(), [10:56:14.662] timestamp = base::Sys.time(), signaled = 0L) [10:56:14.662] signalCondition(cond) [10:56:14.662] } [10:56:14.662] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:14.662] signal <- FALSE && inherits(cond, character(0)) [10:56:14.662] ...future.conditions[[length(...future.conditions) + [10:56:14.662] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:14.662] if (FALSE && !signal) { [10:56:14.662] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.662] { [10:56:14.662] inherits <- base::inherits [10:56:14.662] invokeRestart <- base::invokeRestart [10:56:14.662] is.null <- base::is.null [10:56:14.662] muffled <- FALSE [10:56:14.662] if (inherits(cond, "message")) { [10:56:14.662] muffled <- grepl(pattern, "muffleMessage") [10:56:14.662] if (muffled) [10:56:14.662] invokeRestart("muffleMessage") [10:56:14.662] } [10:56:14.662] else if (inherits(cond, "warning")) { [10:56:14.662] muffled <- grepl(pattern, "muffleWarning") [10:56:14.662] if (muffled) [10:56:14.662] invokeRestart("muffleWarning") [10:56:14.662] } [10:56:14.662] else if (inherits(cond, "condition")) { [10:56:14.662] if (!is.null(pattern)) { [10:56:14.662] computeRestarts <- base::computeRestarts [10:56:14.662] grepl <- base::grepl [10:56:14.662] restarts <- computeRestarts(cond) [10:56:14.662] for (restart in restarts) { [10:56:14.662] name <- restart$name [10:56:14.662] if (is.null(name)) [10:56:14.662] next [10:56:14.662] if (!grepl(pattern, name)) [10:56:14.662] next [10:56:14.662] invokeRestart(restart) [10:56:14.662] muffled <- TRUE [10:56:14.662] break [10:56:14.662] } [10:56:14.662] } [10:56:14.662] } [10:56:14.662] invisible(muffled) [10:56:14.662] } [10:56:14.662] muffleCondition(cond, pattern = "^muffle") [10:56:14.662] } [10:56:14.662] } [10:56:14.662] else { [10:56:14.662] if (TRUE) { [10:56:14.662] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.662] { [10:56:14.662] inherits <- base::inherits [10:56:14.662] invokeRestart <- base::invokeRestart [10:56:14.662] is.null <- base::is.null [10:56:14.662] muffled <- FALSE [10:56:14.662] if (inherits(cond, "message")) { [10:56:14.662] muffled <- grepl(pattern, "muffleMessage") [10:56:14.662] if (muffled) [10:56:14.662] invokeRestart("muffleMessage") [10:56:14.662] } [10:56:14.662] else if (inherits(cond, "warning")) { [10:56:14.662] muffled <- grepl(pattern, "muffleWarning") [10:56:14.662] if (muffled) [10:56:14.662] invokeRestart("muffleWarning") [10:56:14.662] } [10:56:14.662] else if (inherits(cond, "condition")) { [10:56:14.662] if (!is.null(pattern)) { [10:56:14.662] computeRestarts <- base::computeRestarts [10:56:14.662] grepl <- base::grepl [10:56:14.662] restarts <- computeRestarts(cond) [10:56:14.662] for (restart in restarts) { [10:56:14.662] name <- restart$name [10:56:14.662] if (is.null(name)) [10:56:14.662] next [10:56:14.662] if (!grepl(pattern, name)) [10:56:14.662] next [10:56:14.662] invokeRestart(restart) [10:56:14.662] muffled <- TRUE [10:56:14.662] break [10:56:14.662] } [10:56:14.662] } [10:56:14.662] } [10:56:14.662] invisible(muffled) [10:56:14.662] } [10:56:14.662] muffleCondition(cond, pattern = "^muffle") [10:56:14.662] } [10:56:14.662] } [10:56:14.662] } [10:56:14.662] })) [10:56:14.662] }, error = function(ex) { [10:56:14.662] base::structure(base::list(value = NULL, visible = NULL, [10:56:14.662] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.662] ...future.rng), started = ...future.startTime, [10:56:14.662] finished = Sys.time(), session_uuid = NA_character_, [10:56:14.662] version = "1.8"), class = "FutureResult") [10:56:14.662] }, finally = { [10:56:14.662] if (!identical(...future.workdir, getwd())) [10:56:14.662] setwd(...future.workdir) [10:56:14.662] { [10:56:14.662] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:14.662] ...future.oldOptions$nwarnings <- NULL [10:56:14.662] } [10:56:14.662] base::options(...future.oldOptions) [10:56:14.662] if (.Platform$OS.type == "windows") { [10:56:14.662] old_names <- names(...future.oldEnvVars) [10:56:14.662] envs <- base::Sys.getenv() [10:56:14.662] names <- names(envs) [10:56:14.662] common <- intersect(names, old_names) [10:56:14.662] added <- setdiff(names, old_names) [10:56:14.662] removed <- setdiff(old_names, names) [10:56:14.662] changed <- common[...future.oldEnvVars[common] != [10:56:14.662] envs[common]] [10:56:14.662] NAMES <- toupper(changed) [10:56:14.662] args <- list() [10:56:14.662] for (kk in seq_along(NAMES)) { [10:56:14.662] name <- changed[[kk]] [10:56:14.662] NAME <- NAMES[[kk]] [10:56:14.662] if (name != NAME && is.element(NAME, old_names)) [10:56:14.662] next [10:56:14.662] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.662] } [10:56:14.662] NAMES <- toupper(added) [10:56:14.662] for (kk in seq_along(NAMES)) { [10:56:14.662] name <- added[[kk]] [10:56:14.662] NAME <- NAMES[[kk]] [10:56:14.662] if (name != NAME && is.element(NAME, old_names)) [10:56:14.662] next [10:56:14.662] args[[name]] <- "" [10:56:14.662] } [10:56:14.662] NAMES <- toupper(removed) [10:56:14.662] for (kk in seq_along(NAMES)) { [10:56:14.662] name <- removed[[kk]] [10:56:14.662] NAME <- NAMES[[kk]] [10:56:14.662] if (name != NAME && is.element(NAME, old_names)) [10:56:14.662] next [10:56:14.662] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.662] } [10:56:14.662] if (length(args) > 0) [10:56:14.662] base::do.call(base::Sys.setenv, args = args) [10:56:14.662] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:14.662] } [10:56:14.662] else { [10:56:14.662] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:14.662] } [10:56:14.662] { [10:56:14.662] if (base::length(...future.futureOptionsAdded) > [10:56:14.662] 0L) { [10:56:14.662] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:14.662] base::names(opts) <- ...future.futureOptionsAdded [10:56:14.662] base::options(opts) [10:56:14.662] } [10:56:14.662] { [10:56:14.662] NULL [10:56:14.662] options(future.plan = NULL) [10:56:14.662] if (is.na(NA_character_)) [10:56:14.662] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.662] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:14.662] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:14.662] .init = FALSE) [10:56:14.662] } [10:56:14.662] } [10:56:14.662] } [10:56:14.662] }) [10:56:14.662] if (TRUE) { [10:56:14.662] base::sink(type = "output", split = FALSE) [10:56:14.662] if (TRUE) { [10:56:14.662] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:14.662] } [10:56:14.662] else { [10:56:14.662] ...future.result["stdout"] <- base::list(NULL) [10:56:14.662] } [10:56:14.662] base::close(...future.stdout) [10:56:14.662] ...future.stdout <- NULL [10:56:14.662] } [10:56:14.662] ...future.result$conditions <- ...future.conditions [10:56:14.662] ...future.result$finished <- base::Sys.time() [10:56:14.662] ...future.result [10:56:14.662] } [10:56:14.666] - Launch lazy future ... done [10:56:14.666] run() for 'MiraiFuture' ... done > print(tbl) x 1 2 2 3 > stopifnot(all.equal(tbl, tbl0)) > > message("*** Globals - one-side formulas, e.g. xtabs(~ x) ... DONE") *** Globals - one-side formulas, e.g. xtabs(~ x) ... DONE > > > message("*** Globals - lm(, data = cars) ...") *** Globals - lm(, data = cars) ... > > exprs <- list( + # "remove-intercept-term" form of no-intercept + a = substitute({ lm(dist ~ . - 1, data = cars) }), + # "make-intercept-zero" form of no-intercept + b = substitute({ lm(dist ~ . + 0, data = cars) }), + # doesn't do what we want here + c = substitute({ lm(dist ~ speed + speed ^ 2, data = cars) }), + # gets us a quadratic term + d = substitute({ lm(dist ~ speed + I(speed ^ 2), data = cars) }), + # avoid potential multicollinearity + e = substitute({ lm(dist ~ poly(speed, 2), data = cars) }) + ) > > for (kk in seq_along(exprs)) { + expr <- exprs[[kk]] + name <- names(exprs)[kk] + mprintf("- Globals - lm(, data = cars) ...", + kk, sQuote(name)) + + fit0 <- eval(expr) + print(fit0) + + f <- future(expr, substitute = FALSE) + fit <- value(f) + print(fit) + + stopifnot(all.equal(fit, fit0)) + } ## for (kk ...) [10:56:14.677] - Globals - lm(, data = cars) ... Call: lm(formula = dist ~ . - 1, data = cars) Coefficients: speed 2.909 [10:56:14.679] getGlobalsAndPackages() ... [10:56:14.679] Searching for globals... [10:56:14.683] - globals found: [7] '{', 'lm', 'dist', '-', '.', '~', 'cars' [10:56:14.683] Searching for globals ... DONE [10:56:14.683] Resolving globals: FALSE [10:56:14.684] [10:56:14.684] - packages: [2] 'stats', 'datasets' [10:56:14.684] getGlobalsAndPackages() ... DONE [10:56:14.685] run() for 'Future' ... [10:56:14.685] - state: 'created' [10:56:14.685] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:14.688] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:14.688] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:14.688] - Field: 'label' [10:56:14.688] - Field: 'local' [10:56:14.688] - Field: 'owner' [10:56:14.689] - Field: 'envir' [10:56:14.689] - Field: 'packages' [10:56:14.689] - Field: 'gc' [10:56:14.689] - Field: 'conditions' [10:56:14.689] - Field: 'expr' [10:56:14.690] - Field: 'uuid' [10:56:14.690] - Field: 'seed' [10:56:14.690] - Field: 'version' [10:56:14.690] - Field: 'result' [10:56:14.690] - Field: 'asynchronous' [10:56:14.690] - Field: 'calls' [10:56:14.691] - Field: 'globals' [10:56:14.691] - Field: 'stdout' [10:56:14.691] - Field: 'earlySignal' [10:56:14.691] - Field: 'lazy' [10:56:14.691] - Field: 'state' [10:56:14.692] - Field: '.cluster' [10:56:14.692] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:14.692] - Launch lazy future ... [10:56:14.692] Packages needed by the future expression (n = 2): 'stats', 'datasets' [10:56:14.692] Packages needed by future strategies (n = 0): [10:56:14.693] { [10:56:14.693] { [10:56:14.693] { [10:56:14.693] ...future.startTime <- base::Sys.time() [10:56:14.693] { [10:56:14.693] { [10:56:14.693] { [10:56:14.693] { [10:56:14.693] base::local({ [10:56:14.693] has_future <- base::requireNamespace("future", [10:56:14.693] quietly = TRUE) [10:56:14.693] if (has_future) { [10:56:14.693] ns <- base::getNamespace("future") [10:56:14.693] version <- ns[[".package"]][["version"]] [10:56:14.693] if (is.null(version)) [10:56:14.693] version <- utils::packageVersion("future") [10:56:14.693] } [10:56:14.693] else { [10:56:14.693] version <- NULL [10:56:14.693] } [10:56:14.693] if (!has_future || version < "1.8.0") { [10:56:14.693] info <- base::c(r_version = base::gsub("R version ", [10:56:14.693] "", base::R.version$version.string), [10:56:14.693] platform = base::sprintf("%s (%s-bit)", [10:56:14.693] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:14.693] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:14.693] "release", "version")], collapse = " "), [10:56:14.693] hostname = base::Sys.info()[["nodename"]]) [10:56:14.693] info <- base::sprintf("%s: %s", base::names(info), [10:56:14.693] info) [10:56:14.693] info <- base::paste(info, collapse = "; ") [10:56:14.693] if (!has_future) { [10:56:14.693] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:14.693] info) [10:56:14.693] } [10:56:14.693] else { [10:56:14.693] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:14.693] info, version) [10:56:14.693] } [10:56:14.693] base::stop(msg) [10:56:14.693] } [10:56:14.693] }) [10:56:14.693] } [10:56:14.693] base::local({ [10:56:14.693] for (pkg in c("stats", "datasets")) { [10:56:14.693] base::loadNamespace(pkg) [10:56:14.693] base::library(pkg, character.only = TRUE) [10:56:14.693] } [10:56:14.693] }) [10:56:14.693] } [10:56:14.693] ...future.strategy.old <- future::plan("list") [10:56:14.693] options(future.plan = NULL) [10:56:14.693] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.693] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:14.693] } [10:56:14.693] ...future.workdir <- getwd() [10:56:14.693] } [10:56:14.693] ...future.oldOptions <- base::as.list(base::.Options) [10:56:14.693] ...future.oldEnvVars <- base::Sys.getenv() [10:56:14.693] } [10:56:14.693] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:14.693] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:14.693] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:14.693] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:14.693] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:14.693] future.stdout.windows.reencode = NULL, width = 80L) [10:56:14.693] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:14.693] base::names(...future.oldOptions)) [10:56:14.693] } [10:56:14.693] if (FALSE) { [10:56:14.693] } [10:56:14.693] else { [10:56:14.693] if (TRUE) { [10:56:14.693] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:14.693] open = "w") [10:56:14.693] } [10:56:14.693] else { [10:56:14.693] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:14.693] windows = "NUL", "/dev/null"), open = "w") [10:56:14.693] } [10:56:14.693] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:14.693] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:14.693] base::sink(type = "output", split = FALSE) [10:56:14.693] base::close(...future.stdout) [10:56:14.693] }, add = TRUE) [10:56:14.693] } [10:56:14.693] ...future.frame <- base::sys.nframe() [10:56:14.693] ...future.conditions <- base::list() [10:56:14.693] ...future.rng <- base::globalenv()$.Random.seed [10:56:14.693] if (FALSE) { [10:56:14.693] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:14.693] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:14.693] } [10:56:14.693] ...future.result <- base::tryCatch({ [10:56:14.693] base::withCallingHandlers({ [10:56:14.693] ...future.value <- base::withVisible(base::local({ [10:56:14.693] lm(dist ~ . - 1, data = cars) [10:56:14.693] })) [10:56:14.693] future::FutureResult(value = ...future.value$value, [10:56:14.693] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.693] ...future.rng), globalenv = if (FALSE) [10:56:14.693] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:14.693] ...future.globalenv.names)) [10:56:14.693] else NULL, started = ...future.startTime, version = "1.8") [10:56:14.693] }, condition = base::local({ [10:56:14.693] c <- base::c [10:56:14.693] inherits <- base::inherits [10:56:14.693] invokeRestart <- base::invokeRestart [10:56:14.693] length <- base::length [10:56:14.693] list <- base::list [10:56:14.693] seq.int <- base::seq.int [10:56:14.693] signalCondition <- base::signalCondition [10:56:14.693] sys.calls <- base::sys.calls [10:56:14.693] `[[` <- base::`[[` [10:56:14.693] `+` <- base::`+` [10:56:14.693] `<<-` <- base::`<<-` [10:56:14.693] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:14.693] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:14.693] 3L)] [10:56:14.693] } [10:56:14.693] function(cond) { [10:56:14.693] is_error <- inherits(cond, "error") [10:56:14.693] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:14.693] NULL) [10:56:14.693] if (is_error) { [10:56:14.693] sessionInformation <- function() { [10:56:14.693] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:14.693] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:14.693] search = base::search(), system = base::Sys.info()) [10:56:14.693] } [10:56:14.693] ...future.conditions[[length(...future.conditions) + [10:56:14.693] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:14.693] cond$call), session = sessionInformation(), [10:56:14.693] timestamp = base::Sys.time(), signaled = 0L) [10:56:14.693] signalCondition(cond) [10:56:14.693] } [10:56:14.693] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:14.693] signal <- FALSE && inherits(cond, character(0)) [10:56:14.693] ...future.conditions[[length(...future.conditions) + [10:56:14.693] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:14.693] if (FALSE && !signal) { [10:56:14.693] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.693] { [10:56:14.693] inherits <- base::inherits [10:56:14.693] invokeRestart <- base::invokeRestart [10:56:14.693] is.null <- base::is.null [10:56:14.693] muffled <- FALSE [10:56:14.693] if (inherits(cond, "message")) { [10:56:14.693] muffled <- grepl(pattern, "muffleMessage") [10:56:14.693] if (muffled) [10:56:14.693] invokeRestart("muffleMessage") [10:56:14.693] } [10:56:14.693] else if (inherits(cond, "warning")) { [10:56:14.693] muffled <- grepl(pattern, "muffleWarning") [10:56:14.693] if (muffled) [10:56:14.693] invokeRestart("muffleWarning") [10:56:14.693] } [10:56:14.693] else if (inherits(cond, "condition")) { [10:56:14.693] if (!is.null(pattern)) { [10:56:14.693] computeRestarts <- base::computeRestarts [10:56:14.693] grepl <- base::grepl [10:56:14.693] restarts <- computeRestarts(cond) [10:56:14.693] for (restart in restarts) { [10:56:14.693] name <- restart$name [10:56:14.693] if (is.null(name)) [10:56:14.693] next [10:56:14.693] if (!grepl(pattern, name)) [10:56:14.693] next [10:56:14.693] invokeRestart(restart) [10:56:14.693] muffled <- TRUE [10:56:14.693] break [10:56:14.693] } [10:56:14.693] } [10:56:14.693] } [10:56:14.693] invisible(muffled) [10:56:14.693] } [10:56:14.693] muffleCondition(cond, pattern = "^muffle") [10:56:14.693] } [10:56:14.693] } [10:56:14.693] else { [10:56:14.693] if (TRUE) { [10:56:14.693] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.693] { [10:56:14.693] inherits <- base::inherits [10:56:14.693] invokeRestart <- base::invokeRestart [10:56:14.693] is.null <- base::is.null [10:56:14.693] muffled <- FALSE [10:56:14.693] if (inherits(cond, "message")) { [10:56:14.693] muffled <- grepl(pattern, "muffleMessage") [10:56:14.693] if (muffled) [10:56:14.693] invokeRestart("muffleMessage") [10:56:14.693] } [10:56:14.693] else if (inherits(cond, "warning")) { [10:56:14.693] muffled <- grepl(pattern, "muffleWarning") [10:56:14.693] if (muffled) [10:56:14.693] invokeRestart("muffleWarning") [10:56:14.693] } [10:56:14.693] else if (inherits(cond, "condition")) { [10:56:14.693] if (!is.null(pattern)) { [10:56:14.693] computeRestarts <- base::computeRestarts [10:56:14.693] grepl <- base::grepl [10:56:14.693] restarts <- computeRestarts(cond) [10:56:14.693] for (restart in restarts) { [10:56:14.693] name <- restart$name [10:56:14.693] if (is.null(name)) [10:56:14.693] next [10:56:14.693] if (!grepl(pattern, name)) [10:56:14.693] next [10:56:14.693] invokeRestart(restart) [10:56:14.693] muffled <- TRUE [10:56:14.693] break [10:56:14.693] } [10:56:14.693] } [10:56:14.693] } [10:56:14.693] invisible(muffled) [10:56:14.693] } [10:56:14.693] muffleCondition(cond, pattern = "^muffle") [10:56:14.693] } [10:56:14.693] } [10:56:14.693] } [10:56:14.693] })) [10:56:14.693] }, error = function(ex) { [10:56:14.693] base::structure(base::list(value = NULL, visible = NULL, [10:56:14.693] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.693] ...future.rng), started = ...future.startTime, [10:56:14.693] finished = Sys.time(), session_uuid = NA_character_, [10:56:14.693] version = "1.8"), class = "FutureResult") [10:56:14.693] }, finally = { [10:56:14.693] if (!identical(...future.workdir, getwd())) [10:56:14.693] setwd(...future.workdir) [10:56:14.693] { [10:56:14.693] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:14.693] ...future.oldOptions$nwarnings <- NULL [10:56:14.693] } [10:56:14.693] base::options(...future.oldOptions) [10:56:14.693] if (.Platform$OS.type == "windows") { [10:56:14.693] old_names <- names(...future.oldEnvVars) [10:56:14.693] envs <- base::Sys.getenv() [10:56:14.693] names <- names(envs) [10:56:14.693] common <- intersect(names, old_names) [10:56:14.693] added <- setdiff(names, old_names) [10:56:14.693] removed <- setdiff(old_names, names) [10:56:14.693] changed <- common[...future.oldEnvVars[common] != [10:56:14.693] envs[common]] [10:56:14.693] NAMES <- toupper(changed) [10:56:14.693] args <- list() [10:56:14.693] for (kk in seq_along(NAMES)) { [10:56:14.693] name <- changed[[kk]] [10:56:14.693] NAME <- NAMES[[kk]] [10:56:14.693] if (name != NAME && is.element(NAME, old_names)) [10:56:14.693] next [10:56:14.693] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.693] } [10:56:14.693] NAMES <- toupper(added) [10:56:14.693] for (kk in seq_along(NAMES)) { [10:56:14.693] name <- added[[kk]] [10:56:14.693] NAME <- NAMES[[kk]] [10:56:14.693] if (name != NAME && is.element(NAME, old_names)) [10:56:14.693] next [10:56:14.693] args[[name]] <- "" [10:56:14.693] } [10:56:14.693] NAMES <- toupper(removed) [10:56:14.693] for (kk in seq_along(NAMES)) { [10:56:14.693] name <- removed[[kk]] [10:56:14.693] NAME <- NAMES[[kk]] [10:56:14.693] if (name != NAME && is.element(NAME, old_names)) [10:56:14.693] next [10:56:14.693] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.693] } [10:56:14.693] if (length(args) > 0) [10:56:14.693] base::do.call(base::Sys.setenv, args = args) [10:56:14.693] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:14.693] } [10:56:14.693] else { [10:56:14.693] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:14.693] } [10:56:14.693] { [10:56:14.693] if (base::length(...future.futureOptionsAdded) > [10:56:14.693] 0L) { [10:56:14.693] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:14.693] base::names(opts) <- ...future.futureOptionsAdded [10:56:14.693] base::options(opts) [10:56:14.693] } [10:56:14.693] { [10:56:14.693] NULL [10:56:14.693] options(future.plan = NULL) [10:56:14.693] if (is.na(NA_character_)) [10:56:14.693] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.693] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:14.693] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:14.693] .init = FALSE) [10:56:14.693] } [10:56:14.693] } [10:56:14.693] } [10:56:14.693] }) [10:56:14.693] if (TRUE) { [10:56:14.693] base::sink(type = "output", split = FALSE) [10:56:14.693] if (TRUE) { [10:56:14.693] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:14.693] } [10:56:14.693] else { [10:56:14.693] ...future.result["stdout"] <- base::list(NULL) [10:56:14.693] } [10:56:14.693] base::close(...future.stdout) [10:56:14.693] ...future.stdout <- NULL [10:56:14.693] } [10:56:14.693] ...future.result$conditions <- ...future.conditions [10:56:14.693] ...future.result$finished <- base::Sys.time() [10:56:14.693] ...future.result [10:56:14.693] } [10:56:14.699] - Launch lazy future ... done [10:56:14.699] run() for 'MiraiFuture' ... done Call: lm(formula = dist ~ . - 1, data = cars) Coefficients: speed 2.909 [10:56:14.707] - Globals - lm(, data = cars) ... Call: lm(formula = dist ~ . + 0, data = cars) Coefficients: speed 2.909 [10:56:14.708] getGlobalsAndPackages() ... [10:56:14.708] Searching for globals... [10:56:14.710] - globals found: [7] '{', 'lm', 'dist', '+', '.', '~', 'cars' [10:56:14.710] Searching for globals ... DONE [10:56:14.711] Resolving globals: FALSE [10:56:14.711] [10:56:14.711] - packages: [2] 'stats', 'datasets' [10:56:14.712] getGlobalsAndPackages() ... DONE [10:56:14.712] run() for 'Future' ... [10:56:14.712] - state: 'created' [10:56:14.713] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:14.715] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:14.715] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:14.715] - Field: 'label' [10:56:14.716] - Field: 'local' [10:56:14.716] - Field: 'owner' [10:56:14.716] - Field: 'envir' [10:56:14.716] - Field: 'packages' [10:56:14.716] - Field: 'gc' [10:56:14.717] - Field: 'conditions' [10:56:14.717] - Field: 'expr' [10:56:14.717] - Field: 'uuid' [10:56:14.717] - Field: 'seed' [10:56:14.717] - Field: 'version' [10:56:14.718] - Field: 'result' [10:56:14.718] - Field: 'asynchronous' [10:56:14.718] - Field: 'calls' [10:56:14.718] - Field: 'globals' [10:56:14.718] - Field: 'stdout' [10:56:14.718] - Field: 'earlySignal' [10:56:14.719] - Field: 'lazy' [10:56:14.720] - Field: 'state' [10:56:14.721] - Field: '.cluster' [10:56:14.721] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:14.721] - Launch lazy future ... [10:56:14.721] Packages needed by the future expression (n = 2): 'stats', 'datasets' [10:56:14.721] Packages needed by future strategies (n = 0): [10:56:14.722] { [10:56:14.722] { [10:56:14.722] { [10:56:14.722] ...future.startTime <- base::Sys.time() [10:56:14.722] { [10:56:14.722] { [10:56:14.722] { [10:56:14.722] { [10:56:14.722] base::local({ [10:56:14.722] has_future <- base::requireNamespace("future", [10:56:14.722] quietly = TRUE) [10:56:14.722] if (has_future) { [10:56:14.722] ns <- base::getNamespace("future") [10:56:14.722] version <- ns[[".package"]][["version"]] [10:56:14.722] if (is.null(version)) [10:56:14.722] version <- utils::packageVersion("future") [10:56:14.722] } [10:56:14.722] else { [10:56:14.722] version <- NULL [10:56:14.722] } [10:56:14.722] if (!has_future || version < "1.8.0") { [10:56:14.722] info <- base::c(r_version = base::gsub("R version ", [10:56:14.722] "", base::R.version$version.string), [10:56:14.722] platform = base::sprintf("%s (%s-bit)", [10:56:14.722] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:14.722] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:14.722] "release", "version")], collapse = " "), [10:56:14.722] hostname = base::Sys.info()[["nodename"]]) [10:56:14.722] info <- base::sprintf("%s: %s", base::names(info), [10:56:14.722] info) [10:56:14.722] info <- base::paste(info, collapse = "; ") [10:56:14.722] if (!has_future) { [10:56:14.722] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:14.722] info) [10:56:14.722] } [10:56:14.722] else { [10:56:14.722] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:14.722] info, version) [10:56:14.722] } [10:56:14.722] base::stop(msg) [10:56:14.722] } [10:56:14.722] }) [10:56:14.722] } [10:56:14.722] base::local({ [10:56:14.722] for (pkg in c("stats", "datasets")) { [10:56:14.722] base::loadNamespace(pkg) [10:56:14.722] base::library(pkg, character.only = TRUE) [10:56:14.722] } [10:56:14.722] }) [10:56:14.722] } [10:56:14.722] ...future.strategy.old <- future::plan("list") [10:56:14.722] options(future.plan = NULL) [10:56:14.722] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.722] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:14.722] } [10:56:14.722] ...future.workdir <- getwd() [10:56:14.722] } [10:56:14.722] ...future.oldOptions <- base::as.list(base::.Options) [10:56:14.722] ...future.oldEnvVars <- base::Sys.getenv() [10:56:14.722] } [10:56:14.722] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:14.722] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:14.722] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:14.722] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:14.722] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:14.722] future.stdout.windows.reencode = NULL, width = 80L) [10:56:14.722] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:14.722] base::names(...future.oldOptions)) [10:56:14.722] } [10:56:14.722] if (FALSE) { [10:56:14.722] } [10:56:14.722] else { [10:56:14.722] if (TRUE) { [10:56:14.722] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:14.722] open = "w") [10:56:14.722] } [10:56:14.722] else { [10:56:14.722] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:14.722] windows = "NUL", "/dev/null"), open = "w") [10:56:14.722] } [10:56:14.722] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:14.722] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:14.722] base::sink(type = "output", split = FALSE) [10:56:14.722] base::close(...future.stdout) [10:56:14.722] }, add = TRUE) [10:56:14.722] } [10:56:14.722] ...future.frame <- base::sys.nframe() [10:56:14.722] ...future.conditions <- base::list() [10:56:14.722] ...future.rng <- base::globalenv()$.Random.seed [10:56:14.722] if (FALSE) { [10:56:14.722] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:14.722] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:14.722] } [10:56:14.722] ...future.result <- base::tryCatch({ [10:56:14.722] base::withCallingHandlers({ [10:56:14.722] ...future.value <- base::withVisible(base::local({ [10:56:14.722] lm(dist ~ . + 0, data = cars) [10:56:14.722] })) [10:56:14.722] future::FutureResult(value = ...future.value$value, [10:56:14.722] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.722] ...future.rng), globalenv = if (FALSE) [10:56:14.722] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:14.722] ...future.globalenv.names)) [10:56:14.722] else NULL, started = ...future.startTime, version = "1.8") [10:56:14.722] }, condition = base::local({ [10:56:14.722] c <- base::c [10:56:14.722] inherits <- base::inherits [10:56:14.722] invokeRestart <- base::invokeRestart [10:56:14.722] length <- base::length [10:56:14.722] list <- base::list [10:56:14.722] seq.int <- base::seq.int [10:56:14.722] signalCondition <- base::signalCondition [10:56:14.722] sys.calls <- base::sys.calls [10:56:14.722] `[[` <- base::`[[` [10:56:14.722] `+` <- base::`+` [10:56:14.722] `<<-` <- base::`<<-` [10:56:14.722] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:14.722] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:14.722] 3L)] [10:56:14.722] } [10:56:14.722] function(cond) { [10:56:14.722] is_error <- inherits(cond, "error") [10:56:14.722] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:14.722] NULL) [10:56:14.722] if (is_error) { [10:56:14.722] sessionInformation <- function() { [10:56:14.722] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:14.722] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:14.722] search = base::search(), system = base::Sys.info()) [10:56:14.722] } [10:56:14.722] ...future.conditions[[length(...future.conditions) + [10:56:14.722] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:14.722] cond$call), session = sessionInformation(), [10:56:14.722] timestamp = base::Sys.time(), signaled = 0L) [10:56:14.722] signalCondition(cond) [10:56:14.722] } [10:56:14.722] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:14.722] signal <- FALSE && inherits(cond, character(0)) [10:56:14.722] ...future.conditions[[length(...future.conditions) + [10:56:14.722] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:14.722] if (FALSE && !signal) { [10:56:14.722] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.722] { [10:56:14.722] inherits <- base::inherits [10:56:14.722] invokeRestart <- base::invokeRestart [10:56:14.722] is.null <- base::is.null [10:56:14.722] muffled <- FALSE [10:56:14.722] if (inherits(cond, "message")) { [10:56:14.722] muffled <- grepl(pattern, "muffleMessage") [10:56:14.722] if (muffled) [10:56:14.722] invokeRestart("muffleMessage") [10:56:14.722] } [10:56:14.722] else if (inherits(cond, "warning")) { [10:56:14.722] muffled <- grepl(pattern, "muffleWarning") [10:56:14.722] if (muffled) [10:56:14.722] invokeRestart("muffleWarning") [10:56:14.722] } [10:56:14.722] else if (inherits(cond, "condition")) { [10:56:14.722] if (!is.null(pattern)) { [10:56:14.722] computeRestarts <- base::computeRestarts [10:56:14.722] grepl <- base::grepl [10:56:14.722] restarts <- computeRestarts(cond) [10:56:14.722] for (restart in restarts) { [10:56:14.722] name <- restart$name [10:56:14.722] if (is.null(name)) [10:56:14.722] next [10:56:14.722] if (!grepl(pattern, name)) [10:56:14.722] next [10:56:14.722] invokeRestart(restart) [10:56:14.722] muffled <- TRUE [10:56:14.722] break [10:56:14.722] } [10:56:14.722] } [10:56:14.722] } [10:56:14.722] invisible(muffled) [10:56:14.722] } [10:56:14.722] muffleCondition(cond, pattern = "^muffle") [10:56:14.722] } [10:56:14.722] } [10:56:14.722] else { [10:56:14.722] if (TRUE) { [10:56:14.722] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.722] { [10:56:14.722] inherits <- base::inherits [10:56:14.722] invokeRestart <- base::invokeRestart [10:56:14.722] is.null <- base::is.null [10:56:14.722] muffled <- FALSE [10:56:14.722] if (inherits(cond, "message")) { [10:56:14.722] muffled <- grepl(pattern, "muffleMessage") [10:56:14.722] if (muffled) [10:56:14.722] invokeRestart("muffleMessage") [10:56:14.722] } [10:56:14.722] else if (inherits(cond, "warning")) { [10:56:14.722] muffled <- grepl(pattern, "muffleWarning") [10:56:14.722] if (muffled) [10:56:14.722] invokeRestart("muffleWarning") [10:56:14.722] } [10:56:14.722] else if (inherits(cond, "condition")) { [10:56:14.722] if (!is.null(pattern)) { [10:56:14.722] computeRestarts <- base::computeRestarts [10:56:14.722] grepl <- base::grepl [10:56:14.722] restarts <- computeRestarts(cond) [10:56:14.722] for (restart in restarts) { [10:56:14.722] name <- restart$name [10:56:14.722] if (is.null(name)) [10:56:14.722] next [10:56:14.722] if (!grepl(pattern, name)) [10:56:14.722] next [10:56:14.722] invokeRestart(restart) [10:56:14.722] muffled <- TRUE [10:56:14.722] break [10:56:14.722] } [10:56:14.722] } [10:56:14.722] } [10:56:14.722] invisible(muffled) [10:56:14.722] } [10:56:14.722] muffleCondition(cond, pattern = "^muffle") [10:56:14.722] } [10:56:14.722] } [10:56:14.722] } [10:56:14.722] })) [10:56:14.722] }, error = function(ex) { [10:56:14.722] base::structure(base::list(value = NULL, visible = NULL, [10:56:14.722] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.722] ...future.rng), started = ...future.startTime, [10:56:14.722] finished = Sys.time(), session_uuid = NA_character_, [10:56:14.722] version = "1.8"), class = "FutureResult") [10:56:14.722] }, finally = { [10:56:14.722] if (!identical(...future.workdir, getwd())) [10:56:14.722] setwd(...future.workdir) [10:56:14.722] { [10:56:14.722] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:14.722] ...future.oldOptions$nwarnings <- NULL [10:56:14.722] } [10:56:14.722] base::options(...future.oldOptions) [10:56:14.722] if (.Platform$OS.type == "windows") { [10:56:14.722] old_names <- names(...future.oldEnvVars) [10:56:14.722] envs <- base::Sys.getenv() [10:56:14.722] names <- names(envs) [10:56:14.722] common <- intersect(names, old_names) [10:56:14.722] added <- setdiff(names, old_names) [10:56:14.722] removed <- setdiff(old_names, names) [10:56:14.722] changed <- common[...future.oldEnvVars[common] != [10:56:14.722] envs[common]] [10:56:14.722] NAMES <- toupper(changed) [10:56:14.722] args <- list() [10:56:14.722] for (kk in seq_along(NAMES)) { [10:56:14.722] name <- changed[[kk]] [10:56:14.722] NAME <- NAMES[[kk]] [10:56:14.722] if (name != NAME && is.element(NAME, old_names)) [10:56:14.722] next [10:56:14.722] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.722] } [10:56:14.722] NAMES <- toupper(added) [10:56:14.722] for (kk in seq_along(NAMES)) { [10:56:14.722] name <- added[[kk]] [10:56:14.722] NAME <- NAMES[[kk]] [10:56:14.722] if (name != NAME && is.element(NAME, old_names)) [10:56:14.722] next [10:56:14.722] args[[name]] <- "" [10:56:14.722] } [10:56:14.722] NAMES <- toupper(removed) [10:56:14.722] for (kk in seq_along(NAMES)) { [10:56:14.722] name <- removed[[kk]] [10:56:14.722] NAME <- NAMES[[kk]] [10:56:14.722] if (name != NAME && is.element(NAME, old_names)) [10:56:14.722] next [10:56:14.722] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.722] } [10:56:14.722] if (length(args) > 0) [10:56:14.722] base::do.call(base::Sys.setenv, args = args) [10:56:14.722] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:14.722] } [10:56:14.722] else { [10:56:14.722] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:14.722] } [10:56:14.722] { [10:56:14.722] if (base::length(...future.futureOptionsAdded) > [10:56:14.722] 0L) { [10:56:14.722] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:14.722] base::names(opts) <- ...future.futureOptionsAdded [10:56:14.722] base::options(opts) [10:56:14.722] } [10:56:14.722] { [10:56:14.722] NULL [10:56:14.722] options(future.plan = NULL) [10:56:14.722] if (is.na(NA_character_)) [10:56:14.722] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.722] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:14.722] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:14.722] .init = FALSE) [10:56:14.722] } [10:56:14.722] } [10:56:14.722] } [10:56:14.722] }) [10:56:14.722] if (TRUE) { [10:56:14.722] base::sink(type = "output", split = FALSE) [10:56:14.722] if (TRUE) { [10:56:14.722] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:14.722] } [10:56:14.722] else { [10:56:14.722] ...future.result["stdout"] <- base::list(NULL) [10:56:14.722] } [10:56:14.722] base::close(...future.stdout) [10:56:14.722] ...future.stdout <- NULL [10:56:14.722] } [10:56:14.722] ...future.result$conditions <- ...future.conditions [10:56:14.722] ...future.result$finished <- base::Sys.time() [10:56:14.722] ...future.result [10:56:14.722] } [10:56:14.726] - Launch lazy future ... done [10:56:14.726] run() for 'MiraiFuture' ... done Call: lm(formula = dist ~ . + 0, data = cars) Coefficients: speed 2.909 [10:56:14.732] - Globals - lm(, data = cars) ... Call: lm(formula = dist ~ speed + speed^2, data = cars) Coefficients: (Intercept) speed -17.579 3.932 [10:56:14.733] getGlobalsAndPackages() ... [10:56:14.734] Searching for globals... [10:56:14.736] - globals found: [8] '{', 'lm', 'dist', '+', 'speed', '^', '~', 'cars' [10:56:14.736] Searching for globals ... DONE [10:56:14.736] Resolving globals: FALSE [10:56:14.737] [10:56:14.737] - packages: [2] 'stats', 'datasets' [10:56:14.737] getGlobalsAndPackages() ... DONE [10:56:14.737] run() for 'Future' ... [10:56:14.738] - state: 'created' [10:56:14.738] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:14.740] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:14.740] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:14.741] - Field: 'label' [10:56:14.741] - Field: 'local' [10:56:14.741] - Field: 'owner' [10:56:14.741] - Field: 'envir' [10:56:14.741] - Field: 'packages' [10:56:14.741] - Field: 'gc' [10:56:14.742] - Field: 'conditions' [10:56:14.742] - Field: 'expr' [10:56:14.742] - Field: 'uuid' [10:56:14.742] - Field: 'seed' [10:56:14.742] - Field: 'version' [10:56:14.743] - Field: 'result' [10:56:14.743] - Field: 'asynchronous' [10:56:14.743] - Field: 'calls' [10:56:14.743] - Field: 'globals' [10:56:14.743] - Field: 'stdout' [10:56:14.743] - Field: 'earlySignal' [10:56:14.744] - Field: 'lazy' [10:56:14.744] - Field: 'state' [10:56:14.744] - Field: '.cluster' [10:56:14.744] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:14.744] - Launch lazy future ... [10:56:14.744] Packages needed by the future expression (n = 2): 'stats', 'datasets' [10:56:14.745] Packages needed by future strategies (n = 0): [10:56:14.745] { [10:56:14.745] { [10:56:14.745] { [10:56:14.745] ...future.startTime <- base::Sys.time() [10:56:14.745] { [10:56:14.745] { [10:56:14.745] { [10:56:14.745] { [10:56:14.745] base::local({ [10:56:14.745] has_future <- base::requireNamespace("future", [10:56:14.745] quietly = TRUE) [10:56:14.745] if (has_future) { [10:56:14.745] ns <- base::getNamespace("future") [10:56:14.745] version <- ns[[".package"]][["version"]] [10:56:14.745] if (is.null(version)) [10:56:14.745] version <- utils::packageVersion("future") [10:56:14.745] } [10:56:14.745] else { [10:56:14.745] version <- NULL [10:56:14.745] } [10:56:14.745] if (!has_future || version < "1.8.0") { [10:56:14.745] info <- base::c(r_version = base::gsub("R version ", [10:56:14.745] "", base::R.version$version.string), [10:56:14.745] platform = base::sprintf("%s (%s-bit)", [10:56:14.745] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:14.745] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:14.745] "release", "version")], collapse = " "), [10:56:14.745] hostname = base::Sys.info()[["nodename"]]) [10:56:14.745] info <- base::sprintf("%s: %s", base::names(info), [10:56:14.745] info) [10:56:14.745] info <- base::paste(info, collapse = "; ") [10:56:14.745] if (!has_future) { [10:56:14.745] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:14.745] info) [10:56:14.745] } [10:56:14.745] else { [10:56:14.745] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:14.745] info, version) [10:56:14.745] } [10:56:14.745] base::stop(msg) [10:56:14.745] } [10:56:14.745] }) [10:56:14.745] } [10:56:14.745] base::local({ [10:56:14.745] for (pkg in c("stats", "datasets")) { [10:56:14.745] base::loadNamespace(pkg) [10:56:14.745] base::library(pkg, character.only = TRUE) [10:56:14.745] } [10:56:14.745] }) [10:56:14.745] } [10:56:14.745] ...future.strategy.old <- future::plan("list") [10:56:14.745] options(future.plan = NULL) [10:56:14.745] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.745] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:14.745] } [10:56:14.745] ...future.workdir <- getwd() [10:56:14.745] } [10:56:14.745] ...future.oldOptions <- base::as.list(base::.Options) [10:56:14.745] ...future.oldEnvVars <- base::Sys.getenv() [10:56:14.745] } [10:56:14.745] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:14.745] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:14.745] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:14.745] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:14.745] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:14.745] future.stdout.windows.reencode = NULL, width = 80L) [10:56:14.745] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:14.745] base::names(...future.oldOptions)) [10:56:14.745] } [10:56:14.745] if (FALSE) { [10:56:14.745] } [10:56:14.745] else { [10:56:14.745] if (TRUE) { [10:56:14.745] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:14.745] open = "w") [10:56:14.745] } [10:56:14.745] else { [10:56:14.745] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:14.745] windows = "NUL", "/dev/null"), open = "w") [10:56:14.745] } [10:56:14.745] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:14.745] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:14.745] base::sink(type = "output", split = FALSE) [10:56:14.745] base::close(...future.stdout) [10:56:14.745] }, add = TRUE) [10:56:14.745] } [10:56:14.745] ...future.frame <- base::sys.nframe() [10:56:14.745] ...future.conditions <- base::list() [10:56:14.745] ...future.rng <- base::globalenv()$.Random.seed [10:56:14.745] if (FALSE) { [10:56:14.745] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:14.745] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:14.745] } [10:56:14.745] ...future.result <- base::tryCatch({ [10:56:14.745] base::withCallingHandlers({ [10:56:14.745] ...future.value <- base::withVisible(base::local({ [10:56:14.745] lm(dist ~ speed + speed^2, data = cars) [10:56:14.745] })) [10:56:14.745] future::FutureResult(value = ...future.value$value, [10:56:14.745] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.745] ...future.rng), globalenv = if (FALSE) [10:56:14.745] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:14.745] ...future.globalenv.names)) [10:56:14.745] else NULL, started = ...future.startTime, version = "1.8") [10:56:14.745] }, condition = base::local({ [10:56:14.745] c <- base::c [10:56:14.745] inherits <- base::inherits [10:56:14.745] invokeRestart <- base::invokeRestart [10:56:14.745] length <- base::length [10:56:14.745] list <- base::list [10:56:14.745] seq.int <- base::seq.int [10:56:14.745] signalCondition <- base::signalCondition [10:56:14.745] sys.calls <- base::sys.calls [10:56:14.745] `[[` <- base::`[[` [10:56:14.745] `+` <- base::`+` [10:56:14.745] `<<-` <- base::`<<-` [10:56:14.745] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:14.745] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:14.745] 3L)] [10:56:14.745] } [10:56:14.745] function(cond) { [10:56:14.745] is_error <- inherits(cond, "error") [10:56:14.745] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:14.745] NULL) [10:56:14.745] if (is_error) { [10:56:14.745] sessionInformation <- function() { [10:56:14.745] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:14.745] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:14.745] search = base::search(), system = base::Sys.info()) [10:56:14.745] } [10:56:14.745] ...future.conditions[[length(...future.conditions) + [10:56:14.745] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:14.745] cond$call), session = sessionInformation(), [10:56:14.745] timestamp = base::Sys.time(), signaled = 0L) [10:56:14.745] signalCondition(cond) [10:56:14.745] } [10:56:14.745] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:14.745] signal <- FALSE && inherits(cond, character(0)) [10:56:14.745] ...future.conditions[[length(...future.conditions) + [10:56:14.745] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:14.745] if (FALSE && !signal) { [10:56:14.745] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.745] { [10:56:14.745] inherits <- base::inherits [10:56:14.745] invokeRestart <- base::invokeRestart [10:56:14.745] is.null <- base::is.null [10:56:14.745] muffled <- FALSE [10:56:14.745] if (inherits(cond, "message")) { [10:56:14.745] muffled <- grepl(pattern, "muffleMessage") [10:56:14.745] if (muffled) [10:56:14.745] invokeRestart("muffleMessage") [10:56:14.745] } [10:56:14.745] else if (inherits(cond, "warning")) { [10:56:14.745] muffled <- grepl(pattern, "muffleWarning") [10:56:14.745] if (muffled) [10:56:14.745] invokeRestart("muffleWarning") [10:56:14.745] } [10:56:14.745] else if (inherits(cond, "condition")) { [10:56:14.745] if (!is.null(pattern)) { [10:56:14.745] computeRestarts <- base::computeRestarts [10:56:14.745] grepl <- base::grepl [10:56:14.745] restarts <- computeRestarts(cond) [10:56:14.745] for (restart in restarts) { [10:56:14.745] name <- restart$name [10:56:14.745] if (is.null(name)) [10:56:14.745] next [10:56:14.745] if (!grepl(pattern, name)) [10:56:14.745] next [10:56:14.745] invokeRestart(restart) [10:56:14.745] muffled <- TRUE [10:56:14.745] break [10:56:14.745] } [10:56:14.745] } [10:56:14.745] } [10:56:14.745] invisible(muffled) [10:56:14.745] } [10:56:14.745] muffleCondition(cond, pattern = "^muffle") [10:56:14.745] } [10:56:14.745] } [10:56:14.745] else { [10:56:14.745] if (TRUE) { [10:56:14.745] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.745] { [10:56:14.745] inherits <- base::inherits [10:56:14.745] invokeRestart <- base::invokeRestart [10:56:14.745] is.null <- base::is.null [10:56:14.745] muffled <- FALSE [10:56:14.745] if (inherits(cond, "message")) { [10:56:14.745] muffled <- grepl(pattern, "muffleMessage") [10:56:14.745] if (muffled) [10:56:14.745] invokeRestart("muffleMessage") [10:56:14.745] } [10:56:14.745] else if (inherits(cond, "warning")) { [10:56:14.745] muffled <- grepl(pattern, "muffleWarning") [10:56:14.745] if (muffled) [10:56:14.745] invokeRestart("muffleWarning") [10:56:14.745] } [10:56:14.745] else if (inherits(cond, "condition")) { [10:56:14.745] if (!is.null(pattern)) { [10:56:14.745] computeRestarts <- base::computeRestarts [10:56:14.745] grepl <- base::grepl [10:56:14.745] restarts <- computeRestarts(cond) [10:56:14.745] for (restart in restarts) { [10:56:14.745] name <- restart$name [10:56:14.745] if (is.null(name)) [10:56:14.745] next [10:56:14.745] if (!grepl(pattern, name)) [10:56:14.745] next [10:56:14.745] invokeRestart(restart) [10:56:14.745] muffled <- TRUE [10:56:14.745] break [10:56:14.745] } [10:56:14.745] } [10:56:14.745] } [10:56:14.745] invisible(muffled) [10:56:14.745] } [10:56:14.745] muffleCondition(cond, pattern = "^muffle") [10:56:14.745] } [10:56:14.745] } [10:56:14.745] } [10:56:14.745] })) [10:56:14.745] }, error = function(ex) { [10:56:14.745] base::structure(base::list(value = NULL, visible = NULL, [10:56:14.745] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.745] ...future.rng), started = ...future.startTime, [10:56:14.745] finished = Sys.time(), session_uuid = NA_character_, [10:56:14.745] version = "1.8"), class = "FutureResult") [10:56:14.745] }, finally = { [10:56:14.745] if (!identical(...future.workdir, getwd())) [10:56:14.745] setwd(...future.workdir) [10:56:14.745] { [10:56:14.745] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:14.745] ...future.oldOptions$nwarnings <- NULL [10:56:14.745] } [10:56:14.745] base::options(...future.oldOptions) [10:56:14.745] if (.Platform$OS.type == "windows") { [10:56:14.745] old_names <- names(...future.oldEnvVars) [10:56:14.745] envs <- base::Sys.getenv() [10:56:14.745] names <- names(envs) [10:56:14.745] common <- intersect(names, old_names) [10:56:14.745] added <- setdiff(names, old_names) [10:56:14.745] removed <- setdiff(old_names, names) [10:56:14.745] changed <- common[...future.oldEnvVars[common] != [10:56:14.745] envs[common]] [10:56:14.745] NAMES <- toupper(changed) [10:56:14.745] args <- list() [10:56:14.745] for (kk in seq_along(NAMES)) { [10:56:14.745] name <- changed[[kk]] [10:56:14.745] NAME <- NAMES[[kk]] [10:56:14.745] if (name != NAME && is.element(NAME, old_names)) [10:56:14.745] next [10:56:14.745] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.745] } [10:56:14.745] NAMES <- toupper(added) [10:56:14.745] for (kk in seq_along(NAMES)) { [10:56:14.745] name <- added[[kk]] [10:56:14.745] NAME <- NAMES[[kk]] [10:56:14.745] if (name != NAME && is.element(NAME, old_names)) [10:56:14.745] next [10:56:14.745] args[[name]] <- "" [10:56:14.745] } [10:56:14.745] NAMES <- toupper(removed) [10:56:14.745] for (kk in seq_along(NAMES)) { [10:56:14.745] name <- removed[[kk]] [10:56:14.745] NAME <- NAMES[[kk]] [10:56:14.745] if (name != NAME && is.element(NAME, old_names)) [10:56:14.745] next [10:56:14.745] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.745] } [10:56:14.745] if (length(args) > 0) [10:56:14.745] base::do.call(base::Sys.setenv, args = args) [10:56:14.745] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:14.745] } [10:56:14.745] else { [10:56:14.745] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:14.745] } [10:56:14.745] { [10:56:14.745] if (base::length(...future.futureOptionsAdded) > [10:56:14.745] 0L) { [10:56:14.745] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:14.745] base::names(opts) <- ...future.futureOptionsAdded [10:56:14.745] base::options(opts) [10:56:14.745] } [10:56:14.745] { [10:56:14.745] NULL [10:56:14.745] options(future.plan = NULL) [10:56:14.745] if (is.na(NA_character_)) [10:56:14.745] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.745] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:14.745] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:14.745] .init = FALSE) [10:56:14.745] } [10:56:14.745] } [10:56:14.745] } [10:56:14.745] }) [10:56:14.745] if (TRUE) { [10:56:14.745] base::sink(type = "output", split = FALSE) [10:56:14.745] if (TRUE) { [10:56:14.745] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:14.745] } [10:56:14.745] else { [10:56:14.745] ...future.result["stdout"] <- base::list(NULL) [10:56:14.745] } [10:56:14.745] base::close(...future.stdout) [10:56:14.745] ...future.stdout <- NULL [10:56:14.745] } [10:56:14.745] ...future.result$conditions <- ...future.conditions [10:56:14.745] ...future.result$finished <- base::Sys.time() [10:56:14.745] ...future.result [10:56:14.745] } [10:56:14.749] - Launch lazy future ... done [10:56:14.749] run() for 'MiraiFuture' ... done Call: lm(formula = dist ~ speed + speed^2, data = cars) Coefficients: (Intercept) speed -17.579 3.932 [10:56:14.759] - Globals - lm(, data = cars) ... Call: lm(formula = dist ~ speed + I(speed^2), data = cars) Coefficients: (Intercept) speed I(speed^2) 2.47014 0.91329 0.09996 [10:56:14.760] getGlobalsAndPackages() ... [10:56:14.761] Searching for globals... [10:56:14.763] - globals found: [9] '{', 'lm', 'dist', '+', 'speed', 'I', '^', '~', 'cars' [10:56:14.764] Searching for globals ... DONE [10:56:14.764] Resolving globals: FALSE [10:56:14.764] [10:56:14.765] - packages: [2] 'stats', 'datasets' [10:56:14.765] getGlobalsAndPackages() ... DONE [10:56:14.765] run() for 'Future' ... [10:56:14.765] - state: 'created' [10:56:14.766] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:14.768] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:14.768] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:14.768] - Field: 'label' [10:56:14.768] - Field: 'local' [10:56:14.769] - Field: 'owner' [10:56:14.769] - Field: 'envir' [10:56:14.769] - Field: 'packages' [10:56:14.769] - Field: 'gc' [10:56:14.769] - Field: 'conditions' [10:56:14.770] - Field: 'expr' [10:56:14.770] - Field: 'uuid' [10:56:14.770] - Field: 'seed' [10:56:14.770] - Field: 'version' [10:56:14.770] - Field: 'result' [10:56:14.770] - Field: 'asynchronous' [10:56:14.771] - Field: 'calls' [10:56:14.771] - Field: 'globals' [10:56:14.771] - Field: 'stdout' [10:56:14.771] - Field: 'earlySignal' [10:56:14.771] - Field: 'lazy' [10:56:14.771] - Field: 'state' [10:56:14.772] - Field: '.cluster' [10:56:14.772] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:14.772] - Launch lazy future ... [10:56:14.772] Packages needed by the future expression (n = 2): 'stats', 'datasets' [10:56:14.772] Packages needed by future strategies (n = 0): [10:56:14.773] { [10:56:14.773] { [10:56:14.773] { [10:56:14.773] ...future.startTime <- base::Sys.time() [10:56:14.773] { [10:56:14.773] { [10:56:14.773] { [10:56:14.773] { [10:56:14.773] base::local({ [10:56:14.773] has_future <- base::requireNamespace("future", [10:56:14.773] quietly = TRUE) [10:56:14.773] if (has_future) { [10:56:14.773] ns <- base::getNamespace("future") [10:56:14.773] version <- ns[[".package"]][["version"]] [10:56:14.773] if (is.null(version)) [10:56:14.773] version <- utils::packageVersion("future") [10:56:14.773] } [10:56:14.773] else { [10:56:14.773] version <- NULL [10:56:14.773] } [10:56:14.773] if (!has_future || version < "1.8.0") { [10:56:14.773] info <- base::c(r_version = base::gsub("R version ", [10:56:14.773] "", base::R.version$version.string), [10:56:14.773] platform = base::sprintf("%s (%s-bit)", [10:56:14.773] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:14.773] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:14.773] "release", "version")], collapse = " "), [10:56:14.773] hostname = base::Sys.info()[["nodename"]]) [10:56:14.773] info <- base::sprintf("%s: %s", base::names(info), [10:56:14.773] info) [10:56:14.773] info <- base::paste(info, collapse = "; ") [10:56:14.773] if (!has_future) { [10:56:14.773] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:14.773] info) [10:56:14.773] } [10:56:14.773] else { [10:56:14.773] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:14.773] info, version) [10:56:14.773] } [10:56:14.773] base::stop(msg) [10:56:14.773] } [10:56:14.773] }) [10:56:14.773] } [10:56:14.773] base::local({ [10:56:14.773] for (pkg in c("stats", "datasets")) { [10:56:14.773] base::loadNamespace(pkg) [10:56:14.773] base::library(pkg, character.only = TRUE) [10:56:14.773] } [10:56:14.773] }) [10:56:14.773] } [10:56:14.773] ...future.strategy.old <- future::plan("list") [10:56:14.773] options(future.plan = NULL) [10:56:14.773] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.773] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:14.773] } [10:56:14.773] ...future.workdir <- getwd() [10:56:14.773] } [10:56:14.773] ...future.oldOptions <- base::as.list(base::.Options) [10:56:14.773] ...future.oldEnvVars <- base::Sys.getenv() [10:56:14.773] } [10:56:14.773] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:14.773] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:14.773] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:14.773] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:14.773] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:14.773] future.stdout.windows.reencode = NULL, width = 80L) [10:56:14.773] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:14.773] base::names(...future.oldOptions)) [10:56:14.773] } [10:56:14.773] if (FALSE) { [10:56:14.773] } [10:56:14.773] else { [10:56:14.773] if (TRUE) { [10:56:14.773] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:14.773] open = "w") [10:56:14.773] } [10:56:14.773] else { [10:56:14.773] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:14.773] windows = "NUL", "/dev/null"), open = "w") [10:56:14.773] } [10:56:14.773] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:14.773] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:14.773] base::sink(type = "output", split = FALSE) [10:56:14.773] base::close(...future.stdout) [10:56:14.773] }, add = TRUE) [10:56:14.773] } [10:56:14.773] ...future.frame <- base::sys.nframe() [10:56:14.773] ...future.conditions <- base::list() [10:56:14.773] ...future.rng <- base::globalenv()$.Random.seed [10:56:14.773] if (FALSE) { [10:56:14.773] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:14.773] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:14.773] } [10:56:14.773] ...future.result <- base::tryCatch({ [10:56:14.773] base::withCallingHandlers({ [10:56:14.773] ...future.value <- base::withVisible(base::local({ [10:56:14.773] lm(dist ~ speed + I(speed^2), data = cars) [10:56:14.773] })) [10:56:14.773] future::FutureResult(value = ...future.value$value, [10:56:14.773] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.773] ...future.rng), globalenv = if (FALSE) [10:56:14.773] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:14.773] ...future.globalenv.names)) [10:56:14.773] else NULL, started = ...future.startTime, version = "1.8") [10:56:14.773] }, condition = base::local({ [10:56:14.773] c <- base::c [10:56:14.773] inherits <- base::inherits [10:56:14.773] invokeRestart <- base::invokeRestart [10:56:14.773] length <- base::length [10:56:14.773] list <- base::list [10:56:14.773] seq.int <- base::seq.int [10:56:14.773] signalCondition <- base::signalCondition [10:56:14.773] sys.calls <- base::sys.calls [10:56:14.773] `[[` <- base::`[[` [10:56:14.773] `+` <- base::`+` [10:56:14.773] `<<-` <- base::`<<-` [10:56:14.773] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:14.773] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:14.773] 3L)] [10:56:14.773] } [10:56:14.773] function(cond) { [10:56:14.773] is_error <- inherits(cond, "error") [10:56:14.773] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:14.773] NULL) [10:56:14.773] if (is_error) { [10:56:14.773] sessionInformation <- function() { [10:56:14.773] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:14.773] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:14.773] search = base::search(), system = base::Sys.info()) [10:56:14.773] } [10:56:14.773] ...future.conditions[[length(...future.conditions) + [10:56:14.773] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:14.773] cond$call), session = sessionInformation(), [10:56:14.773] timestamp = base::Sys.time(), signaled = 0L) [10:56:14.773] signalCondition(cond) [10:56:14.773] } [10:56:14.773] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:14.773] signal <- FALSE && inherits(cond, character(0)) [10:56:14.773] ...future.conditions[[length(...future.conditions) + [10:56:14.773] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:14.773] if (FALSE && !signal) { [10:56:14.773] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.773] { [10:56:14.773] inherits <- base::inherits [10:56:14.773] invokeRestart <- base::invokeRestart [10:56:14.773] is.null <- base::is.null [10:56:14.773] muffled <- FALSE [10:56:14.773] if (inherits(cond, "message")) { [10:56:14.773] muffled <- grepl(pattern, "muffleMessage") [10:56:14.773] if (muffled) [10:56:14.773] invokeRestart("muffleMessage") [10:56:14.773] } [10:56:14.773] else if (inherits(cond, "warning")) { [10:56:14.773] muffled <- grepl(pattern, "muffleWarning") [10:56:14.773] if (muffled) [10:56:14.773] invokeRestart("muffleWarning") [10:56:14.773] } [10:56:14.773] else if (inherits(cond, "condition")) { [10:56:14.773] if (!is.null(pattern)) { [10:56:14.773] computeRestarts <- base::computeRestarts [10:56:14.773] grepl <- base::grepl [10:56:14.773] restarts <- computeRestarts(cond) [10:56:14.773] for (restart in restarts) { [10:56:14.773] name <- restart$name [10:56:14.773] if (is.null(name)) [10:56:14.773] next [10:56:14.773] if (!grepl(pattern, name)) [10:56:14.773] next [10:56:14.773] invokeRestart(restart) [10:56:14.773] muffled <- TRUE [10:56:14.773] break [10:56:14.773] } [10:56:14.773] } [10:56:14.773] } [10:56:14.773] invisible(muffled) [10:56:14.773] } [10:56:14.773] muffleCondition(cond, pattern = "^muffle") [10:56:14.773] } [10:56:14.773] } [10:56:14.773] else { [10:56:14.773] if (TRUE) { [10:56:14.773] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.773] { [10:56:14.773] inherits <- base::inherits [10:56:14.773] invokeRestart <- base::invokeRestart [10:56:14.773] is.null <- base::is.null [10:56:14.773] muffled <- FALSE [10:56:14.773] if (inherits(cond, "message")) { [10:56:14.773] muffled <- grepl(pattern, "muffleMessage") [10:56:14.773] if (muffled) [10:56:14.773] invokeRestart("muffleMessage") [10:56:14.773] } [10:56:14.773] else if (inherits(cond, "warning")) { [10:56:14.773] muffled <- grepl(pattern, "muffleWarning") [10:56:14.773] if (muffled) [10:56:14.773] invokeRestart("muffleWarning") [10:56:14.773] } [10:56:14.773] else if (inherits(cond, "condition")) { [10:56:14.773] if (!is.null(pattern)) { [10:56:14.773] computeRestarts <- base::computeRestarts [10:56:14.773] grepl <- base::grepl [10:56:14.773] restarts <- computeRestarts(cond) [10:56:14.773] for (restart in restarts) { [10:56:14.773] name <- restart$name [10:56:14.773] if (is.null(name)) [10:56:14.773] next [10:56:14.773] if (!grepl(pattern, name)) [10:56:14.773] next [10:56:14.773] invokeRestart(restart) [10:56:14.773] muffled <- TRUE [10:56:14.773] break [10:56:14.773] } [10:56:14.773] } [10:56:14.773] } [10:56:14.773] invisible(muffled) [10:56:14.773] } [10:56:14.773] muffleCondition(cond, pattern = "^muffle") [10:56:14.773] } [10:56:14.773] } [10:56:14.773] } [10:56:14.773] })) [10:56:14.773] }, error = function(ex) { [10:56:14.773] base::structure(base::list(value = NULL, visible = NULL, [10:56:14.773] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.773] ...future.rng), started = ...future.startTime, [10:56:14.773] finished = Sys.time(), session_uuid = NA_character_, [10:56:14.773] version = "1.8"), class = "FutureResult") [10:56:14.773] }, finally = { [10:56:14.773] if (!identical(...future.workdir, getwd())) [10:56:14.773] setwd(...future.workdir) [10:56:14.773] { [10:56:14.773] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:14.773] ...future.oldOptions$nwarnings <- NULL [10:56:14.773] } [10:56:14.773] base::options(...future.oldOptions) [10:56:14.773] if (.Platform$OS.type == "windows") { [10:56:14.773] old_names <- names(...future.oldEnvVars) [10:56:14.773] envs <- base::Sys.getenv() [10:56:14.773] names <- names(envs) [10:56:14.773] common <- intersect(names, old_names) [10:56:14.773] added <- setdiff(names, old_names) [10:56:14.773] removed <- setdiff(old_names, names) [10:56:14.773] changed <- common[...future.oldEnvVars[common] != [10:56:14.773] envs[common]] [10:56:14.773] NAMES <- toupper(changed) [10:56:14.773] args <- list() [10:56:14.773] for (kk in seq_along(NAMES)) { [10:56:14.773] name <- changed[[kk]] [10:56:14.773] NAME <- NAMES[[kk]] [10:56:14.773] if (name != NAME && is.element(NAME, old_names)) [10:56:14.773] next [10:56:14.773] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.773] } [10:56:14.773] NAMES <- toupper(added) [10:56:14.773] for (kk in seq_along(NAMES)) { [10:56:14.773] name <- added[[kk]] [10:56:14.773] NAME <- NAMES[[kk]] [10:56:14.773] if (name != NAME && is.element(NAME, old_names)) [10:56:14.773] next [10:56:14.773] args[[name]] <- "" [10:56:14.773] } [10:56:14.773] NAMES <- toupper(removed) [10:56:14.773] for (kk in seq_along(NAMES)) { [10:56:14.773] name <- removed[[kk]] [10:56:14.773] NAME <- NAMES[[kk]] [10:56:14.773] if (name != NAME && is.element(NAME, old_names)) [10:56:14.773] next [10:56:14.773] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.773] } [10:56:14.773] if (length(args) > 0) [10:56:14.773] base::do.call(base::Sys.setenv, args = args) [10:56:14.773] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:14.773] } [10:56:14.773] else { [10:56:14.773] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:14.773] } [10:56:14.773] { [10:56:14.773] if (base::length(...future.futureOptionsAdded) > [10:56:14.773] 0L) { [10:56:14.773] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:14.773] base::names(opts) <- ...future.futureOptionsAdded [10:56:14.773] base::options(opts) [10:56:14.773] } [10:56:14.773] { [10:56:14.773] NULL [10:56:14.773] options(future.plan = NULL) [10:56:14.773] if (is.na(NA_character_)) [10:56:14.773] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.773] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:14.773] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:14.773] .init = FALSE) [10:56:14.773] } [10:56:14.773] } [10:56:14.773] } [10:56:14.773] }) [10:56:14.773] if (TRUE) { [10:56:14.773] base::sink(type = "output", split = FALSE) [10:56:14.773] if (TRUE) { [10:56:14.773] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:14.773] } [10:56:14.773] else { [10:56:14.773] ...future.result["stdout"] <- base::list(NULL) [10:56:14.773] } [10:56:14.773] base::close(...future.stdout) [10:56:14.773] ...future.stdout <- NULL [10:56:14.773] } [10:56:14.773] ...future.result$conditions <- ...future.conditions [10:56:14.773] ...future.result$finished <- base::Sys.time() [10:56:14.773] ...future.result [10:56:14.773] } [10:56:14.777] - Launch lazy future ... done [10:56:14.777] run() for 'MiraiFuture' ... done Call: lm(formula = dist ~ speed + I(speed^2), data = cars) Coefficients: (Intercept) speed I(speed^2) 2.47014 0.91329 0.09996 [10:56:14.785] - Globals - lm(, data = cars) ... Call: lm(formula = dist ~ poly(speed, 2), data = cars) Coefficients: (Intercept) poly(speed, 2)1 poly(speed, 2)2 42.98 145.55 23.00 [10:56:14.788] getGlobalsAndPackages() ... [10:56:14.788] Searching for globals... [10:56:14.818] - globals found: [7] '{', 'lm', 'dist', 'poly', 'speed', '~', 'cars' [10:56:14.818] Searching for globals ... DONE [10:56:14.818] Resolving globals: FALSE [10:56:14.819] [10:56:14.819] - packages: [2] 'stats', 'datasets' [10:56:14.819] getGlobalsAndPackages() ... DONE [10:56:14.820] run() for 'Future' ... [10:56:14.820] - state: 'created' [10:56:14.820] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:14.823] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:14.823] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:14.823] - Field: 'label' [10:56:14.823] - Field: 'local' [10:56:14.823] - Field: 'owner' [10:56:14.824] - Field: 'envir' [10:56:14.824] - Field: 'packages' [10:56:14.824] - Field: 'gc' [10:56:14.824] - Field: 'conditions' [10:56:14.824] - Field: 'expr' [10:56:14.824] - Field: 'uuid' [10:56:14.825] - Field: 'seed' [10:56:14.825] - Field: 'version' [10:56:14.825] - Field: 'result' [10:56:14.825] - Field: 'asynchronous' [10:56:14.825] - Field: 'calls' [10:56:14.826] - Field: 'globals' [10:56:14.826] - Field: 'stdout' [10:56:14.826] - Field: 'earlySignal' [10:56:14.826] - Field: 'lazy' [10:56:14.826] - Field: 'state' [10:56:14.826] - Field: '.cluster' [10:56:14.827] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:14.827] - Launch lazy future ... [10:56:14.827] Packages needed by the future expression (n = 2): 'stats', 'datasets' [10:56:14.827] Packages needed by future strategies (n = 0): [10:56:14.828] { [10:56:14.828] { [10:56:14.828] { [10:56:14.828] ...future.startTime <- base::Sys.time() [10:56:14.828] { [10:56:14.828] { [10:56:14.828] { [10:56:14.828] { [10:56:14.828] base::local({ [10:56:14.828] has_future <- base::requireNamespace("future", [10:56:14.828] quietly = TRUE) [10:56:14.828] if (has_future) { [10:56:14.828] ns <- base::getNamespace("future") [10:56:14.828] version <- ns[[".package"]][["version"]] [10:56:14.828] if (is.null(version)) [10:56:14.828] version <- utils::packageVersion("future") [10:56:14.828] } [10:56:14.828] else { [10:56:14.828] version <- NULL [10:56:14.828] } [10:56:14.828] if (!has_future || version < "1.8.0") { [10:56:14.828] info <- base::c(r_version = base::gsub("R version ", [10:56:14.828] "", base::R.version$version.string), [10:56:14.828] platform = base::sprintf("%s (%s-bit)", [10:56:14.828] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:14.828] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:14.828] "release", "version")], collapse = " "), [10:56:14.828] hostname = base::Sys.info()[["nodename"]]) [10:56:14.828] info <- base::sprintf("%s: %s", base::names(info), [10:56:14.828] info) [10:56:14.828] info <- base::paste(info, collapse = "; ") [10:56:14.828] if (!has_future) { [10:56:14.828] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:14.828] info) [10:56:14.828] } [10:56:14.828] else { [10:56:14.828] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:14.828] info, version) [10:56:14.828] } [10:56:14.828] base::stop(msg) [10:56:14.828] } [10:56:14.828] }) [10:56:14.828] } [10:56:14.828] base::local({ [10:56:14.828] for (pkg in c("stats", "datasets")) { [10:56:14.828] base::loadNamespace(pkg) [10:56:14.828] base::library(pkg, character.only = TRUE) [10:56:14.828] } [10:56:14.828] }) [10:56:14.828] } [10:56:14.828] ...future.strategy.old <- future::plan("list") [10:56:14.828] options(future.plan = NULL) [10:56:14.828] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.828] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:14.828] } [10:56:14.828] ...future.workdir <- getwd() [10:56:14.828] } [10:56:14.828] ...future.oldOptions <- base::as.list(base::.Options) [10:56:14.828] ...future.oldEnvVars <- base::Sys.getenv() [10:56:14.828] } [10:56:14.828] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:14.828] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:14.828] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:14.828] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:14.828] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:14.828] future.stdout.windows.reencode = NULL, width = 80L) [10:56:14.828] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:14.828] base::names(...future.oldOptions)) [10:56:14.828] } [10:56:14.828] if (FALSE) { [10:56:14.828] } [10:56:14.828] else { [10:56:14.828] if (TRUE) { [10:56:14.828] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:14.828] open = "w") [10:56:14.828] } [10:56:14.828] else { [10:56:14.828] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:14.828] windows = "NUL", "/dev/null"), open = "w") [10:56:14.828] } [10:56:14.828] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:14.828] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:14.828] base::sink(type = "output", split = FALSE) [10:56:14.828] base::close(...future.stdout) [10:56:14.828] }, add = TRUE) [10:56:14.828] } [10:56:14.828] ...future.frame <- base::sys.nframe() [10:56:14.828] ...future.conditions <- base::list() [10:56:14.828] ...future.rng <- base::globalenv()$.Random.seed [10:56:14.828] if (FALSE) { [10:56:14.828] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:14.828] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:14.828] } [10:56:14.828] ...future.result <- base::tryCatch({ [10:56:14.828] base::withCallingHandlers({ [10:56:14.828] ...future.value <- base::withVisible(base::local({ [10:56:14.828] lm(dist ~ poly(speed, 2), data = cars) [10:56:14.828] })) [10:56:14.828] future::FutureResult(value = ...future.value$value, [10:56:14.828] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.828] ...future.rng), globalenv = if (FALSE) [10:56:14.828] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:14.828] ...future.globalenv.names)) [10:56:14.828] else NULL, started = ...future.startTime, version = "1.8") [10:56:14.828] }, condition = base::local({ [10:56:14.828] c <- base::c [10:56:14.828] inherits <- base::inherits [10:56:14.828] invokeRestart <- base::invokeRestart [10:56:14.828] length <- base::length [10:56:14.828] list <- base::list [10:56:14.828] seq.int <- base::seq.int [10:56:14.828] signalCondition <- base::signalCondition [10:56:14.828] sys.calls <- base::sys.calls [10:56:14.828] `[[` <- base::`[[` [10:56:14.828] `+` <- base::`+` [10:56:14.828] `<<-` <- base::`<<-` [10:56:14.828] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:14.828] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:14.828] 3L)] [10:56:14.828] } [10:56:14.828] function(cond) { [10:56:14.828] is_error <- inherits(cond, "error") [10:56:14.828] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:14.828] NULL) [10:56:14.828] if (is_error) { [10:56:14.828] sessionInformation <- function() { [10:56:14.828] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:14.828] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:14.828] search = base::search(), system = base::Sys.info()) [10:56:14.828] } [10:56:14.828] ...future.conditions[[length(...future.conditions) + [10:56:14.828] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:14.828] cond$call), session = sessionInformation(), [10:56:14.828] timestamp = base::Sys.time(), signaled = 0L) [10:56:14.828] signalCondition(cond) [10:56:14.828] } [10:56:14.828] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:14.828] signal <- FALSE && inherits(cond, character(0)) [10:56:14.828] ...future.conditions[[length(...future.conditions) + [10:56:14.828] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:14.828] if (FALSE && !signal) { [10:56:14.828] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.828] { [10:56:14.828] inherits <- base::inherits [10:56:14.828] invokeRestart <- base::invokeRestart [10:56:14.828] is.null <- base::is.null [10:56:14.828] muffled <- FALSE [10:56:14.828] if (inherits(cond, "message")) { [10:56:14.828] muffled <- grepl(pattern, "muffleMessage") [10:56:14.828] if (muffled) [10:56:14.828] invokeRestart("muffleMessage") [10:56:14.828] } [10:56:14.828] else if (inherits(cond, "warning")) { [10:56:14.828] muffled <- grepl(pattern, "muffleWarning") [10:56:14.828] if (muffled) [10:56:14.828] invokeRestart("muffleWarning") [10:56:14.828] } [10:56:14.828] else if (inherits(cond, "condition")) { [10:56:14.828] if (!is.null(pattern)) { [10:56:14.828] computeRestarts <- base::computeRestarts [10:56:14.828] grepl <- base::grepl [10:56:14.828] restarts <- computeRestarts(cond) [10:56:14.828] for (restart in restarts) { [10:56:14.828] name <- restart$name [10:56:14.828] if (is.null(name)) [10:56:14.828] next [10:56:14.828] if (!grepl(pattern, name)) [10:56:14.828] next [10:56:14.828] invokeRestart(restart) [10:56:14.828] muffled <- TRUE [10:56:14.828] break [10:56:14.828] } [10:56:14.828] } [10:56:14.828] } [10:56:14.828] invisible(muffled) [10:56:14.828] } [10:56:14.828] muffleCondition(cond, pattern = "^muffle") [10:56:14.828] } [10:56:14.828] } [10:56:14.828] else { [10:56:14.828] if (TRUE) { [10:56:14.828] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.828] { [10:56:14.828] inherits <- base::inherits [10:56:14.828] invokeRestart <- base::invokeRestart [10:56:14.828] is.null <- base::is.null [10:56:14.828] muffled <- FALSE [10:56:14.828] if (inherits(cond, "message")) { [10:56:14.828] muffled <- grepl(pattern, "muffleMessage") [10:56:14.828] if (muffled) [10:56:14.828] invokeRestart("muffleMessage") [10:56:14.828] } [10:56:14.828] else if (inherits(cond, "warning")) { [10:56:14.828] muffled <- grepl(pattern, "muffleWarning") [10:56:14.828] if (muffled) [10:56:14.828] invokeRestart("muffleWarning") [10:56:14.828] } [10:56:14.828] else if (inherits(cond, "condition")) { [10:56:14.828] if (!is.null(pattern)) { [10:56:14.828] computeRestarts <- base::computeRestarts [10:56:14.828] grepl <- base::grepl [10:56:14.828] restarts <- computeRestarts(cond) [10:56:14.828] for (restart in restarts) { [10:56:14.828] name <- restart$name [10:56:14.828] if (is.null(name)) [10:56:14.828] next [10:56:14.828] if (!grepl(pattern, name)) [10:56:14.828] next [10:56:14.828] invokeRestart(restart) [10:56:14.828] muffled <- TRUE [10:56:14.828] break [10:56:14.828] } [10:56:14.828] } [10:56:14.828] } [10:56:14.828] invisible(muffled) [10:56:14.828] } [10:56:14.828] muffleCondition(cond, pattern = "^muffle") [10:56:14.828] } [10:56:14.828] } [10:56:14.828] } [10:56:14.828] })) [10:56:14.828] }, error = function(ex) { [10:56:14.828] base::structure(base::list(value = NULL, visible = NULL, [10:56:14.828] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.828] ...future.rng), started = ...future.startTime, [10:56:14.828] finished = Sys.time(), session_uuid = NA_character_, [10:56:14.828] version = "1.8"), class = "FutureResult") [10:56:14.828] }, finally = { [10:56:14.828] if (!identical(...future.workdir, getwd())) [10:56:14.828] setwd(...future.workdir) [10:56:14.828] { [10:56:14.828] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:14.828] ...future.oldOptions$nwarnings <- NULL [10:56:14.828] } [10:56:14.828] base::options(...future.oldOptions) [10:56:14.828] if (.Platform$OS.type == "windows") { [10:56:14.828] old_names <- names(...future.oldEnvVars) [10:56:14.828] envs <- base::Sys.getenv() [10:56:14.828] names <- names(envs) [10:56:14.828] common <- intersect(names, old_names) [10:56:14.828] added <- setdiff(names, old_names) [10:56:14.828] removed <- setdiff(old_names, names) [10:56:14.828] changed <- common[...future.oldEnvVars[common] != [10:56:14.828] envs[common]] [10:56:14.828] NAMES <- toupper(changed) [10:56:14.828] args <- list() [10:56:14.828] for (kk in seq_along(NAMES)) { [10:56:14.828] name <- changed[[kk]] [10:56:14.828] NAME <- NAMES[[kk]] [10:56:14.828] if (name != NAME && is.element(NAME, old_names)) [10:56:14.828] next [10:56:14.828] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.828] } [10:56:14.828] NAMES <- toupper(added) [10:56:14.828] for (kk in seq_along(NAMES)) { [10:56:14.828] name <- added[[kk]] [10:56:14.828] NAME <- NAMES[[kk]] [10:56:14.828] if (name != NAME && is.element(NAME, old_names)) [10:56:14.828] next [10:56:14.828] args[[name]] <- "" [10:56:14.828] } [10:56:14.828] NAMES <- toupper(removed) [10:56:14.828] for (kk in seq_along(NAMES)) { [10:56:14.828] name <- removed[[kk]] [10:56:14.828] NAME <- NAMES[[kk]] [10:56:14.828] if (name != NAME && is.element(NAME, old_names)) [10:56:14.828] next [10:56:14.828] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.828] } [10:56:14.828] if (length(args) > 0) [10:56:14.828] base::do.call(base::Sys.setenv, args = args) [10:56:14.828] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:14.828] } [10:56:14.828] else { [10:56:14.828] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:14.828] } [10:56:14.828] { [10:56:14.828] if (base::length(...future.futureOptionsAdded) > [10:56:14.828] 0L) { [10:56:14.828] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:14.828] base::names(opts) <- ...future.futureOptionsAdded [10:56:14.828] base::options(opts) [10:56:14.828] } [10:56:14.828] { [10:56:14.828] NULL [10:56:14.828] options(future.plan = NULL) [10:56:14.828] if (is.na(NA_character_)) [10:56:14.828] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.828] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:14.828] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:14.828] .init = FALSE) [10:56:14.828] } [10:56:14.828] } [10:56:14.828] } [10:56:14.828] }) [10:56:14.828] if (TRUE) { [10:56:14.828] base::sink(type = "output", split = FALSE) [10:56:14.828] if (TRUE) { [10:56:14.828] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:14.828] } [10:56:14.828] else { [10:56:14.828] ...future.result["stdout"] <- base::list(NULL) [10:56:14.828] } [10:56:14.828] base::close(...future.stdout) [10:56:14.828] ...future.stdout <- NULL [10:56:14.828] } [10:56:14.828] ...future.result$conditions <- ...future.conditions [10:56:14.828] ...future.result$finished <- base::Sys.time() [10:56:14.828] ...future.result [10:56:14.828] } [10:56:14.832] - Launch lazy future ... done [10:56:14.832] run() for 'MiraiFuture' ... done Call: lm(formula = dist ~ poly(speed, 2), data = cars) Coefficients: (Intercept) poly(speed, 2)1 poly(speed, 2)2 42.98 145.55 23.00 > > message("*** Globals - lm(, data = cars) ... DONE") *** Globals - lm(, data = cars) ... DONE > > > message("*** Globals - map(x, ~ expr) ...") *** Globals - map(x, ~ expr) ... > > ## A fake purrr::map() function with limited functionality > map <- function(.x, .f, ...) { + if (inherits(.f, "formula")) { + expr <- .f[[-1]] + .f <- eval(bquote(function(...) { + .(expr) + })) + } + eval(lapply(.x, FUN = .f, ...)) + } > > inner_function <- function(x) { x + 1 } > > outer_function <- function(x) { + map(1:2, ~ inner_function(.x)) + } > > y0 <- outer_function(1L) > str(y0) List of 2 $ : num [1:2] 2 3 $ : num [1:2] 2 3 > > ## This requires mirai (>= 0.13.2) > if (packageVersion("mirai") >= "0.13.2") { + f <- future({ outer_function(1L) }) + y <- value(f) + str(y) + stopifnot(all.equal(y, y0)) + + y %<-% { outer_function(1L) } + str(y) + stopifnot(all.equal(y, y0)) + } [10:56:14.852] getGlobalsAndPackages() ... [10:56:14.852] Searching for globals... [10:56:14.865] - globals found: [16] '{', 'outer_function', 'map', ':', '~', 'inner_function', '.x', 'if', 'inherits', '<-', '[[', '-', 'eval', 'bquote', 'lapply', '+' [10:56:14.865] Searching for globals ... DONE [10:56:14.866] Resolving globals: FALSE [10:56:14.867] The total size of the 3 globals is 7.52 KiB (7704 bytes) [10:56:14.868] The total size of the 3 globals exported for future expression ('{; outer_function(1L); }') is 7.52 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are three globals: 'map' (4.43 KiB of class 'function'), 'inner_function' (1.78 KiB of class 'function') and 'outer_function' (1.31 KiB of class 'function') [10:56:14.869] - globals: [3] 'outer_function', 'map', 'inner_function' [10:56:14.869] [10:56:14.869] getGlobalsAndPackages() ... DONE [10:56:14.870] run() for 'Future' ... [10:56:14.870] - state: 'created' [10:56:14.870] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:14.875] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:14.875] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:14.875] - Field: 'label' [10:56:14.876] - Field: 'local' [10:56:14.876] - Field: 'owner' [10:56:14.876] - Field: 'envir' [10:56:14.877] - Field: 'packages' [10:56:14.877] - Field: 'gc' [10:56:14.877] - Field: 'conditions' [10:56:14.878] - Field: 'expr' [10:56:14.878] - Field: 'uuid' [10:56:14.878] - Field: 'seed' [10:56:14.878] - Field: 'version' [10:56:14.879] - Field: 'result' [10:56:14.879] - Field: 'asynchronous' [10:56:14.879] - Field: 'calls' [10:56:14.880] - Field: 'globals' [10:56:14.880] - Field: 'stdout' [10:56:14.880] - Field: 'earlySignal' [10:56:14.881] - Field: 'lazy' [10:56:14.881] - Field: 'state' [10:56:14.881] - Field: '.cluster' [10:56:14.882] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:14.882] - Launch lazy future ... [10:56:14.882] Packages needed by the future expression (n = 0): [10:56:14.882] Packages needed by future strategies (n = 0): [10:56:14.884] { [10:56:14.884] { [10:56:14.884] { [10:56:14.884] ...future.startTime <- base::Sys.time() [10:56:14.884] { [10:56:14.884] { [10:56:14.884] { [10:56:14.884] base::local({ [10:56:14.884] has_future <- base::requireNamespace("future", [10:56:14.884] quietly = TRUE) [10:56:14.884] if (has_future) { [10:56:14.884] ns <- base::getNamespace("future") [10:56:14.884] version <- ns[[".package"]][["version"]] [10:56:14.884] if (is.null(version)) [10:56:14.884] version <- utils::packageVersion("future") [10:56:14.884] } [10:56:14.884] else { [10:56:14.884] version <- NULL [10:56:14.884] } [10:56:14.884] if (!has_future || version < "1.8.0") { [10:56:14.884] info <- base::c(r_version = base::gsub("R version ", [10:56:14.884] "", base::R.version$version.string), [10:56:14.884] platform = base::sprintf("%s (%s-bit)", [10:56:14.884] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:14.884] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:14.884] "release", "version")], collapse = " "), [10:56:14.884] hostname = base::Sys.info()[["nodename"]]) [10:56:14.884] info <- base::sprintf("%s: %s", base::names(info), [10:56:14.884] info) [10:56:14.884] info <- base::paste(info, collapse = "; ") [10:56:14.884] if (!has_future) { [10:56:14.884] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:14.884] info) [10:56:14.884] } [10:56:14.884] else { [10:56:14.884] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:14.884] info, version) [10:56:14.884] } [10:56:14.884] base::stop(msg) [10:56:14.884] } [10:56:14.884] }) [10:56:14.884] } [10:56:14.884] ...future.strategy.old <- future::plan("list") [10:56:14.884] options(future.plan = NULL) [10:56:14.884] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.884] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:14.884] } [10:56:14.884] ...future.workdir <- getwd() [10:56:14.884] } [10:56:14.884] ...future.oldOptions <- base::as.list(base::.Options) [10:56:14.884] ...future.oldEnvVars <- base::Sys.getenv() [10:56:14.884] } [10:56:14.884] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:14.884] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:14.884] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:14.884] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:14.884] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:14.884] future.stdout.windows.reencode = NULL, width = 80L) [10:56:14.884] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:14.884] base::names(...future.oldOptions)) [10:56:14.884] } [10:56:14.884] if (FALSE) { [10:56:14.884] } [10:56:14.884] else { [10:56:14.884] if (TRUE) { [10:56:14.884] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:14.884] open = "w") [10:56:14.884] } [10:56:14.884] else { [10:56:14.884] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:14.884] windows = "NUL", "/dev/null"), open = "w") [10:56:14.884] } [10:56:14.884] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:14.884] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:14.884] base::sink(type = "output", split = FALSE) [10:56:14.884] base::close(...future.stdout) [10:56:14.884] }, add = TRUE) [10:56:14.884] } [10:56:14.884] ...future.frame <- base::sys.nframe() [10:56:14.884] ...future.conditions <- base::list() [10:56:14.884] ...future.rng <- base::globalenv()$.Random.seed [10:56:14.884] if (FALSE) { [10:56:14.884] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:14.884] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:14.884] } [10:56:14.884] ...future.result <- base::tryCatch({ [10:56:14.884] base::withCallingHandlers({ [10:56:14.884] ...future.value <- base::withVisible(base::local({ [10:56:14.884] outer_function(1L) [10:56:14.884] })) [10:56:14.884] future::FutureResult(value = ...future.value$value, [10:56:14.884] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.884] ...future.rng), globalenv = if (FALSE) [10:56:14.884] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:14.884] ...future.globalenv.names)) [10:56:14.884] else NULL, started = ...future.startTime, version = "1.8") [10:56:14.884] }, condition = base::local({ [10:56:14.884] c <- base::c [10:56:14.884] inherits <- base::inherits [10:56:14.884] invokeRestart <- base::invokeRestart [10:56:14.884] length <- base::length [10:56:14.884] list <- base::list [10:56:14.884] seq.int <- base::seq.int [10:56:14.884] signalCondition <- base::signalCondition [10:56:14.884] sys.calls <- base::sys.calls [10:56:14.884] `[[` <- base::`[[` [10:56:14.884] `+` <- base::`+` [10:56:14.884] `<<-` <- base::`<<-` [10:56:14.884] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:14.884] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:14.884] 3L)] [10:56:14.884] } [10:56:14.884] function(cond) { [10:56:14.884] is_error <- inherits(cond, "error") [10:56:14.884] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:14.884] NULL) [10:56:14.884] if (is_error) { [10:56:14.884] sessionInformation <- function() { [10:56:14.884] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:14.884] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:14.884] search = base::search(), system = base::Sys.info()) [10:56:14.884] } [10:56:14.884] ...future.conditions[[length(...future.conditions) + [10:56:14.884] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:14.884] cond$call), session = sessionInformation(), [10:56:14.884] timestamp = base::Sys.time(), signaled = 0L) [10:56:14.884] signalCondition(cond) [10:56:14.884] } [10:56:14.884] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:14.884] signal <- FALSE && inherits(cond, character(0)) [10:56:14.884] ...future.conditions[[length(...future.conditions) + [10:56:14.884] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:14.884] if (FALSE && !signal) { [10:56:14.884] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.884] { [10:56:14.884] inherits <- base::inherits [10:56:14.884] invokeRestart <- base::invokeRestart [10:56:14.884] is.null <- base::is.null [10:56:14.884] muffled <- FALSE [10:56:14.884] if (inherits(cond, "message")) { [10:56:14.884] muffled <- grepl(pattern, "muffleMessage") [10:56:14.884] if (muffled) [10:56:14.884] invokeRestart("muffleMessage") [10:56:14.884] } [10:56:14.884] else if (inherits(cond, "warning")) { [10:56:14.884] muffled <- grepl(pattern, "muffleWarning") [10:56:14.884] if (muffled) [10:56:14.884] invokeRestart("muffleWarning") [10:56:14.884] } [10:56:14.884] else if (inherits(cond, "condition")) { [10:56:14.884] if (!is.null(pattern)) { [10:56:14.884] computeRestarts <- base::computeRestarts [10:56:14.884] grepl <- base::grepl [10:56:14.884] restarts <- computeRestarts(cond) [10:56:14.884] for (restart in restarts) { [10:56:14.884] name <- restart$name [10:56:14.884] if (is.null(name)) [10:56:14.884] next [10:56:14.884] if (!grepl(pattern, name)) [10:56:14.884] next [10:56:14.884] invokeRestart(restart) [10:56:14.884] muffled <- TRUE [10:56:14.884] break [10:56:14.884] } [10:56:14.884] } [10:56:14.884] } [10:56:14.884] invisible(muffled) [10:56:14.884] } [10:56:14.884] muffleCondition(cond, pattern = "^muffle") [10:56:14.884] } [10:56:14.884] } [10:56:14.884] else { [10:56:14.884] if (TRUE) { [10:56:14.884] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.884] { [10:56:14.884] inherits <- base::inherits [10:56:14.884] invokeRestart <- base::invokeRestart [10:56:14.884] is.null <- base::is.null [10:56:14.884] muffled <- FALSE [10:56:14.884] if (inherits(cond, "message")) { [10:56:14.884] muffled <- grepl(pattern, "muffleMessage") [10:56:14.884] if (muffled) [10:56:14.884] invokeRestart("muffleMessage") [10:56:14.884] } [10:56:14.884] else if (inherits(cond, "warning")) { [10:56:14.884] muffled <- grepl(pattern, "muffleWarning") [10:56:14.884] if (muffled) [10:56:14.884] invokeRestart("muffleWarning") [10:56:14.884] } [10:56:14.884] else if (inherits(cond, "condition")) { [10:56:14.884] if (!is.null(pattern)) { [10:56:14.884] computeRestarts <- base::computeRestarts [10:56:14.884] grepl <- base::grepl [10:56:14.884] restarts <- computeRestarts(cond) [10:56:14.884] for (restart in restarts) { [10:56:14.884] name <- restart$name [10:56:14.884] if (is.null(name)) [10:56:14.884] next [10:56:14.884] if (!grepl(pattern, name)) [10:56:14.884] next [10:56:14.884] invokeRestart(restart) [10:56:14.884] muffled <- TRUE [10:56:14.884] break [10:56:14.884] } [10:56:14.884] } [10:56:14.884] } [10:56:14.884] invisible(muffled) [10:56:14.884] } [10:56:14.884] muffleCondition(cond, pattern = "^muffle") [10:56:14.884] } [10:56:14.884] } [10:56:14.884] } [10:56:14.884] })) [10:56:14.884] }, error = function(ex) { [10:56:14.884] base::structure(base::list(value = NULL, visible = NULL, [10:56:14.884] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.884] ...future.rng), started = ...future.startTime, [10:56:14.884] finished = Sys.time(), session_uuid = NA_character_, [10:56:14.884] version = "1.8"), class = "FutureResult") [10:56:14.884] }, finally = { [10:56:14.884] if (!identical(...future.workdir, getwd())) [10:56:14.884] setwd(...future.workdir) [10:56:14.884] { [10:56:14.884] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:14.884] ...future.oldOptions$nwarnings <- NULL [10:56:14.884] } [10:56:14.884] base::options(...future.oldOptions) [10:56:14.884] if (.Platform$OS.type == "windows") { [10:56:14.884] old_names <- names(...future.oldEnvVars) [10:56:14.884] envs <- base::Sys.getenv() [10:56:14.884] names <- names(envs) [10:56:14.884] common <- intersect(names, old_names) [10:56:14.884] added <- setdiff(names, old_names) [10:56:14.884] removed <- setdiff(old_names, names) [10:56:14.884] changed <- common[...future.oldEnvVars[common] != [10:56:14.884] envs[common]] [10:56:14.884] NAMES <- toupper(changed) [10:56:14.884] args <- list() [10:56:14.884] for (kk in seq_along(NAMES)) { [10:56:14.884] name <- changed[[kk]] [10:56:14.884] NAME <- NAMES[[kk]] [10:56:14.884] if (name != NAME && is.element(NAME, old_names)) [10:56:14.884] next [10:56:14.884] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.884] } [10:56:14.884] NAMES <- toupper(added) [10:56:14.884] for (kk in seq_along(NAMES)) { [10:56:14.884] name <- added[[kk]] [10:56:14.884] NAME <- NAMES[[kk]] [10:56:14.884] if (name != NAME && is.element(NAME, old_names)) [10:56:14.884] next [10:56:14.884] args[[name]] <- "" [10:56:14.884] } [10:56:14.884] NAMES <- toupper(removed) [10:56:14.884] for (kk in seq_along(NAMES)) { [10:56:14.884] name <- removed[[kk]] [10:56:14.884] NAME <- NAMES[[kk]] [10:56:14.884] if (name != NAME && is.element(NAME, old_names)) [10:56:14.884] next [10:56:14.884] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.884] } [10:56:14.884] if (length(args) > 0) [10:56:14.884] base::do.call(base::Sys.setenv, args = args) [10:56:14.884] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:14.884] } [10:56:14.884] else { [10:56:14.884] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:14.884] } [10:56:14.884] { [10:56:14.884] if (base::length(...future.futureOptionsAdded) > [10:56:14.884] 0L) { [10:56:14.884] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:14.884] base::names(opts) <- ...future.futureOptionsAdded [10:56:14.884] base::options(opts) [10:56:14.884] } [10:56:14.884] { [10:56:14.884] NULL [10:56:14.884] options(future.plan = NULL) [10:56:14.884] if (is.na(NA_character_)) [10:56:14.884] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.884] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:14.884] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:14.884] .init = FALSE) [10:56:14.884] } [10:56:14.884] } [10:56:14.884] } [10:56:14.884] }) [10:56:14.884] if (TRUE) { [10:56:14.884] base::sink(type = "output", split = FALSE) [10:56:14.884] if (TRUE) { [10:56:14.884] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:14.884] } [10:56:14.884] else { [10:56:14.884] ...future.result["stdout"] <- base::list(NULL) [10:56:14.884] } [10:56:14.884] base::close(...future.stdout) [10:56:14.884] ...future.stdout <- NULL [10:56:14.884] } [10:56:14.884] ...future.result$conditions <- ...future.conditions [10:56:14.884] ...future.result$finished <- base::Sys.time() [10:56:14.884] ...future.result [10:56:14.884] } [10:56:14.890] - Launch lazy future ... done [10:56:14.890] run() for 'MiraiFuture' ... done List of 2 $ : num [1:2] 2 3 $ : num [1:2] 2 3 [10:56:14.899] getGlobalsAndPackages() ... [10:56:14.899] Searching for globals... [10:56:14.906] - globals found: [16] '{', 'outer_function', 'map', ':', '~', 'inner_function', '.x', 'if', 'inherits', '<-', '[[', '-', 'eval', 'bquote', 'lapply', '+' [10:56:14.906] Searching for globals ... DONE [10:56:14.906] Resolving globals: FALSE [10:56:14.907] The total size of the 3 globals is 7.52 KiB (7704 bytes) [10:56:14.908] The total size of the 3 globals exported for future expression ('{; outer_function(1L); }') is 7.52 KiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). There are three globals: 'map' (4.43 KiB of class 'function'), 'inner_function' (1.78 KiB of class 'function') and 'outer_function' (1.31 KiB of class 'function') [10:56:14.908] - globals: [3] 'outer_function', 'map', 'inner_function' [10:56:14.908] [10:56:14.908] getGlobalsAndPackages() ... DONE [10:56:14.909] run() for 'Future' ... [10:56:14.909] - state: 'created' [10:56:14.909] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [10:56:14.911] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [10:56:14.912] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [10:56:14.912] - Field: 'label' [10:56:14.912] - Field: 'local' [10:56:14.912] - Field: 'owner' [10:56:14.912] - Field: 'envir' [10:56:14.912] - Field: 'packages' [10:56:14.913] - Field: 'gc' [10:56:14.913] - Field: 'conditions' [10:56:14.913] - Field: 'expr' [10:56:14.913] - Field: 'uuid' [10:56:14.913] - Field: 'seed' [10:56:14.913] - Field: 'version' [10:56:14.914] - Field: 'result' [10:56:14.914] - Field: 'asynchronous' [10:56:14.914] - Field: 'calls' [10:56:14.914] - Field: 'globals' [10:56:14.914] - Field: 'stdout' [10:56:14.915] - Field: 'earlySignal' [10:56:14.915] - Field: 'lazy' [10:56:14.915] - Field: 'state' [10:56:14.915] - Field: '.cluster' [10:56:14.915] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [10:56:14.915] - Launch lazy future ... [10:56:14.916] Packages needed by the future expression (n = 0): [10:56:14.916] Packages needed by future strategies (n = 0): [10:56:14.916] { [10:56:14.916] { [10:56:14.916] { [10:56:14.916] ...future.startTime <- base::Sys.time() [10:56:14.916] { [10:56:14.916] { [10:56:14.916] { [10:56:14.916] base::local({ [10:56:14.916] has_future <- base::requireNamespace("future", [10:56:14.916] quietly = TRUE) [10:56:14.916] if (has_future) { [10:56:14.916] ns <- base::getNamespace("future") [10:56:14.916] version <- ns[[".package"]][["version"]] [10:56:14.916] if (is.null(version)) [10:56:14.916] version <- utils::packageVersion("future") [10:56:14.916] } [10:56:14.916] else { [10:56:14.916] version <- NULL [10:56:14.916] } [10:56:14.916] if (!has_future || version < "1.8.0") { [10:56:14.916] info <- base::c(r_version = base::gsub("R version ", [10:56:14.916] "", base::R.version$version.string), [10:56:14.916] platform = base::sprintf("%s (%s-bit)", [10:56:14.916] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [10:56:14.916] os = base::paste(base::Sys.info()[base::c("sysname", [10:56:14.916] "release", "version")], collapse = " "), [10:56:14.916] hostname = base::Sys.info()[["nodename"]]) [10:56:14.916] info <- base::sprintf("%s: %s", base::names(info), [10:56:14.916] info) [10:56:14.916] info <- base::paste(info, collapse = "; ") [10:56:14.916] if (!has_future) { [10:56:14.916] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [10:56:14.916] info) [10:56:14.916] } [10:56:14.916] else { [10:56:14.916] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [10:56:14.916] info, version) [10:56:14.916] } [10:56:14.916] base::stop(msg) [10:56:14.916] } [10:56:14.916] }) [10:56:14.916] } [10:56:14.916] ...future.strategy.old <- future::plan("list") [10:56:14.916] options(future.plan = NULL) [10:56:14.916] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.916] future::plan("default", .cleanup = FALSE, .init = FALSE) [10:56:14.916] } [10:56:14.916] ...future.workdir <- getwd() [10:56:14.916] } [10:56:14.916] ...future.oldOptions <- base::as.list(base::.Options) [10:56:14.916] ...future.oldEnvVars <- base::Sys.getenv() [10:56:14.916] } [10:56:14.916] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [10:56:14.916] future.globals.maxSize = NULL, future.globals.method = NULL, [10:56:14.916] future.globals.onMissing = NULL, future.globals.onReference = NULL, [10:56:14.916] future.globals.resolve = NULL, future.resolve.recursive = NULL, [10:56:14.916] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [10:56:14.916] future.stdout.windows.reencode = NULL, width = 80L) [10:56:14.916] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [10:56:14.916] base::names(...future.oldOptions)) [10:56:14.916] } [10:56:14.916] if (FALSE) { [10:56:14.916] } [10:56:14.916] else { [10:56:14.916] if (TRUE) { [10:56:14.916] ...future.stdout <- base::rawConnection(base::raw(0L), [10:56:14.916] open = "w") [10:56:14.916] } [10:56:14.916] else { [10:56:14.916] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [10:56:14.916] windows = "NUL", "/dev/null"), open = "w") [10:56:14.916] } [10:56:14.916] base::sink(...future.stdout, type = "output", split = FALSE) [10:56:14.916] base::on.exit(if (!base::is.null(...future.stdout)) { [10:56:14.916] base::sink(type = "output", split = FALSE) [10:56:14.916] base::close(...future.stdout) [10:56:14.916] }, add = TRUE) [10:56:14.916] } [10:56:14.916] ...future.frame <- base::sys.nframe() [10:56:14.916] ...future.conditions <- base::list() [10:56:14.916] ...future.rng <- base::globalenv()$.Random.seed [10:56:14.916] if (FALSE) { [10:56:14.916] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [10:56:14.916] "...future.value", "...future.globalenv.names", ".Random.seed") [10:56:14.916] } [10:56:14.916] ...future.result <- base::tryCatch({ [10:56:14.916] base::withCallingHandlers({ [10:56:14.916] ...future.value <- base::withVisible(base::local({ [10:56:14.916] outer_function(1L) [10:56:14.916] })) [10:56:14.916] future::FutureResult(value = ...future.value$value, [10:56:14.916] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.916] ...future.rng), globalenv = if (FALSE) [10:56:14.916] list(added = base::setdiff(base::names(base::.GlobalEnv), [10:56:14.916] ...future.globalenv.names)) [10:56:14.916] else NULL, started = ...future.startTime, version = "1.8") [10:56:14.916] }, condition = base::local({ [10:56:14.916] c <- base::c [10:56:14.916] inherits <- base::inherits [10:56:14.916] invokeRestart <- base::invokeRestart [10:56:14.916] length <- base::length [10:56:14.916] list <- base::list [10:56:14.916] seq.int <- base::seq.int [10:56:14.916] signalCondition <- base::signalCondition [10:56:14.916] sys.calls <- base::sys.calls [10:56:14.916] `[[` <- base::`[[` [10:56:14.916] `+` <- base::`+` [10:56:14.916] `<<-` <- base::`<<-` [10:56:14.916] sysCalls <- function(calls = sys.calls(), from = 1L) { [10:56:14.916] calls[seq.int(from = from + 12L, to = length(calls) - [10:56:14.916] 3L)] [10:56:14.916] } [10:56:14.916] function(cond) { [10:56:14.916] is_error <- inherits(cond, "error") [10:56:14.916] ignore <- !is_error && !is.null(NULL) && inherits(cond, [10:56:14.916] NULL) [10:56:14.916] if (is_error) { [10:56:14.916] sessionInformation <- function() { [10:56:14.916] list(r = base::R.Version(), locale = base::Sys.getlocale(), [10:56:14.916] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [10:56:14.916] search = base::search(), system = base::Sys.info()) [10:56:14.916] } [10:56:14.916] ...future.conditions[[length(...future.conditions) + [10:56:14.916] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [10:56:14.916] cond$call), session = sessionInformation(), [10:56:14.916] timestamp = base::Sys.time(), signaled = 0L) [10:56:14.916] signalCondition(cond) [10:56:14.916] } [10:56:14.916] else if (!ignore && TRUE && inherits(cond, "condition")) { [10:56:14.916] signal <- FALSE && inherits(cond, character(0)) [10:56:14.916] ...future.conditions[[length(...future.conditions) + [10:56:14.916] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [10:56:14.916] if (FALSE && !signal) { [10:56:14.916] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.916] { [10:56:14.916] inherits <- base::inherits [10:56:14.916] invokeRestart <- base::invokeRestart [10:56:14.916] is.null <- base::is.null [10:56:14.916] muffled <- FALSE [10:56:14.916] if (inherits(cond, "message")) { [10:56:14.916] muffled <- grepl(pattern, "muffleMessage") [10:56:14.916] if (muffled) [10:56:14.916] invokeRestart("muffleMessage") [10:56:14.916] } [10:56:14.916] else if (inherits(cond, "warning")) { [10:56:14.916] muffled <- grepl(pattern, "muffleWarning") [10:56:14.916] if (muffled) [10:56:14.916] invokeRestart("muffleWarning") [10:56:14.916] } [10:56:14.916] else if (inherits(cond, "condition")) { [10:56:14.916] if (!is.null(pattern)) { [10:56:14.916] computeRestarts <- base::computeRestarts [10:56:14.916] grepl <- base::grepl [10:56:14.916] restarts <- computeRestarts(cond) [10:56:14.916] for (restart in restarts) { [10:56:14.916] name <- restart$name [10:56:14.916] if (is.null(name)) [10:56:14.916] next [10:56:14.916] if (!grepl(pattern, name)) [10:56:14.916] next [10:56:14.916] invokeRestart(restart) [10:56:14.916] muffled <- TRUE [10:56:14.916] break [10:56:14.916] } [10:56:14.916] } [10:56:14.916] } [10:56:14.916] invisible(muffled) [10:56:14.916] } [10:56:14.916] muffleCondition(cond, pattern = "^muffle") [10:56:14.916] } [10:56:14.916] } [10:56:14.916] else { [10:56:14.916] if (TRUE) { [10:56:14.916] muffleCondition <- function (cond, pattern = "^muffle") [10:56:14.916] { [10:56:14.916] inherits <- base::inherits [10:56:14.916] invokeRestart <- base::invokeRestart [10:56:14.916] is.null <- base::is.null [10:56:14.916] muffled <- FALSE [10:56:14.916] if (inherits(cond, "message")) { [10:56:14.916] muffled <- grepl(pattern, "muffleMessage") [10:56:14.916] if (muffled) [10:56:14.916] invokeRestart("muffleMessage") [10:56:14.916] } [10:56:14.916] else if (inherits(cond, "warning")) { [10:56:14.916] muffled <- grepl(pattern, "muffleWarning") [10:56:14.916] if (muffled) [10:56:14.916] invokeRestart("muffleWarning") [10:56:14.916] } [10:56:14.916] else if (inherits(cond, "condition")) { [10:56:14.916] if (!is.null(pattern)) { [10:56:14.916] computeRestarts <- base::computeRestarts [10:56:14.916] grepl <- base::grepl [10:56:14.916] restarts <- computeRestarts(cond) [10:56:14.916] for (restart in restarts) { [10:56:14.916] name <- restart$name [10:56:14.916] if (is.null(name)) [10:56:14.916] next [10:56:14.916] if (!grepl(pattern, name)) [10:56:14.916] next [10:56:14.916] invokeRestart(restart) [10:56:14.916] muffled <- TRUE [10:56:14.916] break [10:56:14.916] } [10:56:14.916] } [10:56:14.916] } [10:56:14.916] invisible(muffled) [10:56:14.916] } [10:56:14.916] muffleCondition(cond, pattern = "^muffle") [10:56:14.916] } [10:56:14.916] } [10:56:14.916] } [10:56:14.916] })) [10:56:14.916] }, error = function(ex) { [10:56:14.916] base::structure(base::list(value = NULL, visible = NULL, [10:56:14.916] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [10:56:14.916] ...future.rng), started = ...future.startTime, [10:56:14.916] finished = Sys.time(), session_uuid = NA_character_, [10:56:14.916] version = "1.8"), class = "FutureResult") [10:56:14.916] }, finally = { [10:56:14.916] if (!identical(...future.workdir, getwd())) [10:56:14.916] setwd(...future.workdir) [10:56:14.916] { [10:56:14.916] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [10:56:14.916] ...future.oldOptions$nwarnings <- NULL [10:56:14.916] } [10:56:14.916] base::options(...future.oldOptions) [10:56:14.916] if (.Platform$OS.type == "windows") { [10:56:14.916] old_names <- names(...future.oldEnvVars) [10:56:14.916] envs <- base::Sys.getenv() [10:56:14.916] names <- names(envs) [10:56:14.916] common <- intersect(names, old_names) [10:56:14.916] added <- setdiff(names, old_names) [10:56:14.916] removed <- setdiff(old_names, names) [10:56:14.916] changed <- common[...future.oldEnvVars[common] != [10:56:14.916] envs[common]] [10:56:14.916] NAMES <- toupper(changed) [10:56:14.916] args <- list() [10:56:14.916] for (kk in seq_along(NAMES)) { [10:56:14.916] name <- changed[[kk]] [10:56:14.916] NAME <- NAMES[[kk]] [10:56:14.916] if (name != NAME && is.element(NAME, old_names)) [10:56:14.916] next [10:56:14.916] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.916] } [10:56:14.916] NAMES <- toupper(added) [10:56:14.916] for (kk in seq_along(NAMES)) { [10:56:14.916] name <- added[[kk]] [10:56:14.916] NAME <- NAMES[[kk]] [10:56:14.916] if (name != NAME && is.element(NAME, old_names)) [10:56:14.916] next [10:56:14.916] args[[name]] <- "" [10:56:14.916] } [10:56:14.916] NAMES <- toupper(removed) [10:56:14.916] for (kk in seq_along(NAMES)) { [10:56:14.916] name <- removed[[kk]] [10:56:14.916] NAME <- NAMES[[kk]] [10:56:14.916] if (name != NAME && is.element(NAME, old_names)) [10:56:14.916] next [10:56:14.916] args[[name]] <- ...future.oldEnvVars[[name]] [10:56:14.916] } [10:56:14.916] if (length(args) > 0) [10:56:14.916] base::do.call(base::Sys.setenv, args = args) [10:56:14.916] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [10:56:14.916] } [10:56:14.916] else { [10:56:14.916] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [10:56:14.916] } [10:56:14.916] { [10:56:14.916] if (base::length(...future.futureOptionsAdded) > [10:56:14.916] 0L) { [10:56:14.916] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [10:56:14.916] base::names(opts) <- ...future.futureOptionsAdded [10:56:14.916] base::options(opts) [10:56:14.916] } [10:56:14.916] { [10:56:14.916] NULL [10:56:14.916] options(future.plan = NULL) [10:56:14.916] if (is.na(NA_character_)) [10:56:14.916] Sys.unsetenv("R_FUTURE_PLAN") [10:56:14.916] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [10:56:14.916] future::plan(...future.strategy.old, .cleanup = FALSE, [10:56:14.916] .init = FALSE) [10:56:14.916] } [10:56:14.916] } [10:56:14.916] } [10:56:14.916] }) [10:56:14.916] if (TRUE) { [10:56:14.916] base::sink(type = "output", split = FALSE) [10:56:14.916] if (TRUE) { [10:56:14.916] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [10:56:14.916] } [10:56:14.916] else { [10:56:14.916] ...future.result["stdout"] <- base::list(NULL) [10:56:14.916] } [10:56:14.916] base::close(...future.stdout) [10:56:14.916] ...future.stdout <- NULL [10:56:14.916] } [10:56:14.916] ...future.result$conditions <- ...future.conditions [10:56:14.916] ...future.result$finished <- base::Sys.time() [10:56:14.916] ...future.result [10:56:14.916] } [10:56:14.920] - Launch lazy future ... done [10:56:14.920] run() for 'MiraiFuture' ... done List of 2 $ : num [1:2] 2 3 $ : num [1:2] 2 3 > > message("*** Globals - map(x, ~ expr) ... DONE") *** Globals - map(x, ~ expr) ... DONE > > > message("*** Globals - formulas ... DONE") *** Globals - formulas ... DONE > > source("incl/end.R") > > proc.time() user system elapsed 0.70 0.10 1.34