R version 4.4.0 beta (2024-04-15 r86425 ucrt) -- "Puppy Cup" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > source("incl/start.R") Loading required package: future [13:31:04.918] plan(): Setting new future strategy stack: [13:31:04.919] List of future strategies: [13:31:04.919] 1. mirai_multisession: [13:31:04.919] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:31:04.919] - tweaked: FALSE [13:31:04.919] - call: future::plan(future.mirai::mirai_multisession) [13:31:04.934] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:31:04.934] < mirai | $data > [13:31:04.939] getGlobalsAndPackages() ... [13:31:04.939] Not searching for globals [13:31:04.940] - globals: [0] [13:31:04.940] getGlobalsAndPackages() ... DONE [13:31:04.941] getGlobalsAndPackages() ... [13:31:04.941] [13:31:04.941] - globals: [0] [13:31:04.941] getGlobalsAndPackages() ... DONE [13:31:05.225] Packages needed by the future expression (n = 0): [13:31:05.225] Packages needed by future strategies (n = 0): [13:31:05.226] { [13:31:05.226] { [13:31:05.226] { [13:31:05.226] ...future.startTime <- base::Sys.time() [13:31:05.226] { [13:31:05.226] { [13:31:05.226] { [13:31:05.226] base::local({ [13:31:05.226] has_future <- base::requireNamespace("future", [13:31:05.226] quietly = TRUE) [13:31:05.226] if (has_future) { [13:31:05.226] ns <- base::getNamespace("future") [13:31:05.226] version <- ns[[".package"]][["version"]] [13:31:05.226] if (is.null(version)) [13:31:05.226] version <- utils::packageVersion("future") [13:31:05.226] } [13:31:05.226] else { [13:31:05.226] version <- NULL [13:31:05.226] } [13:31:05.226] if (!has_future || version < "1.8.0") { [13:31:05.226] info <- base::c(r_version = base::gsub("R version ", [13:31:05.226] "", base::R.version$version.string), [13:31:05.226] platform = base::sprintf("%s (%s-bit)", [13:31:05.226] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:05.226] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:05.226] "release", "version")], collapse = " "), [13:31:05.226] hostname = base::Sys.info()[["nodename"]]) [13:31:05.226] info <- base::sprintf("%s: %s", base::names(info), [13:31:05.226] info) [13:31:05.226] info <- base::paste(info, collapse = "; ") [13:31:05.226] if (!has_future) { [13:31:05.226] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:05.226] info) [13:31:05.226] } [13:31:05.226] else { [13:31:05.226] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:05.226] info, version) [13:31:05.226] } [13:31:05.226] base::stop(msg) [13:31:05.226] } [13:31:05.226] }) [13:31:05.226] } [13:31:05.226] ...future.strategy.old <- future::plan("list") [13:31:05.226] options(future.plan = NULL) [13:31:05.226] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.226] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:05.226] } [13:31:05.226] ...future.workdir <- getwd() [13:31:05.226] } [13:31:05.226] ...future.oldOptions <- base::as.list(base::.Options) [13:31:05.226] ...future.oldEnvVars <- base::Sys.getenv() [13:31:05.226] } [13:31:05.226] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:05.226] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:05.226] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:05.226] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:05.226] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:05.226] future.stdout.windows.reencode = NULL, width = 80L) [13:31:05.226] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:05.226] base::names(...future.oldOptions)) [13:31:05.226] } [13:31:05.226] if (FALSE) { [13:31:05.226] } [13:31:05.226] else { [13:31:05.226] if (TRUE) { [13:31:05.226] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:05.226] open = "w") [13:31:05.226] } [13:31:05.226] else { [13:31:05.226] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:05.226] windows = "NUL", "/dev/null"), open = "w") [13:31:05.226] } [13:31:05.226] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:05.226] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:05.226] base::sink(type = "output", split = FALSE) [13:31:05.226] base::close(...future.stdout) [13:31:05.226] }, add = TRUE) [13:31:05.226] } [13:31:05.226] ...future.frame <- base::sys.nframe() [13:31:05.226] ...future.conditions <- base::list() [13:31:05.226] ...future.rng <- base::globalenv()$.Random.seed [13:31:05.226] if (FALSE) { [13:31:05.226] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:05.226] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:05.226] } [13:31:05.226] ...future.result <- base::tryCatch({ [13:31:05.226] base::withCallingHandlers({ [13:31:05.226] ...future.value <- base::withVisible(base::local(NA)) [13:31:05.226] future::FutureResult(value = ...future.value$value, [13:31:05.226] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.226] ...future.rng), globalenv = if (FALSE) [13:31:05.226] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:05.226] ...future.globalenv.names)) [13:31:05.226] else NULL, started = ...future.startTime, version = "1.8") [13:31:05.226] }, condition = base::local({ [13:31:05.226] c <- base::c [13:31:05.226] inherits <- base::inherits [13:31:05.226] invokeRestart <- base::invokeRestart [13:31:05.226] length <- base::length [13:31:05.226] list <- base::list [13:31:05.226] seq.int <- base::seq.int [13:31:05.226] signalCondition <- base::signalCondition [13:31:05.226] sys.calls <- base::sys.calls [13:31:05.226] `[[` <- base::`[[` [13:31:05.226] `+` <- base::`+` [13:31:05.226] `<<-` <- base::`<<-` [13:31:05.226] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:05.226] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:05.226] 3L)] [13:31:05.226] } [13:31:05.226] function(cond) { [13:31:05.226] is_error <- inherits(cond, "error") [13:31:05.226] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:05.226] NULL) [13:31:05.226] if (is_error) { [13:31:05.226] sessionInformation <- function() { [13:31:05.226] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:05.226] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:05.226] search = base::search(), system = base::Sys.info()) [13:31:05.226] } [13:31:05.226] ...future.conditions[[length(...future.conditions) + [13:31:05.226] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:05.226] cond$call), session = sessionInformation(), [13:31:05.226] timestamp = base::Sys.time(), signaled = 0L) [13:31:05.226] signalCondition(cond) [13:31:05.226] } [13:31:05.226] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:05.226] signal <- FALSE && inherits(cond, character(0)) [13:31:05.226] ...future.conditions[[length(...future.conditions) + [13:31:05.226] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:05.226] if (FALSE && !signal) { [13:31:05.226] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.226] { [13:31:05.226] inherits <- base::inherits [13:31:05.226] invokeRestart <- base::invokeRestart [13:31:05.226] is.null <- base::is.null [13:31:05.226] muffled <- FALSE [13:31:05.226] if (inherits(cond, "message")) { [13:31:05.226] muffled <- grepl(pattern, "muffleMessage") [13:31:05.226] if (muffled) [13:31:05.226] invokeRestart("muffleMessage") [13:31:05.226] } [13:31:05.226] else if (inherits(cond, "warning")) { [13:31:05.226] muffled <- grepl(pattern, "muffleWarning") [13:31:05.226] if (muffled) [13:31:05.226] invokeRestart("muffleWarning") [13:31:05.226] } [13:31:05.226] else if (inherits(cond, "condition")) { [13:31:05.226] if (!is.null(pattern)) { [13:31:05.226] computeRestarts <- base::computeRestarts [13:31:05.226] grepl <- base::grepl [13:31:05.226] restarts <- computeRestarts(cond) [13:31:05.226] for (restart in restarts) { [13:31:05.226] name <- restart$name [13:31:05.226] if (is.null(name)) [13:31:05.226] next [13:31:05.226] if (!grepl(pattern, name)) [13:31:05.226] next [13:31:05.226] invokeRestart(restart) [13:31:05.226] muffled <- TRUE [13:31:05.226] break [13:31:05.226] } [13:31:05.226] } [13:31:05.226] } [13:31:05.226] invisible(muffled) [13:31:05.226] } [13:31:05.226] muffleCondition(cond, pattern = "^muffle") [13:31:05.226] } [13:31:05.226] } [13:31:05.226] else { [13:31:05.226] if (TRUE) { [13:31:05.226] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.226] { [13:31:05.226] inherits <- base::inherits [13:31:05.226] invokeRestart <- base::invokeRestart [13:31:05.226] is.null <- base::is.null [13:31:05.226] muffled <- FALSE [13:31:05.226] if (inherits(cond, "message")) { [13:31:05.226] muffled <- grepl(pattern, "muffleMessage") [13:31:05.226] if (muffled) [13:31:05.226] invokeRestart("muffleMessage") [13:31:05.226] } [13:31:05.226] else if (inherits(cond, "warning")) { [13:31:05.226] muffled <- grepl(pattern, "muffleWarning") [13:31:05.226] if (muffled) [13:31:05.226] invokeRestart("muffleWarning") [13:31:05.226] } [13:31:05.226] else if (inherits(cond, "condition")) { [13:31:05.226] if (!is.null(pattern)) { [13:31:05.226] computeRestarts <- base::computeRestarts [13:31:05.226] grepl <- base::grepl [13:31:05.226] restarts <- computeRestarts(cond) [13:31:05.226] for (restart in restarts) { [13:31:05.226] name <- restart$name [13:31:05.226] if (is.null(name)) [13:31:05.226] next [13:31:05.226] if (!grepl(pattern, name)) [13:31:05.226] next [13:31:05.226] invokeRestart(restart) [13:31:05.226] muffled <- TRUE [13:31:05.226] break [13:31:05.226] } [13:31:05.226] } [13:31:05.226] } [13:31:05.226] invisible(muffled) [13:31:05.226] } [13:31:05.226] muffleCondition(cond, pattern = "^muffle") [13:31:05.226] } [13:31:05.226] } [13:31:05.226] } [13:31:05.226] })) [13:31:05.226] }, error = function(ex) { [13:31:05.226] base::structure(base::list(value = NULL, visible = NULL, [13:31:05.226] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.226] ...future.rng), started = ...future.startTime, [13:31:05.226] finished = Sys.time(), session_uuid = NA_character_, [13:31:05.226] version = "1.8"), class = "FutureResult") [13:31:05.226] }, finally = { [13:31:05.226] if (!identical(...future.workdir, getwd())) [13:31:05.226] setwd(...future.workdir) [13:31:05.226] { [13:31:05.226] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:05.226] ...future.oldOptions$nwarnings <- NULL [13:31:05.226] } [13:31:05.226] base::options(...future.oldOptions) [13:31:05.226] if (.Platform$OS.type == "windows") { [13:31:05.226] old_names <- names(...future.oldEnvVars) [13:31:05.226] envs <- base::Sys.getenv() [13:31:05.226] names <- names(envs) [13:31:05.226] common <- intersect(names, old_names) [13:31:05.226] added <- setdiff(names, old_names) [13:31:05.226] removed <- setdiff(old_names, names) [13:31:05.226] changed <- common[...future.oldEnvVars[common] != [13:31:05.226] envs[common]] [13:31:05.226] NAMES <- toupper(changed) [13:31:05.226] args <- list() [13:31:05.226] for (kk in seq_along(NAMES)) { [13:31:05.226] name <- changed[[kk]] [13:31:05.226] NAME <- NAMES[[kk]] [13:31:05.226] if (name != NAME && is.element(NAME, old_names)) [13:31:05.226] next [13:31:05.226] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.226] } [13:31:05.226] NAMES <- toupper(added) [13:31:05.226] for (kk in seq_along(NAMES)) { [13:31:05.226] name <- added[[kk]] [13:31:05.226] NAME <- NAMES[[kk]] [13:31:05.226] if (name != NAME && is.element(NAME, old_names)) [13:31:05.226] next [13:31:05.226] args[[name]] <- "" [13:31:05.226] } [13:31:05.226] NAMES <- toupper(removed) [13:31:05.226] for (kk in seq_along(NAMES)) { [13:31:05.226] name <- removed[[kk]] [13:31:05.226] NAME <- NAMES[[kk]] [13:31:05.226] if (name != NAME && is.element(NAME, old_names)) [13:31:05.226] next [13:31:05.226] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.226] } [13:31:05.226] if (length(args) > 0) [13:31:05.226] base::do.call(base::Sys.setenv, args = args) [13:31:05.226] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:05.226] } [13:31:05.226] else { [13:31:05.226] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:05.226] } [13:31:05.226] { [13:31:05.226] if (base::length(...future.futureOptionsAdded) > [13:31:05.226] 0L) { [13:31:05.226] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:05.226] base::names(opts) <- ...future.futureOptionsAdded [13:31:05.226] base::options(opts) [13:31:05.226] } [13:31:05.226] { [13:31:05.226] NULL [13:31:05.226] options(future.plan = NULL) [13:31:05.226] if (is.na(NA_character_)) [13:31:05.226] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.226] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:05.226] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:05.226] .init = FALSE) [13:31:05.226] } [13:31:05.226] } [13:31:05.226] } [13:31:05.226] }) [13:31:05.226] if (TRUE) { [13:31:05.226] base::sink(type = "output", split = FALSE) [13:31:05.226] if (TRUE) { [13:31:05.226] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:05.226] } [13:31:05.226] else { [13:31:05.226] ...future.result["stdout"] <- base::list(NULL) [13:31:05.226] } [13:31:05.226] base::close(...future.stdout) [13:31:05.226] ...future.stdout <- NULL [13:31:05.226] } [13:31:05.226] ...future.result$conditions <- ...future.conditions [13:31:05.226] ...future.result$finished <- base::Sys.time() [13:31:05.226] ...future.result [13:31:05.226] } [13:31:05.328] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:31:05.328] plan(): nbrOfWorkers() = 2 > > library("datasets") ## cars data set > library("stats") ## lm(), poly(), xtabs() > > plan(mirai_multisession) [13:31:05.329] plan(): Setting new future strategy stack: [13:31:05.329] List of future strategies: [13:31:05.329] 1. mirai_multisession: [13:31:05.329] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:31:05.329] - tweaked: FALSE [13:31:05.329] - call: plan(mirai_multisession) [13:31:05.343] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:31:05.343] < mirai | $data > [13:31:05.346] getGlobalsAndPackages() ... [13:31:05.346] Not searching for globals [13:31:05.346] - globals: [0] [13:31:05.347] getGlobalsAndPackages() ... DONE [13:31:05.347] getGlobalsAndPackages() ... [13:31:05.347] [13:31:05.347] - globals: [0] [13:31:05.347] getGlobalsAndPackages() ... DONE [13:31:05.348] Packages needed by the future expression (n = 0): [13:31:05.348] Packages needed by future strategies (n = 0): [13:31:05.349] { [13:31:05.349] { [13:31:05.349] { [13:31:05.349] ...future.startTime <- base::Sys.time() [13:31:05.349] { [13:31:05.349] { [13:31:05.349] { [13:31:05.349] base::local({ [13:31:05.349] has_future <- base::requireNamespace("future", [13:31:05.349] quietly = TRUE) [13:31:05.349] if (has_future) { [13:31:05.349] ns <- base::getNamespace("future") [13:31:05.349] version <- ns[[".package"]][["version"]] [13:31:05.349] if (is.null(version)) [13:31:05.349] version <- utils::packageVersion("future") [13:31:05.349] } [13:31:05.349] else { [13:31:05.349] version <- NULL [13:31:05.349] } [13:31:05.349] if (!has_future || version < "1.8.0") { [13:31:05.349] info <- base::c(r_version = base::gsub("R version ", [13:31:05.349] "", base::R.version$version.string), [13:31:05.349] platform = base::sprintf("%s (%s-bit)", [13:31:05.349] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:05.349] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:05.349] "release", "version")], collapse = " "), [13:31:05.349] hostname = base::Sys.info()[["nodename"]]) [13:31:05.349] info <- base::sprintf("%s: %s", base::names(info), [13:31:05.349] info) [13:31:05.349] info <- base::paste(info, collapse = "; ") [13:31:05.349] if (!has_future) { [13:31:05.349] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:05.349] info) [13:31:05.349] } [13:31:05.349] else { [13:31:05.349] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:05.349] info, version) [13:31:05.349] } [13:31:05.349] base::stop(msg) [13:31:05.349] } [13:31:05.349] }) [13:31:05.349] } [13:31:05.349] ...future.strategy.old <- future::plan("list") [13:31:05.349] options(future.plan = NULL) [13:31:05.349] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.349] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:05.349] } [13:31:05.349] ...future.workdir <- getwd() [13:31:05.349] } [13:31:05.349] ...future.oldOptions <- base::as.list(base::.Options) [13:31:05.349] ...future.oldEnvVars <- base::Sys.getenv() [13:31:05.349] } [13:31:05.349] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:05.349] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:05.349] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:05.349] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:05.349] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:05.349] future.stdout.windows.reencode = NULL, width = 80L) [13:31:05.349] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:05.349] base::names(...future.oldOptions)) [13:31:05.349] } [13:31:05.349] if (FALSE) { [13:31:05.349] } [13:31:05.349] else { [13:31:05.349] if (TRUE) { [13:31:05.349] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:05.349] open = "w") [13:31:05.349] } [13:31:05.349] else { [13:31:05.349] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:05.349] windows = "NUL", "/dev/null"), open = "w") [13:31:05.349] } [13:31:05.349] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:05.349] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:05.349] base::sink(type = "output", split = FALSE) [13:31:05.349] base::close(...future.stdout) [13:31:05.349] }, add = TRUE) [13:31:05.349] } [13:31:05.349] ...future.frame <- base::sys.nframe() [13:31:05.349] ...future.conditions <- base::list() [13:31:05.349] ...future.rng <- base::globalenv()$.Random.seed [13:31:05.349] if (FALSE) { [13:31:05.349] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:05.349] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:05.349] } [13:31:05.349] ...future.result <- base::tryCatch({ [13:31:05.349] base::withCallingHandlers({ [13:31:05.349] ...future.value <- base::withVisible(base::local(NA)) [13:31:05.349] future::FutureResult(value = ...future.value$value, [13:31:05.349] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.349] ...future.rng), globalenv = if (FALSE) [13:31:05.349] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:05.349] ...future.globalenv.names)) [13:31:05.349] else NULL, started = ...future.startTime, version = "1.8") [13:31:05.349] }, condition = base::local({ [13:31:05.349] c <- base::c [13:31:05.349] inherits <- base::inherits [13:31:05.349] invokeRestart <- base::invokeRestart [13:31:05.349] length <- base::length [13:31:05.349] list <- base::list [13:31:05.349] seq.int <- base::seq.int [13:31:05.349] signalCondition <- base::signalCondition [13:31:05.349] sys.calls <- base::sys.calls [13:31:05.349] `[[` <- base::`[[` [13:31:05.349] `+` <- base::`+` [13:31:05.349] `<<-` <- base::`<<-` [13:31:05.349] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:05.349] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:05.349] 3L)] [13:31:05.349] } [13:31:05.349] function(cond) { [13:31:05.349] is_error <- inherits(cond, "error") [13:31:05.349] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:05.349] NULL) [13:31:05.349] if (is_error) { [13:31:05.349] sessionInformation <- function() { [13:31:05.349] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:05.349] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:05.349] search = base::search(), system = base::Sys.info()) [13:31:05.349] } [13:31:05.349] ...future.conditions[[length(...future.conditions) + [13:31:05.349] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:05.349] cond$call), session = sessionInformation(), [13:31:05.349] timestamp = base::Sys.time(), signaled = 0L) [13:31:05.349] signalCondition(cond) [13:31:05.349] } [13:31:05.349] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:05.349] signal <- FALSE && inherits(cond, character(0)) [13:31:05.349] ...future.conditions[[length(...future.conditions) + [13:31:05.349] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:05.349] if (FALSE && !signal) { [13:31:05.349] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.349] { [13:31:05.349] inherits <- base::inherits [13:31:05.349] invokeRestart <- base::invokeRestart [13:31:05.349] is.null <- base::is.null [13:31:05.349] muffled <- FALSE [13:31:05.349] if (inherits(cond, "message")) { [13:31:05.349] muffled <- grepl(pattern, "muffleMessage") [13:31:05.349] if (muffled) [13:31:05.349] invokeRestart("muffleMessage") [13:31:05.349] } [13:31:05.349] else if (inherits(cond, "warning")) { [13:31:05.349] muffled <- grepl(pattern, "muffleWarning") [13:31:05.349] if (muffled) [13:31:05.349] invokeRestart("muffleWarning") [13:31:05.349] } [13:31:05.349] else if (inherits(cond, "condition")) { [13:31:05.349] if (!is.null(pattern)) { [13:31:05.349] computeRestarts <- base::computeRestarts [13:31:05.349] grepl <- base::grepl [13:31:05.349] restarts <- computeRestarts(cond) [13:31:05.349] for (restart in restarts) { [13:31:05.349] name <- restart$name [13:31:05.349] if (is.null(name)) [13:31:05.349] next [13:31:05.349] if (!grepl(pattern, name)) [13:31:05.349] next [13:31:05.349] invokeRestart(restart) [13:31:05.349] muffled <- TRUE [13:31:05.349] break [13:31:05.349] } [13:31:05.349] } [13:31:05.349] } [13:31:05.349] invisible(muffled) [13:31:05.349] } [13:31:05.349] muffleCondition(cond, pattern = "^muffle") [13:31:05.349] } [13:31:05.349] } [13:31:05.349] else { [13:31:05.349] if (TRUE) { [13:31:05.349] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.349] { [13:31:05.349] inherits <- base::inherits [13:31:05.349] invokeRestart <- base::invokeRestart [13:31:05.349] is.null <- base::is.null [13:31:05.349] muffled <- FALSE [13:31:05.349] if (inherits(cond, "message")) { [13:31:05.349] muffled <- grepl(pattern, "muffleMessage") [13:31:05.349] if (muffled) [13:31:05.349] invokeRestart("muffleMessage") [13:31:05.349] } [13:31:05.349] else if (inherits(cond, "warning")) { [13:31:05.349] muffled <- grepl(pattern, "muffleWarning") [13:31:05.349] if (muffled) [13:31:05.349] invokeRestart("muffleWarning") [13:31:05.349] } [13:31:05.349] else if (inherits(cond, "condition")) { [13:31:05.349] if (!is.null(pattern)) { [13:31:05.349] computeRestarts <- base::computeRestarts [13:31:05.349] grepl <- base::grepl [13:31:05.349] restarts <- computeRestarts(cond) [13:31:05.349] for (restart in restarts) { [13:31:05.349] name <- restart$name [13:31:05.349] if (is.null(name)) [13:31:05.349] next [13:31:05.349] if (!grepl(pattern, name)) [13:31:05.349] next [13:31:05.349] invokeRestart(restart) [13:31:05.349] muffled <- TRUE [13:31:05.349] break [13:31:05.349] } [13:31:05.349] } [13:31:05.349] } [13:31:05.349] invisible(muffled) [13:31:05.349] } [13:31:05.349] muffleCondition(cond, pattern = "^muffle") [13:31:05.349] } [13:31:05.349] } [13:31:05.349] } [13:31:05.349] })) [13:31:05.349] }, error = function(ex) { [13:31:05.349] base::structure(base::list(value = NULL, visible = NULL, [13:31:05.349] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.349] ...future.rng), started = ...future.startTime, [13:31:05.349] finished = Sys.time(), session_uuid = NA_character_, [13:31:05.349] version = "1.8"), class = "FutureResult") [13:31:05.349] }, finally = { [13:31:05.349] if (!identical(...future.workdir, getwd())) [13:31:05.349] setwd(...future.workdir) [13:31:05.349] { [13:31:05.349] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:05.349] ...future.oldOptions$nwarnings <- NULL [13:31:05.349] } [13:31:05.349] base::options(...future.oldOptions) [13:31:05.349] if (.Platform$OS.type == "windows") { [13:31:05.349] old_names <- names(...future.oldEnvVars) [13:31:05.349] envs <- base::Sys.getenv() [13:31:05.349] names <- names(envs) [13:31:05.349] common <- intersect(names, old_names) [13:31:05.349] added <- setdiff(names, old_names) [13:31:05.349] removed <- setdiff(old_names, names) [13:31:05.349] changed <- common[...future.oldEnvVars[common] != [13:31:05.349] envs[common]] [13:31:05.349] NAMES <- toupper(changed) [13:31:05.349] args <- list() [13:31:05.349] for (kk in seq_along(NAMES)) { [13:31:05.349] name <- changed[[kk]] [13:31:05.349] NAME <- NAMES[[kk]] [13:31:05.349] if (name != NAME && is.element(NAME, old_names)) [13:31:05.349] next [13:31:05.349] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.349] } [13:31:05.349] NAMES <- toupper(added) [13:31:05.349] for (kk in seq_along(NAMES)) { [13:31:05.349] name <- added[[kk]] [13:31:05.349] NAME <- NAMES[[kk]] [13:31:05.349] if (name != NAME && is.element(NAME, old_names)) [13:31:05.349] next [13:31:05.349] args[[name]] <- "" [13:31:05.349] } [13:31:05.349] NAMES <- toupper(removed) [13:31:05.349] for (kk in seq_along(NAMES)) { [13:31:05.349] name <- removed[[kk]] [13:31:05.349] NAME <- NAMES[[kk]] [13:31:05.349] if (name != NAME && is.element(NAME, old_names)) [13:31:05.349] next [13:31:05.349] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.349] } [13:31:05.349] if (length(args) > 0) [13:31:05.349] base::do.call(base::Sys.setenv, args = args) [13:31:05.349] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:05.349] } [13:31:05.349] else { [13:31:05.349] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:05.349] } [13:31:05.349] { [13:31:05.349] if (base::length(...future.futureOptionsAdded) > [13:31:05.349] 0L) { [13:31:05.349] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:05.349] base::names(opts) <- ...future.futureOptionsAdded [13:31:05.349] base::options(opts) [13:31:05.349] } [13:31:05.349] { [13:31:05.349] NULL [13:31:05.349] options(future.plan = NULL) [13:31:05.349] if (is.na(NA_character_)) [13:31:05.349] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.349] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:05.349] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:05.349] .init = FALSE) [13:31:05.349] } [13:31:05.349] } [13:31:05.349] } [13:31:05.349] }) [13:31:05.349] if (TRUE) { [13:31:05.349] base::sink(type = "output", split = FALSE) [13:31:05.349] if (TRUE) { [13:31:05.349] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:05.349] } [13:31:05.349] else { [13:31:05.349] ...future.result["stdout"] <- base::list(NULL) [13:31:05.349] } [13:31:05.349] base::close(...future.stdout) [13:31:05.349] ...future.stdout <- NULL [13:31:05.349] } [13:31:05.349] ...future.result$conditions <- ...future.conditions [13:31:05.349] ...future.result$finished <- base::Sys.time() [13:31:05.349] ...future.result [13:31:05.349] } [13:31:05.455] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:31:05.455] 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) }) [13:31:05.461] getGlobalsAndPackages() ... [13:31:05.461] Searching for globals... [13:31:05.474] - globals found: [6] '{', 'lm', 'weight', '-', 'group', '~' [13:31:05.474] Searching for globals ... DONE [13:31:05.475] Resolving globals: FALSE [13:31:05.476] The total size of the 2 globals is 896 bytes (896 bytes) [13:31:05.477] 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') [13:31:05.477] - globals: [2] 'weight', 'group' [13:31:05.477] - packages: [1] 'stats' [13:31:05.477] getGlobalsAndPackages() ... DONE [13:31:05.478] run() for 'Future' ... [13:31:05.478] - state: 'created' [13:31:05.478] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:05.481] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:05.481] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:05.481] - Field: 'label' [13:31:05.482] - Field: 'local' [13:31:05.482] - Field: 'owner' [13:31:05.482] - Field: 'envir' [13:31:05.482] - Field: 'packages' [13:31:05.482] - Field: 'gc' [13:31:05.482] - Field: 'conditions' [13:31:05.483] - Field: 'expr' [13:31:05.483] - Field: 'uuid' [13:31:05.483] - Field: 'seed' [13:31:05.483] - Field: 'version' [13:31:05.483] - Field: 'result' [13:31:05.484] - Field: 'asynchronous' [13:31:05.484] - Field: 'calls' [13:31:05.484] - Field: 'globals' [13:31:05.484] - Field: 'stdout' [13:31:05.484] - Field: 'earlySignal' [13:31:05.484] - Field: 'lazy' [13:31:05.485] - Field: 'state' [13:31:05.485] - Field: '.cluster' [13:31:05.485] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:05.485] - Launch lazy future ... [13:31:05.485] Packages needed by the future expression (n = 1): 'stats' [13:31:05.486] Packages needed by future strategies (n = 0): [13:31:05.486] { [13:31:05.486] { [13:31:05.486] { [13:31:05.486] ...future.startTime <- base::Sys.time() [13:31:05.486] { [13:31:05.486] { [13:31:05.486] { [13:31:05.486] { [13:31:05.486] base::local({ [13:31:05.486] has_future <- base::requireNamespace("future", [13:31:05.486] quietly = TRUE) [13:31:05.486] if (has_future) { [13:31:05.486] ns <- base::getNamespace("future") [13:31:05.486] version <- ns[[".package"]][["version"]] [13:31:05.486] if (is.null(version)) [13:31:05.486] version <- utils::packageVersion("future") [13:31:05.486] } [13:31:05.486] else { [13:31:05.486] version <- NULL [13:31:05.486] } [13:31:05.486] if (!has_future || version < "1.8.0") { [13:31:05.486] info <- base::c(r_version = base::gsub("R version ", [13:31:05.486] "", base::R.version$version.string), [13:31:05.486] platform = base::sprintf("%s (%s-bit)", [13:31:05.486] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:05.486] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:05.486] "release", "version")], collapse = " "), [13:31:05.486] hostname = base::Sys.info()[["nodename"]]) [13:31:05.486] info <- base::sprintf("%s: %s", base::names(info), [13:31:05.486] info) [13:31:05.486] info <- base::paste(info, collapse = "; ") [13:31:05.486] if (!has_future) { [13:31:05.486] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:05.486] info) [13:31:05.486] } [13:31:05.486] else { [13:31:05.486] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:05.486] info, version) [13:31:05.486] } [13:31:05.486] base::stop(msg) [13:31:05.486] } [13:31:05.486] }) [13:31:05.486] } [13:31:05.486] base::local({ [13:31:05.486] for (pkg in "stats") { [13:31:05.486] base::loadNamespace(pkg) [13:31:05.486] base::library(pkg, character.only = TRUE) [13:31:05.486] } [13:31:05.486] }) [13:31:05.486] } [13:31:05.486] ...future.strategy.old <- future::plan("list") [13:31:05.486] options(future.plan = NULL) [13:31:05.486] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.486] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:05.486] } [13:31:05.486] ...future.workdir <- getwd() [13:31:05.486] } [13:31:05.486] ...future.oldOptions <- base::as.list(base::.Options) [13:31:05.486] ...future.oldEnvVars <- base::Sys.getenv() [13:31:05.486] } [13:31:05.486] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:05.486] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:05.486] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:05.486] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:05.486] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:05.486] future.stdout.windows.reencode = NULL, width = 80L) [13:31:05.486] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:05.486] base::names(...future.oldOptions)) [13:31:05.486] } [13:31:05.486] if (FALSE) { [13:31:05.486] } [13:31:05.486] else { [13:31:05.486] if (TRUE) { [13:31:05.486] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:05.486] open = "w") [13:31:05.486] } [13:31:05.486] else { [13:31:05.486] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:05.486] windows = "NUL", "/dev/null"), open = "w") [13:31:05.486] } [13:31:05.486] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:05.486] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:05.486] base::sink(type = "output", split = FALSE) [13:31:05.486] base::close(...future.stdout) [13:31:05.486] }, add = TRUE) [13:31:05.486] } [13:31:05.486] ...future.frame <- base::sys.nframe() [13:31:05.486] ...future.conditions <- base::list() [13:31:05.486] ...future.rng <- base::globalenv()$.Random.seed [13:31:05.486] if (FALSE) { [13:31:05.486] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:05.486] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:05.486] } [13:31:05.486] ...future.result <- base::tryCatch({ [13:31:05.486] base::withCallingHandlers({ [13:31:05.486] ...future.value <- base::withVisible(base::local({ [13:31:05.486] lm(weight ~ group - 1) [13:31:05.486] })) [13:31:05.486] future::FutureResult(value = ...future.value$value, [13:31:05.486] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.486] ...future.rng), globalenv = if (FALSE) [13:31:05.486] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:05.486] ...future.globalenv.names)) [13:31:05.486] else NULL, started = ...future.startTime, version = "1.8") [13:31:05.486] }, condition = base::local({ [13:31:05.486] c <- base::c [13:31:05.486] inherits <- base::inherits [13:31:05.486] invokeRestart <- base::invokeRestart [13:31:05.486] length <- base::length [13:31:05.486] list <- base::list [13:31:05.486] seq.int <- base::seq.int [13:31:05.486] signalCondition <- base::signalCondition [13:31:05.486] sys.calls <- base::sys.calls [13:31:05.486] `[[` <- base::`[[` [13:31:05.486] `+` <- base::`+` [13:31:05.486] `<<-` <- base::`<<-` [13:31:05.486] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:05.486] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:05.486] 3L)] [13:31:05.486] } [13:31:05.486] function(cond) { [13:31:05.486] is_error <- inherits(cond, "error") [13:31:05.486] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:05.486] NULL) [13:31:05.486] if (is_error) { [13:31:05.486] sessionInformation <- function() { [13:31:05.486] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:05.486] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:05.486] search = base::search(), system = base::Sys.info()) [13:31:05.486] } [13:31:05.486] ...future.conditions[[length(...future.conditions) + [13:31:05.486] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:05.486] cond$call), session = sessionInformation(), [13:31:05.486] timestamp = base::Sys.time(), signaled = 0L) [13:31:05.486] signalCondition(cond) [13:31:05.486] } [13:31:05.486] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:05.486] signal <- FALSE && inherits(cond, character(0)) [13:31:05.486] ...future.conditions[[length(...future.conditions) + [13:31:05.486] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:05.486] if (FALSE && !signal) { [13:31:05.486] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.486] { [13:31:05.486] inherits <- base::inherits [13:31:05.486] invokeRestart <- base::invokeRestart [13:31:05.486] is.null <- base::is.null [13:31:05.486] muffled <- FALSE [13:31:05.486] if (inherits(cond, "message")) { [13:31:05.486] muffled <- grepl(pattern, "muffleMessage") [13:31:05.486] if (muffled) [13:31:05.486] invokeRestart("muffleMessage") [13:31:05.486] } [13:31:05.486] else if (inherits(cond, "warning")) { [13:31:05.486] muffled <- grepl(pattern, "muffleWarning") [13:31:05.486] if (muffled) [13:31:05.486] invokeRestart("muffleWarning") [13:31:05.486] } [13:31:05.486] else if (inherits(cond, "condition")) { [13:31:05.486] if (!is.null(pattern)) { [13:31:05.486] computeRestarts <- base::computeRestarts [13:31:05.486] grepl <- base::grepl [13:31:05.486] restarts <- computeRestarts(cond) [13:31:05.486] for (restart in restarts) { [13:31:05.486] name <- restart$name [13:31:05.486] if (is.null(name)) [13:31:05.486] next [13:31:05.486] if (!grepl(pattern, name)) [13:31:05.486] next [13:31:05.486] invokeRestart(restart) [13:31:05.486] muffled <- TRUE [13:31:05.486] break [13:31:05.486] } [13:31:05.486] } [13:31:05.486] } [13:31:05.486] invisible(muffled) [13:31:05.486] } [13:31:05.486] muffleCondition(cond, pattern = "^muffle") [13:31:05.486] } [13:31:05.486] } [13:31:05.486] else { [13:31:05.486] if (TRUE) { [13:31:05.486] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.486] { [13:31:05.486] inherits <- base::inherits [13:31:05.486] invokeRestart <- base::invokeRestart [13:31:05.486] is.null <- base::is.null [13:31:05.486] muffled <- FALSE [13:31:05.486] if (inherits(cond, "message")) { [13:31:05.486] muffled <- grepl(pattern, "muffleMessage") [13:31:05.486] if (muffled) [13:31:05.486] invokeRestart("muffleMessage") [13:31:05.486] } [13:31:05.486] else if (inherits(cond, "warning")) { [13:31:05.486] muffled <- grepl(pattern, "muffleWarning") [13:31:05.486] if (muffled) [13:31:05.486] invokeRestart("muffleWarning") [13:31:05.486] } [13:31:05.486] else if (inherits(cond, "condition")) { [13:31:05.486] if (!is.null(pattern)) { [13:31:05.486] computeRestarts <- base::computeRestarts [13:31:05.486] grepl <- base::grepl [13:31:05.486] restarts <- computeRestarts(cond) [13:31:05.486] for (restart in restarts) { [13:31:05.486] name <- restart$name [13:31:05.486] if (is.null(name)) [13:31:05.486] next [13:31:05.486] if (!grepl(pattern, name)) [13:31:05.486] next [13:31:05.486] invokeRestart(restart) [13:31:05.486] muffled <- TRUE [13:31:05.486] break [13:31:05.486] } [13:31:05.486] } [13:31:05.486] } [13:31:05.486] invisible(muffled) [13:31:05.486] } [13:31:05.486] muffleCondition(cond, pattern = "^muffle") [13:31:05.486] } [13:31:05.486] } [13:31:05.486] } [13:31:05.486] })) [13:31:05.486] }, error = function(ex) { [13:31:05.486] base::structure(base::list(value = NULL, visible = NULL, [13:31:05.486] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.486] ...future.rng), started = ...future.startTime, [13:31:05.486] finished = Sys.time(), session_uuid = NA_character_, [13:31:05.486] version = "1.8"), class = "FutureResult") [13:31:05.486] }, finally = { [13:31:05.486] if (!identical(...future.workdir, getwd())) [13:31:05.486] setwd(...future.workdir) [13:31:05.486] { [13:31:05.486] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:05.486] ...future.oldOptions$nwarnings <- NULL [13:31:05.486] } [13:31:05.486] base::options(...future.oldOptions) [13:31:05.486] if (.Platform$OS.type == "windows") { [13:31:05.486] old_names <- names(...future.oldEnvVars) [13:31:05.486] envs <- base::Sys.getenv() [13:31:05.486] names <- names(envs) [13:31:05.486] common <- intersect(names, old_names) [13:31:05.486] added <- setdiff(names, old_names) [13:31:05.486] removed <- setdiff(old_names, names) [13:31:05.486] changed <- common[...future.oldEnvVars[common] != [13:31:05.486] envs[common]] [13:31:05.486] NAMES <- toupper(changed) [13:31:05.486] args <- list() [13:31:05.486] for (kk in seq_along(NAMES)) { [13:31:05.486] name <- changed[[kk]] [13:31:05.486] NAME <- NAMES[[kk]] [13:31:05.486] if (name != NAME && is.element(NAME, old_names)) [13:31:05.486] next [13:31:05.486] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.486] } [13:31:05.486] NAMES <- toupper(added) [13:31:05.486] for (kk in seq_along(NAMES)) { [13:31:05.486] name <- added[[kk]] [13:31:05.486] NAME <- NAMES[[kk]] [13:31:05.486] if (name != NAME && is.element(NAME, old_names)) [13:31:05.486] next [13:31:05.486] args[[name]] <- "" [13:31:05.486] } [13:31:05.486] NAMES <- toupper(removed) [13:31:05.486] for (kk in seq_along(NAMES)) { [13:31:05.486] name <- removed[[kk]] [13:31:05.486] NAME <- NAMES[[kk]] [13:31:05.486] if (name != NAME && is.element(NAME, old_names)) [13:31:05.486] next [13:31:05.486] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.486] } [13:31:05.486] if (length(args) > 0) [13:31:05.486] base::do.call(base::Sys.setenv, args = args) [13:31:05.486] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:05.486] } [13:31:05.486] else { [13:31:05.486] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:05.486] } [13:31:05.486] { [13:31:05.486] if (base::length(...future.futureOptionsAdded) > [13:31:05.486] 0L) { [13:31:05.486] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:05.486] base::names(opts) <- ...future.futureOptionsAdded [13:31:05.486] base::options(opts) [13:31:05.486] } [13:31:05.486] { [13:31:05.486] NULL [13:31:05.486] options(future.plan = NULL) [13:31:05.486] if (is.na(NA_character_)) [13:31:05.486] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.486] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:05.486] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:05.486] .init = FALSE) [13:31:05.486] } [13:31:05.486] } [13:31:05.486] } [13:31:05.486] }) [13:31:05.486] if (TRUE) { [13:31:05.486] base::sink(type = "output", split = FALSE) [13:31:05.486] if (TRUE) { [13:31:05.486] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:05.486] } [13:31:05.486] else { [13:31:05.486] ...future.result["stdout"] <- base::list(NULL) [13:31:05.486] } [13:31:05.486] base::close(...future.stdout) [13:31:05.486] ...future.stdout <- NULL [13:31:05.486] } [13:31:05.486] ...future.result$conditions <- ...future.conditions [13:31:05.486] ...future.result$finished <- base::Sys.time() [13:31:05.486] ...future.result [13:31:05.486] } [13:31:05.490] - Launch lazy future ... done [13:31:05.490] 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) } [13:31:05.501] getGlobalsAndPackages() ... [13:31:05.501] Searching for globals... [13:31:05.503] - globals found: [6] '{', 'lm', 'weight', '-', 'group', '~' [13:31:05.503] Searching for globals ... DONE [13:31:05.504] Resolving globals: FALSE [13:31:05.504] The total size of the 2 globals is 896 bytes (896 bytes) [13:31:05.505] 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') [13:31:05.505] - globals: [2] 'weight', 'group' [13:31:05.505] - packages: [1] 'stats' [13:31:05.506] getGlobalsAndPackages() ... DONE [13:31:05.506] run() for 'Future' ... [13:31:05.506] - state: 'created' [13:31:05.506] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:05.509] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:05.509] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:05.509] - Field: 'label' [13:31:05.510] - Field: 'local' [13:31:05.510] - Field: 'owner' [13:31:05.510] - Field: 'envir' [13:31:05.513] - Field: 'packages' [13:31:05.513] - Field: 'gc' [13:31:05.513] - Field: 'conditions' [13:31:05.513] - Field: 'expr' [13:31:05.513] - Field: 'uuid' [13:31:05.513] - Field: 'seed' [13:31:05.514] - Field: 'version' [13:31:05.514] - Field: 'result' [13:31:05.514] - Field: 'asynchronous' [13:31:05.514] - Field: 'calls' [13:31:05.514] - Field: 'globals' [13:31:05.515] - Field: 'stdout' [13:31:05.515] - Field: 'earlySignal' [13:31:05.515] - Field: 'lazy' [13:31:05.515] - Field: 'state' [13:31:05.515] - Field: '.cluster' [13:31:05.515] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:05.516] - Launch lazy future ... [13:31:05.516] Packages needed by the future expression (n = 1): 'stats' [13:31:05.516] Packages needed by future strategies (n = 0): [13:31:05.517] { [13:31:05.517] { [13:31:05.517] { [13:31:05.517] ...future.startTime <- base::Sys.time() [13:31:05.517] { [13:31:05.517] { [13:31:05.517] { [13:31:05.517] { [13:31:05.517] base::local({ [13:31:05.517] has_future <- base::requireNamespace("future", [13:31:05.517] quietly = TRUE) [13:31:05.517] if (has_future) { [13:31:05.517] ns <- base::getNamespace("future") [13:31:05.517] version <- ns[[".package"]][["version"]] [13:31:05.517] if (is.null(version)) [13:31:05.517] version <- utils::packageVersion("future") [13:31:05.517] } [13:31:05.517] else { [13:31:05.517] version <- NULL [13:31:05.517] } [13:31:05.517] if (!has_future || version < "1.8.0") { [13:31:05.517] info <- base::c(r_version = base::gsub("R version ", [13:31:05.517] "", base::R.version$version.string), [13:31:05.517] platform = base::sprintf("%s (%s-bit)", [13:31:05.517] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:05.517] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:05.517] "release", "version")], collapse = " "), [13:31:05.517] hostname = base::Sys.info()[["nodename"]]) [13:31:05.517] info <- base::sprintf("%s: %s", base::names(info), [13:31:05.517] info) [13:31:05.517] info <- base::paste(info, collapse = "; ") [13:31:05.517] if (!has_future) { [13:31:05.517] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:05.517] info) [13:31:05.517] } [13:31:05.517] else { [13:31:05.517] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:05.517] info, version) [13:31:05.517] } [13:31:05.517] base::stop(msg) [13:31:05.517] } [13:31:05.517] }) [13:31:05.517] } [13:31:05.517] base::local({ [13:31:05.517] for (pkg in "stats") { [13:31:05.517] base::loadNamespace(pkg) [13:31:05.517] base::library(pkg, character.only = TRUE) [13:31:05.517] } [13:31:05.517] }) [13:31:05.517] } [13:31:05.517] ...future.strategy.old <- future::plan("list") [13:31:05.517] options(future.plan = NULL) [13:31:05.517] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.517] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:05.517] } [13:31:05.517] ...future.workdir <- getwd() [13:31:05.517] } [13:31:05.517] ...future.oldOptions <- base::as.list(base::.Options) [13:31:05.517] ...future.oldEnvVars <- base::Sys.getenv() [13:31:05.517] } [13:31:05.517] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:05.517] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:05.517] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:05.517] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:05.517] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:05.517] future.stdout.windows.reencode = NULL, width = 80L) [13:31:05.517] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:05.517] base::names(...future.oldOptions)) [13:31:05.517] } [13:31:05.517] if (FALSE) { [13:31:05.517] } [13:31:05.517] else { [13:31:05.517] if (TRUE) { [13:31:05.517] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:05.517] open = "w") [13:31:05.517] } [13:31:05.517] else { [13:31:05.517] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:05.517] windows = "NUL", "/dev/null"), open = "w") [13:31:05.517] } [13:31:05.517] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:05.517] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:05.517] base::sink(type = "output", split = FALSE) [13:31:05.517] base::close(...future.stdout) [13:31:05.517] }, add = TRUE) [13:31:05.517] } [13:31:05.517] ...future.frame <- base::sys.nframe() [13:31:05.517] ...future.conditions <- base::list() [13:31:05.517] ...future.rng <- base::globalenv()$.Random.seed [13:31:05.517] if (FALSE) { [13:31:05.517] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:05.517] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:05.517] } [13:31:05.517] ...future.result <- base::tryCatch({ [13:31:05.517] base::withCallingHandlers({ [13:31:05.517] ...future.value <- base::withVisible(base::local({ [13:31:05.517] lm(weight ~ group - 1) [13:31:05.517] })) [13:31:05.517] future::FutureResult(value = ...future.value$value, [13:31:05.517] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.517] ...future.rng), globalenv = if (FALSE) [13:31:05.517] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:05.517] ...future.globalenv.names)) [13:31:05.517] else NULL, started = ...future.startTime, version = "1.8") [13:31:05.517] }, condition = base::local({ [13:31:05.517] c <- base::c [13:31:05.517] inherits <- base::inherits [13:31:05.517] invokeRestart <- base::invokeRestart [13:31:05.517] length <- base::length [13:31:05.517] list <- base::list [13:31:05.517] seq.int <- base::seq.int [13:31:05.517] signalCondition <- base::signalCondition [13:31:05.517] sys.calls <- base::sys.calls [13:31:05.517] `[[` <- base::`[[` [13:31:05.517] `+` <- base::`+` [13:31:05.517] `<<-` <- base::`<<-` [13:31:05.517] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:05.517] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:05.517] 3L)] [13:31:05.517] } [13:31:05.517] function(cond) { [13:31:05.517] is_error <- inherits(cond, "error") [13:31:05.517] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:05.517] NULL) [13:31:05.517] if (is_error) { [13:31:05.517] sessionInformation <- function() { [13:31:05.517] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:05.517] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:05.517] search = base::search(), system = base::Sys.info()) [13:31:05.517] } [13:31:05.517] ...future.conditions[[length(...future.conditions) + [13:31:05.517] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:05.517] cond$call), session = sessionInformation(), [13:31:05.517] timestamp = base::Sys.time(), signaled = 0L) [13:31:05.517] signalCondition(cond) [13:31:05.517] } [13:31:05.517] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:05.517] signal <- FALSE && inherits(cond, character(0)) [13:31:05.517] ...future.conditions[[length(...future.conditions) + [13:31:05.517] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:05.517] if (FALSE && !signal) { [13:31:05.517] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.517] { [13:31:05.517] inherits <- base::inherits [13:31:05.517] invokeRestart <- base::invokeRestart [13:31:05.517] is.null <- base::is.null [13:31:05.517] muffled <- FALSE [13:31:05.517] if (inherits(cond, "message")) { [13:31:05.517] muffled <- grepl(pattern, "muffleMessage") [13:31:05.517] if (muffled) [13:31:05.517] invokeRestart("muffleMessage") [13:31:05.517] } [13:31:05.517] else if (inherits(cond, "warning")) { [13:31:05.517] muffled <- grepl(pattern, "muffleWarning") [13:31:05.517] if (muffled) [13:31:05.517] invokeRestart("muffleWarning") [13:31:05.517] } [13:31:05.517] else if (inherits(cond, "condition")) { [13:31:05.517] if (!is.null(pattern)) { [13:31:05.517] computeRestarts <- base::computeRestarts [13:31:05.517] grepl <- base::grepl [13:31:05.517] restarts <- computeRestarts(cond) [13:31:05.517] for (restart in restarts) { [13:31:05.517] name <- restart$name [13:31:05.517] if (is.null(name)) [13:31:05.517] next [13:31:05.517] if (!grepl(pattern, name)) [13:31:05.517] next [13:31:05.517] invokeRestart(restart) [13:31:05.517] muffled <- TRUE [13:31:05.517] break [13:31:05.517] } [13:31:05.517] } [13:31:05.517] } [13:31:05.517] invisible(muffled) [13:31:05.517] } [13:31:05.517] muffleCondition(cond, pattern = "^muffle") [13:31:05.517] } [13:31:05.517] } [13:31:05.517] else { [13:31:05.517] if (TRUE) { [13:31:05.517] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.517] { [13:31:05.517] inherits <- base::inherits [13:31:05.517] invokeRestart <- base::invokeRestart [13:31:05.517] is.null <- base::is.null [13:31:05.517] muffled <- FALSE [13:31:05.517] if (inherits(cond, "message")) { [13:31:05.517] muffled <- grepl(pattern, "muffleMessage") [13:31:05.517] if (muffled) [13:31:05.517] invokeRestart("muffleMessage") [13:31:05.517] } [13:31:05.517] else if (inherits(cond, "warning")) { [13:31:05.517] muffled <- grepl(pattern, "muffleWarning") [13:31:05.517] if (muffled) [13:31:05.517] invokeRestart("muffleWarning") [13:31:05.517] } [13:31:05.517] else if (inherits(cond, "condition")) { [13:31:05.517] if (!is.null(pattern)) { [13:31:05.517] computeRestarts <- base::computeRestarts [13:31:05.517] grepl <- base::grepl [13:31:05.517] restarts <- computeRestarts(cond) [13:31:05.517] for (restart in restarts) { [13:31:05.517] name <- restart$name [13:31:05.517] if (is.null(name)) [13:31:05.517] next [13:31:05.517] if (!grepl(pattern, name)) [13:31:05.517] next [13:31:05.517] invokeRestart(restart) [13:31:05.517] muffled <- TRUE [13:31:05.517] break [13:31:05.517] } [13:31:05.517] } [13:31:05.517] } [13:31:05.517] invisible(muffled) [13:31:05.517] } [13:31:05.517] muffleCondition(cond, pattern = "^muffle") [13:31:05.517] } [13:31:05.517] } [13:31:05.517] } [13:31:05.517] })) [13:31:05.517] }, error = function(ex) { [13:31:05.517] base::structure(base::list(value = NULL, visible = NULL, [13:31:05.517] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.517] ...future.rng), started = ...future.startTime, [13:31:05.517] finished = Sys.time(), session_uuid = NA_character_, [13:31:05.517] version = "1.8"), class = "FutureResult") [13:31:05.517] }, finally = { [13:31:05.517] if (!identical(...future.workdir, getwd())) [13:31:05.517] setwd(...future.workdir) [13:31:05.517] { [13:31:05.517] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:05.517] ...future.oldOptions$nwarnings <- NULL [13:31:05.517] } [13:31:05.517] base::options(...future.oldOptions) [13:31:05.517] if (.Platform$OS.type == "windows") { [13:31:05.517] old_names <- names(...future.oldEnvVars) [13:31:05.517] envs <- base::Sys.getenv() [13:31:05.517] names <- names(envs) [13:31:05.517] common <- intersect(names, old_names) [13:31:05.517] added <- setdiff(names, old_names) [13:31:05.517] removed <- setdiff(old_names, names) [13:31:05.517] changed <- common[...future.oldEnvVars[common] != [13:31:05.517] envs[common]] [13:31:05.517] NAMES <- toupper(changed) [13:31:05.517] args <- list() [13:31:05.517] for (kk in seq_along(NAMES)) { [13:31:05.517] name <- changed[[kk]] [13:31:05.517] NAME <- NAMES[[kk]] [13:31:05.517] if (name != NAME && is.element(NAME, old_names)) [13:31:05.517] next [13:31:05.517] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.517] } [13:31:05.517] NAMES <- toupper(added) [13:31:05.517] for (kk in seq_along(NAMES)) { [13:31:05.517] name <- added[[kk]] [13:31:05.517] NAME <- NAMES[[kk]] [13:31:05.517] if (name != NAME && is.element(NAME, old_names)) [13:31:05.517] next [13:31:05.517] args[[name]] <- "" [13:31:05.517] } [13:31:05.517] NAMES <- toupper(removed) [13:31:05.517] for (kk in seq_along(NAMES)) { [13:31:05.517] name <- removed[[kk]] [13:31:05.517] NAME <- NAMES[[kk]] [13:31:05.517] if (name != NAME && is.element(NAME, old_names)) [13:31:05.517] next [13:31:05.517] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.517] } [13:31:05.517] if (length(args) > 0) [13:31:05.517] base::do.call(base::Sys.setenv, args = args) [13:31:05.517] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:05.517] } [13:31:05.517] else { [13:31:05.517] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:05.517] } [13:31:05.517] { [13:31:05.517] if (base::length(...future.futureOptionsAdded) > [13:31:05.517] 0L) { [13:31:05.517] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:05.517] base::names(opts) <- ...future.futureOptionsAdded [13:31:05.517] base::options(opts) [13:31:05.517] } [13:31:05.517] { [13:31:05.517] NULL [13:31:05.517] options(future.plan = NULL) [13:31:05.517] if (is.na(NA_character_)) [13:31:05.517] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.517] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:05.517] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:05.517] .init = FALSE) [13:31:05.517] } [13:31:05.517] } [13:31:05.517] } [13:31:05.517] }) [13:31:05.517] if (TRUE) { [13:31:05.517] base::sink(type = "output", split = FALSE) [13:31:05.517] if (TRUE) { [13:31:05.517] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:05.517] } [13:31:05.517] else { [13:31:05.517] ...future.result["stdout"] <- base::list(NULL) [13:31:05.517] } [13:31:05.517] base::close(...future.stdout) [13:31:05.517] ...future.stdout <- NULL [13:31:05.517] } [13:31:05.517] ...future.result$conditions <- ...future.conditions [13:31:05.517] ...future.result$finished <- base::Sys.time() [13:31:05.517] ...future.result [13:31:05.517] } [13:31:05.521] - Launch lazy future ... done [13:31:05.521] 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) }) [13:31:05.531] getGlobalsAndPackages() ... [13:31:05.531] Searching for globals... [13:31:05.532] - globals found: [4] '{', 'xtabs', 'x', '~' [13:31:05.533] Searching for globals ... DONE [13:31:05.533] Resolving globals: FALSE [13:31:05.533] The total size of the 1 globals is 96 bytes (96 bytes) [13:31:05.534] 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') [13:31:05.534] - globals: [1] 'x' [13:31:05.534] - packages: [1] 'stats' [13:31:05.534] getGlobalsAndPackages() ... DONE [13:31:05.535] run() for 'Future' ... [13:31:05.535] - state: 'created' [13:31:05.535] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:05.537] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:05.538] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:05.538] - Field: 'label' [13:31:05.538] - Field: 'local' [13:31:05.538] - Field: 'owner' [13:31:05.538] - Field: 'envir' [13:31:05.538] - Field: 'packages' [13:31:05.539] - Field: 'gc' [13:31:05.539] - Field: 'conditions' [13:31:05.539] - Field: 'expr' [13:31:05.539] - Field: 'uuid' [13:31:05.539] - Field: 'seed' [13:31:05.539] - Field: 'version' [13:31:05.540] - Field: 'result' [13:31:05.540] - Field: 'asynchronous' [13:31:05.540] - Field: 'calls' [13:31:05.540] - Field: 'globals' [13:31:05.540] - Field: 'stdout' [13:31:05.541] - Field: 'earlySignal' [13:31:05.541] - Field: 'lazy' [13:31:05.541] - Field: 'state' [13:31:05.541] - Field: '.cluster' [13:31:05.541] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:05.541] - Launch lazy future ... [13:31:05.542] Packages needed by the future expression (n = 1): 'stats' [13:31:05.542] Packages needed by future strategies (n = 0): [13:31:05.542] { [13:31:05.542] { [13:31:05.542] { [13:31:05.542] ...future.startTime <- base::Sys.time() [13:31:05.542] { [13:31:05.542] { [13:31:05.542] { [13:31:05.542] { [13:31:05.542] base::local({ [13:31:05.542] has_future <- base::requireNamespace("future", [13:31:05.542] quietly = TRUE) [13:31:05.542] if (has_future) { [13:31:05.542] ns <- base::getNamespace("future") [13:31:05.542] version <- ns[[".package"]][["version"]] [13:31:05.542] if (is.null(version)) [13:31:05.542] version <- utils::packageVersion("future") [13:31:05.542] } [13:31:05.542] else { [13:31:05.542] version <- NULL [13:31:05.542] } [13:31:05.542] if (!has_future || version < "1.8.0") { [13:31:05.542] info <- base::c(r_version = base::gsub("R version ", [13:31:05.542] "", base::R.version$version.string), [13:31:05.542] platform = base::sprintf("%s (%s-bit)", [13:31:05.542] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:05.542] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:05.542] "release", "version")], collapse = " "), [13:31:05.542] hostname = base::Sys.info()[["nodename"]]) [13:31:05.542] info <- base::sprintf("%s: %s", base::names(info), [13:31:05.542] info) [13:31:05.542] info <- base::paste(info, collapse = "; ") [13:31:05.542] if (!has_future) { [13:31:05.542] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:05.542] info) [13:31:05.542] } [13:31:05.542] else { [13:31:05.542] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:05.542] info, version) [13:31:05.542] } [13:31:05.542] base::stop(msg) [13:31:05.542] } [13:31:05.542] }) [13:31:05.542] } [13:31:05.542] base::local({ [13:31:05.542] for (pkg in "stats") { [13:31:05.542] base::loadNamespace(pkg) [13:31:05.542] base::library(pkg, character.only = TRUE) [13:31:05.542] } [13:31:05.542] }) [13:31:05.542] } [13:31:05.542] ...future.strategy.old <- future::plan("list") [13:31:05.542] options(future.plan = NULL) [13:31:05.542] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.542] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:05.542] } [13:31:05.542] ...future.workdir <- getwd() [13:31:05.542] } [13:31:05.542] ...future.oldOptions <- base::as.list(base::.Options) [13:31:05.542] ...future.oldEnvVars <- base::Sys.getenv() [13:31:05.542] } [13:31:05.542] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:05.542] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:05.542] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:05.542] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:05.542] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:05.542] future.stdout.windows.reencode = NULL, width = 80L) [13:31:05.542] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:05.542] base::names(...future.oldOptions)) [13:31:05.542] } [13:31:05.542] if (FALSE) { [13:31:05.542] } [13:31:05.542] else { [13:31:05.542] if (TRUE) { [13:31:05.542] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:05.542] open = "w") [13:31:05.542] } [13:31:05.542] else { [13:31:05.542] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:05.542] windows = "NUL", "/dev/null"), open = "w") [13:31:05.542] } [13:31:05.542] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:05.542] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:05.542] base::sink(type = "output", split = FALSE) [13:31:05.542] base::close(...future.stdout) [13:31:05.542] }, add = TRUE) [13:31:05.542] } [13:31:05.542] ...future.frame <- base::sys.nframe() [13:31:05.542] ...future.conditions <- base::list() [13:31:05.542] ...future.rng <- base::globalenv()$.Random.seed [13:31:05.542] if (FALSE) { [13:31:05.542] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:05.542] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:05.542] } [13:31:05.542] ...future.result <- base::tryCatch({ [13:31:05.542] base::withCallingHandlers({ [13:31:05.542] ...future.value <- base::withVisible(base::local({ [13:31:05.542] xtabs(~x) [13:31:05.542] })) [13:31:05.542] future::FutureResult(value = ...future.value$value, [13:31:05.542] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.542] ...future.rng), globalenv = if (FALSE) [13:31:05.542] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:05.542] ...future.globalenv.names)) [13:31:05.542] else NULL, started = ...future.startTime, version = "1.8") [13:31:05.542] }, condition = base::local({ [13:31:05.542] c <- base::c [13:31:05.542] inherits <- base::inherits [13:31:05.542] invokeRestart <- base::invokeRestart [13:31:05.542] length <- base::length [13:31:05.542] list <- base::list [13:31:05.542] seq.int <- base::seq.int [13:31:05.542] signalCondition <- base::signalCondition [13:31:05.542] sys.calls <- base::sys.calls [13:31:05.542] `[[` <- base::`[[` [13:31:05.542] `+` <- base::`+` [13:31:05.542] `<<-` <- base::`<<-` [13:31:05.542] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:05.542] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:05.542] 3L)] [13:31:05.542] } [13:31:05.542] function(cond) { [13:31:05.542] is_error <- inherits(cond, "error") [13:31:05.542] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:05.542] NULL) [13:31:05.542] if (is_error) { [13:31:05.542] sessionInformation <- function() { [13:31:05.542] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:05.542] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:05.542] search = base::search(), system = base::Sys.info()) [13:31:05.542] } [13:31:05.542] ...future.conditions[[length(...future.conditions) + [13:31:05.542] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:05.542] cond$call), session = sessionInformation(), [13:31:05.542] timestamp = base::Sys.time(), signaled = 0L) [13:31:05.542] signalCondition(cond) [13:31:05.542] } [13:31:05.542] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:05.542] signal <- FALSE && inherits(cond, character(0)) [13:31:05.542] ...future.conditions[[length(...future.conditions) + [13:31:05.542] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:05.542] if (FALSE && !signal) { [13:31:05.542] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.542] { [13:31:05.542] inherits <- base::inherits [13:31:05.542] invokeRestart <- base::invokeRestart [13:31:05.542] is.null <- base::is.null [13:31:05.542] muffled <- FALSE [13:31:05.542] if (inherits(cond, "message")) { [13:31:05.542] muffled <- grepl(pattern, "muffleMessage") [13:31:05.542] if (muffled) [13:31:05.542] invokeRestart("muffleMessage") [13:31:05.542] } [13:31:05.542] else if (inherits(cond, "warning")) { [13:31:05.542] muffled <- grepl(pattern, "muffleWarning") [13:31:05.542] if (muffled) [13:31:05.542] invokeRestart("muffleWarning") [13:31:05.542] } [13:31:05.542] else if (inherits(cond, "condition")) { [13:31:05.542] if (!is.null(pattern)) { [13:31:05.542] computeRestarts <- base::computeRestarts [13:31:05.542] grepl <- base::grepl [13:31:05.542] restarts <- computeRestarts(cond) [13:31:05.542] for (restart in restarts) { [13:31:05.542] name <- restart$name [13:31:05.542] if (is.null(name)) [13:31:05.542] next [13:31:05.542] if (!grepl(pattern, name)) [13:31:05.542] next [13:31:05.542] invokeRestart(restart) [13:31:05.542] muffled <- TRUE [13:31:05.542] break [13:31:05.542] } [13:31:05.542] } [13:31:05.542] } [13:31:05.542] invisible(muffled) [13:31:05.542] } [13:31:05.542] muffleCondition(cond, pattern = "^muffle") [13:31:05.542] } [13:31:05.542] } [13:31:05.542] else { [13:31:05.542] if (TRUE) { [13:31:05.542] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.542] { [13:31:05.542] inherits <- base::inherits [13:31:05.542] invokeRestart <- base::invokeRestart [13:31:05.542] is.null <- base::is.null [13:31:05.542] muffled <- FALSE [13:31:05.542] if (inherits(cond, "message")) { [13:31:05.542] muffled <- grepl(pattern, "muffleMessage") [13:31:05.542] if (muffled) [13:31:05.542] invokeRestart("muffleMessage") [13:31:05.542] } [13:31:05.542] else if (inherits(cond, "warning")) { [13:31:05.542] muffled <- grepl(pattern, "muffleWarning") [13:31:05.542] if (muffled) [13:31:05.542] invokeRestart("muffleWarning") [13:31:05.542] } [13:31:05.542] else if (inherits(cond, "condition")) { [13:31:05.542] if (!is.null(pattern)) { [13:31:05.542] computeRestarts <- base::computeRestarts [13:31:05.542] grepl <- base::grepl [13:31:05.542] restarts <- computeRestarts(cond) [13:31:05.542] for (restart in restarts) { [13:31:05.542] name <- restart$name [13:31:05.542] if (is.null(name)) [13:31:05.542] next [13:31:05.542] if (!grepl(pattern, name)) [13:31:05.542] next [13:31:05.542] invokeRestart(restart) [13:31:05.542] muffled <- TRUE [13:31:05.542] break [13:31:05.542] } [13:31:05.542] } [13:31:05.542] } [13:31:05.542] invisible(muffled) [13:31:05.542] } [13:31:05.542] muffleCondition(cond, pattern = "^muffle") [13:31:05.542] } [13:31:05.542] } [13:31:05.542] } [13:31:05.542] })) [13:31:05.542] }, error = function(ex) { [13:31:05.542] base::structure(base::list(value = NULL, visible = NULL, [13:31:05.542] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.542] ...future.rng), started = ...future.startTime, [13:31:05.542] finished = Sys.time(), session_uuid = NA_character_, [13:31:05.542] version = "1.8"), class = "FutureResult") [13:31:05.542] }, finally = { [13:31:05.542] if (!identical(...future.workdir, getwd())) [13:31:05.542] setwd(...future.workdir) [13:31:05.542] { [13:31:05.542] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:05.542] ...future.oldOptions$nwarnings <- NULL [13:31:05.542] } [13:31:05.542] base::options(...future.oldOptions) [13:31:05.542] if (.Platform$OS.type == "windows") { [13:31:05.542] old_names <- names(...future.oldEnvVars) [13:31:05.542] envs <- base::Sys.getenv() [13:31:05.542] names <- names(envs) [13:31:05.542] common <- intersect(names, old_names) [13:31:05.542] added <- setdiff(names, old_names) [13:31:05.542] removed <- setdiff(old_names, names) [13:31:05.542] changed <- common[...future.oldEnvVars[common] != [13:31:05.542] envs[common]] [13:31:05.542] NAMES <- toupper(changed) [13:31:05.542] args <- list() [13:31:05.542] for (kk in seq_along(NAMES)) { [13:31:05.542] name <- changed[[kk]] [13:31:05.542] NAME <- NAMES[[kk]] [13:31:05.542] if (name != NAME && is.element(NAME, old_names)) [13:31:05.542] next [13:31:05.542] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.542] } [13:31:05.542] NAMES <- toupper(added) [13:31:05.542] for (kk in seq_along(NAMES)) { [13:31:05.542] name <- added[[kk]] [13:31:05.542] NAME <- NAMES[[kk]] [13:31:05.542] if (name != NAME && is.element(NAME, old_names)) [13:31:05.542] next [13:31:05.542] args[[name]] <- "" [13:31:05.542] } [13:31:05.542] NAMES <- toupper(removed) [13:31:05.542] for (kk in seq_along(NAMES)) { [13:31:05.542] name <- removed[[kk]] [13:31:05.542] NAME <- NAMES[[kk]] [13:31:05.542] if (name != NAME && is.element(NAME, old_names)) [13:31:05.542] next [13:31:05.542] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.542] } [13:31:05.542] if (length(args) > 0) [13:31:05.542] base::do.call(base::Sys.setenv, args = args) [13:31:05.542] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:05.542] } [13:31:05.542] else { [13:31:05.542] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:05.542] } [13:31:05.542] { [13:31:05.542] if (base::length(...future.futureOptionsAdded) > [13:31:05.542] 0L) { [13:31:05.542] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:05.542] base::names(opts) <- ...future.futureOptionsAdded [13:31:05.542] base::options(opts) [13:31:05.542] } [13:31:05.542] { [13:31:05.542] NULL [13:31:05.542] options(future.plan = NULL) [13:31:05.542] if (is.na(NA_character_)) [13:31:05.542] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.542] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:05.542] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:05.542] .init = FALSE) [13:31:05.542] } [13:31:05.542] } [13:31:05.542] } [13:31:05.542] }) [13:31:05.542] if (TRUE) { [13:31:05.542] base::sink(type = "output", split = FALSE) [13:31:05.542] if (TRUE) { [13:31:05.542] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:05.542] } [13:31:05.542] else { [13:31:05.542] ...future.result["stdout"] <- base::list(NULL) [13:31:05.542] } [13:31:05.542] base::close(...future.stdout) [13:31:05.542] ...future.stdout <- NULL [13:31:05.542] } [13:31:05.542] ...future.result$conditions <- ...future.conditions [13:31:05.542] ...future.result$finished <- base::Sys.time() [13:31:05.542] ...future.result [13:31:05.542] } [13:31:05.546] - Launch lazy future ... done [13:31:05.547] run() for 'MiraiFuture' ... done > tbl <- value(f) > print(tbl) x 1 2 2 3 > stopifnot(all.equal(tbl, tbl0)) > > ## Future assignment > tbl %<-% { xtabs(~ x) } [13:31:05.550] getGlobalsAndPackages() ... [13:31:05.550] Searching for globals... [13:31:05.552] - globals found: [4] '{', 'xtabs', 'x', '~' [13:31:05.552] Searching for globals ... DONE [13:31:05.552] Resolving globals: FALSE [13:31:05.553] The total size of the 1 globals is 96 bytes (96 bytes) [13:31:05.553] 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') [13:31:05.553] - globals: [1] 'x' [13:31:05.554] - packages: [1] 'stats' [13:31:05.554] getGlobalsAndPackages() ... DONE [13:31:05.554] run() for 'Future' ... [13:31:05.554] - state: 'created' [13:31:05.556] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:05.558] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:05.559] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:05.559] - Field: 'label' [13:31:05.559] - Field: 'local' [13:31:05.559] - Field: 'owner' [13:31:05.559] - Field: 'envir' [13:31:05.559] - Field: 'packages' [13:31:05.560] - Field: 'gc' [13:31:05.560] - Field: 'conditions' [13:31:05.560] - Field: 'expr' [13:31:05.560] - Field: 'uuid' [13:31:05.560] - Field: 'seed' [13:31:05.561] - Field: 'version' [13:31:05.561] - Field: 'result' [13:31:05.561] - Field: 'asynchronous' [13:31:05.561] - Field: 'calls' [13:31:05.561] - Field: 'globals' [13:31:05.561] - Field: 'stdout' [13:31:05.562] - Field: 'earlySignal' [13:31:05.562] - Field: 'lazy' [13:31:05.562] - Field: 'state' [13:31:05.562] - Field: '.cluster' [13:31:05.562] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:05.562] - Launch lazy future ... [13:31:05.563] Packages needed by the future expression (n = 1): 'stats' [13:31:05.563] Packages needed by future strategies (n = 0): [13:31:05.563] { [13:31:05.563] { [13:31:05.563] { [13:31:05.563] ...future.startTime <- base::Sys.time() [13:31:05.563] { [13:31:05.563] { [13:31:05.563] { [13:31:05.563] { [13:31:05.563] base::local({ [13:31:05.563] has_future <- base::requireNamespace("future", [13:31:05.563] quietly = TRUE) [13:31:05.563] if (has_future) { [13:31:05.563] ns <- base::getNamespace("future") [13:31:05.563] version <- ns[[".package"]][["version"]] [13:31:05.563] if (is.null(version)) [13:31:05.563] version <- utils::packageVersion("future") [13:31:05.563] } [13:31:05.563] else { [13:31:05.563] version <- NULL [13:31:05.563] } [13:31:05.563] if (!has_future || version < "1.8.0") { [13:31:05.563] info <- base::c(r_version = base::gsub("R version ", [13:31:05.563] "", base::R.version$version.string), [13:31:05.563] platform = base::sprintf("%s (%s-bit)", [13:31:05.563] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:05.563] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:05.563] "release", "version")], collapse = " "), [13:31:05.563] hostname = base::Sys.info()[["nodename"]]) [13:31:05.563] info <- base::sprintf("%s: %s", base::names(info), [13:31:05.563] info) [13:31:05.563] info <- base::paste(info, collapse = "; ") [13:31:05.563] if (!has_future) { [13:31:05.563] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:05.563] info) [13:31:05.563] } [13:31:05.563] else { [13:31:05.563] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:05.563] info, version) [13:31:05.563] } [13:31:05.563] base::stop(msg) [13:31:05.563] } [13:31:05.563] }) [13:31:05.563] } [13:31:05.563] base::local({ [13:31:05.563] for (pkg in "stats") { [13:31:05.563] base::loadNamespace(pkg) [13:31:05.563] base::library(pkg, character.only = TRUE) [13:31:05.563] } [13:31:05.563] }) [13:31:05.563] } [13:31:05.563] ...future.strategy.old <- future::plan("list") [13:31:05.563] options(future.plan = NULL) [13:31:05.563] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.563] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:05.563] } [13:31:05.563] ...future.workdir <- getwd() [13:31:05.563] } [13:31:05.563] ...future.oldOptions <- base::as.list(base::.Options) [13:31:05.563] ...future.oldEnvVars <- base::Sys.getenv() [13:31:05.563] } [13:31:05.563] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:05.563] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:05.563] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:05.563] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:05.563] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:05.563] future.stdout.windows.reencode = NULL, width = 80L) [13:31:05.563] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:05.563] base::names(...future.oldOptions)) [13:31:05.563] } [13:31:05.563] if (FALSE) { [13:31:05.563] } [13:31:05.563] else { [13:31:05.563] if (TRUE) { [13:31:05.563] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:05.563] open = "w") [13:31:05.563] } [13:31:05.563] else { [13:31:05.563] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:05.563] windows = "NUL", "/dev/null"), open = "w") [13:31:05.563] } [13:31:05.563] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:05.563] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:05.563] base::sink(type = "output", split = FALSE) [13:31:05.563] base::close(...future.stdout) [13:31:05.563] }, add = TRUE) [13:31:05.563] } [13:31:05.563] ...future.frame <- base::sys.nframe() [13:31:05.563] ...future.conditions <- base::list() [13:31:05.563] ...future.rng <- base::globalenv()$.Random.seed [13:31:05.563] if (FALSE) { [13:31:05.563] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:05.563] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:05.563] } [13:31:05.563] ...future.result <- base::tryCatch({ [13:31:05.563] base::withCallingHandlers({ [13:31:05.563] ...future.value <- base::withVisible(base::local({ [13:31:05.563] xtabs(~x) [13:31:05.563] })) [13:31:05.563] future::FutureResult(value = ...future.value$value, [13:31:05.563] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.563] ...future.rng), globalenv = if (FALSE) [13:31:05.563] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:05.563] ...future.globalenv.names)) [13:31:05.563] else NULL, started = ...future.startTime, version = "1.8") [13:31:05.563] }, condition = base::local({ [13:31:05.563] c <- base::c [13:31:05.563] inherits <- base::inherits [13:31:05.563] invokeRestart <- base::invokeRestart [13:31:05.563] length <- base::length [13:31:05.563] list <- base::list [13:31:05.563] seq.int <- base::seq.int [13:31:05.563] signalCondition <- base::signalCondition [13:31:05.563] sys.calls <- base::sys.calls [13:31:05.563] `[[` <- base::`[[` [13:31:05.563] `+` <- base::`+` [13:31:05.563] `<<-` <- base::`<<-` [13:31:05.563] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:05.563] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:05.563] 3L)] [13:31:05.563] } [13:31:05.563] function(cond) { [13:31:05.563] is_error <- inherits(cond, "error") [13:31:05.563] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:05.563] NULL) [13:31:05.563] if (is_error) { [13:31:05.563] sessionInformation <- function() { [13:31:05.563] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:05.563] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:05.563] search = base::search(), system = base::Sys.info()) [13:31:05.563] } [13:31:05.563] ...future.conditions[[length(...future.conditions) + [13:31:05.563] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:05.563] cond$call), session = sessionInformation(), [13:31:05.563] timestamp = base::Sys.time(), signaled = 0L) [13:31:05.563] signalCondition(cond) [13:31:05.563] } [13:31:05.563] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:05.563] signal <- FALSE && inherits(cond, character(0)) [13:31:05.563] ...future.conditions[[length(...future.conditions) + [13:31:05.563] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:05.563] if (FALSE && !signal) { [13:31:05.563] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.563] { [13:31:05.563] inherits <- base::inherits [13:31:05.563] invokeRestart <- base::invokeRestart [13:31:05.563] is.null <- base::is.null [13:31:05.563] muffled <- FALSE [13:31:05.563] if (inherits(cond, "message")) { [13:31:05.563] muffled <- grepl(pattern, "muffleMessage") [13:31:05.563] if (muffled) [13:31:05.563] invokeRestart("muffleMessage") [13:31:05.563] } [13:31:05.563] else if (inherits(cond, "warning")) { [13:31:05.563] muffled <- grepl(pattern, "muffleWarning") [13:31:05.563] if (muffled) [13:31:05.563] invokeRestart("muffleWarning") [13:31:05.563] } [13:31:05.563] else if (inherits(cond, "condition")) { [13:31:05.563] if (!is.null(pattern)) { [13:31:05.563] computeRestarts <- base::computeRestarts [13:31:05.563] grepl <- base::grepl [13:31:05.563] restarts <- computeRestarts(cond) [13:31:05.563] for (restart in restarts) { [13:31:05.563] name <- restart$name [13:31:05.563] if (is.null(name)) [13:31:05.563] next [13:31:05.563] if (!grepl(pattern, name)) [13:31:05.563] next [13:31:05.563] invokeRestart(restart) [13:31:05.563] muffled <- TRUE [13:31:05.563] break [13:31:05.563] } [13:31:05.563] } [13:31:05.563] } [13:31:05.563] invisible(muffled) [13:31:05.563] } [13:31:05.563] muffleCondition(cond, pattern = "^muffle") [13:31:05.563] } [13:31:05.563] } [13:31:05.563] else { [13:31:05.563] if (TRUE) { [13:31:05.563] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.563] { [13:31:05.563] inherits <- base::inherits [13:31:05.563] invokeRestart <- base::invokeRestart [13:31:05.563] is.null <- base::is.null [13:31:05.563] muffled <- FALSE [13:31:05.563] if (inherits(cond, "message")) { [13:31:05.563] muffled <- grepl(pattern, "muffleMessage") [13:31:05.563] if (muffled) [13:31:05.563] invokeRestart("muffleMessage") [13:31:05.563] } [13:31:05.563] else if (inherits(cond, "warning")) { [13:31:05.563] muffled <- grepl(pattern, "muffleWarning") [13:31:05.563] if (muffled) [13:31:05.563] invokeRestart("muffleWarning") [13:31:05.563] } [13:31:05.563] else if (inherits(cond, "condition")) { [13:31:05.563] if (!is.null(pattern)) { [13:31:05.563] computeRestarts <- base::computeRestarts [13:31:05.563] grepl <- base::grepl [13:31:05.563] restarts <- computeRestarts(cond) [13:31:05.563] for (restart in restarts) { [13:31:05.563] name <- restart$name [13:31:05.563] if (is.null(name)) [13:31:05.563] next [13:31:05.563] if (!grepl(pattern, name)) [13:31:05.563] next [13:31:05.563] invokeRestart(restart) [13:31:05.563] muffled <- TRUE [13:31:05.563] break [13:31:05.563] } [13:31:05.563] } [13:31:05.563] } [13:31:05.563] invisible(muffled) [13:31:05.563] } [13:31:05.563] muffleCondition(cond, pattern = "^muffle") [13:31:05.563] } [13:31:05.563] } [13:31:05.563] } [13:31:05.563] })) [13:31:05.563] }, error = function(ex) { [13:31:05.563] base::structure(base::list(value = NULL, visible = NULL, [13:31:05.563] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.563] ...future.rng), started = ...future.startTime, [13:31:05.563] finished = Sys.time(), session_uuid = NA_character_, [13:31:05.563] version = "1.8"), class = "FutureResult") [13:31:05.563] }, finally = { [13:31:05.563] if (!identical(...future.workdir, getwd())) [13:31:05.563] setwd(...future.workdir) [13:31:05.563] { [13:31:05.563] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:05.563] ...future.oldOptions$nwarnings <- NULL [13:31:05.563] } [13:31:05.563] base::options(...future.oldOptions) [13:31:05.563] if (.Platform$OS.type == "windows") { [13:31:05.563] old_names <- names(...future.oldEnvVars) [13:31:05.563] envs <- base::Sys.getenv() [13:31:05.563] names <- names(envs) [13:31:05.563] common <- intersect(names, old_names) [13:31:05.563] added <- setdiff(names, old_names) [13:31:05.563] removed <- setdiff(old_names, names) [13:31:05.563] changed <- common[...future.oldEnvVars[common] != [13:31:05.563] envs[common]] [13:31:05.563] NAMES <- toupper(changed) [13:31:05.563] args <- list() [13:31:05.563] for (kk in seq_along(NAMES)) { [13:31:05.563] name <- changed[[kk]] [13:31:05.563] NAME <- NAMES[[kk]] [13:31:05.563] if (name != NAME && is.element(NAME, old_names)) [13:31:05.563] next [13:31:05.563] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.563] } [13:31:05.563] NAMES <- toupper(added) [13:31:05.563] for (kk in seq_along(NAMES)) { [13:31:05.563] name <- added[[kk]] [13:31:05.563] NAME <- NAMES[[kk]] [13:31:05.563] if (name != NAME && is.element(NAME, old_names)) [13:31:05.563] next [13:31:05.563] args[[name]] <- "" [13:31:05.563] } [13:31:05.563] NAMES <- toupper(removed) [13:31:05.563] for (kk in seq_along(NAMES)) { [13:31:05.563] name <- removed[[kk]] [13:31:05.563] NAME <- NAMES[[kk]] [13:31:05.563] if (name != NAME && is.element(NAME, old_names)) [13:31:05.563] next [13:31:05.563] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.563] } [13:31:05.563] if (length(args) > 0) [13:31:05.563] base::do.call(base::Sys.setenv, args = args) [13:31:05.563] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:05.563] } [13:31:05.563] else { [13:31:05.563] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:05.563] } [13:31:05.563] { [13:31:05.563] if (base::length(...future.futureOptionsAdded) > [13:31:05.563] 0L) { [13:31:05.563] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:05.563] base::names(opts) <- ...future.futureOptionsAdded [13:31:05.563] base::options(opts) [13:31:05.563] } [13:31:05.563] { [13:31:05.563] NULL [13:31:05.563] options(future.plan = NULL) [13:31:05.563] if (is.na(NA_character_)) [13:31:05.563] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.563] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:05.563] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:05.563] .init = FALSE) [13:31:05.563] } [13:31:05.563] } [13:31:05.563] } [13:31:05.563] }) [13:31:05.563] if (TRUE) { [13:31:05.563] base::sink(type = "output", split = FALSE) [13:31:05.563] if (TRUE) { [13:31:05.563] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:05.563] } [13:31:05.563] else { [13:31:05.563] ...future.result["stdout"] <- base::list(NULL) [13:31:05.563] } [13:31:05.563] base::close(...future.stdout) [13:31:05.563] ...future.stdout <- NULL [13:31:05.563] } [13:31:05.563] ...future.result$conditions <- ...future.conditions [13:31:05.563] ...future.result$finished <- base::Sys.time() [13:31:05.563] ...future.result [13:31:05.563] } [13:31:05.567] - Launch lazy future ... done [13:31:05.567] 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 ...) [13:31:05.578] - Globals - lm(, data = cars) ... Call: lm(formula = dist ~ . - 1, data = cars) Coefficients: speed 2.909 [13:31:05.580] getGlobalsAndPackages() ... [13:31:05.580] Searching for globals... [13:31:05.582] - globals found: [7] '{', 'lm', 'dist', '-', '.', '~', 'cars' [13:31:05.582] Searching for globals ... DONE [13:31:05.583] Resolving globals: FALSE [13:31:05.583] [13:31:05.583] - packages: [2] 'stats', 'datasets' [13:31:05.584] getGlobalsAndPackages() ... DONE [13:31:05.584] run() for 'Future' ... [13:31:05.584] - state: 'created' [13:31:05.584] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:05.588] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:05.588] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:05.589] - Field: 'label' [13:31:05.589] - Field: 'local' [13:31:05.589] - Field: 'owner' [13:31:05.589] - Field: 'envir' [13:31:05.589] - Field: 'packages' [13:31:05.589] - Field: 'gc' [13:31:05.590] - Field: 'conditions' [13:31:05.590] - Field: 'expr' [13:31:05.590] - Field: 'uuid' [13:31:05.590] - Field: 'seed' [13:31:05.590] - Field: 'version' [13:31:05.591] - Field: 'result' [13:31:05.591] - Field: 'asynchronous' [13:31:05.591] - Field: 'calls' [13:31:05.591] - Field: 'globals' [13:31:05.591] - Field: 'stdout' [13:31:05.591] - Field: 'earlySignal' [13:31:05.592] - Field: 'lazy' [13:31:05.592] - Field: 'state' [13:31:05.592] - Field: '.cluster' [13:31:05.592] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:05.592] - Launch lazy future ... [13:31:05.592] Packages needed by the future expression (n = 2): 'stats', 'datasets' [13:31:05.593] Packages needed by future strategies (n = 0): [13:31:05.593] { [13:31:05.593] { [13:31:05.593] { [13:31:05.593] ...future.startTime <- base::Sys.time() [13:31:05.593] { [13:31:05.593] { [13:31:05.593] { [13:31:05.593] { [13:31:05.593] base::local({ [13:31:05.593] has_future <- base::requireNamespace("future", [13:31:05.593] quietly = TRUE) [13:31:05.593] if (has_future) { [13:31:05.593] ns <- base::getNamespace("future") [13:31:05.593] version <- ns[[".package"]][["version"]] [13:31:05.593] if (is.null(version)) [13:31:05.593] version <- utils::packageVersion("future") [13:31:05.593] } [13:31:05.593] else { [13:31:05.593] version <- NULL [13:31:05.593] } [13:31:05.593] if (!has_future || version < "1.8.0") { [13:31:05.593] info <- base::c(r_version = base::gsub("R version ", [13:31:05.593] "", base::R.version$version.string), [13:31:05.593] platform = base::sprintf("%s (%s-bit)", [13:31:05.593] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:05.593] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:05.593] "release", "version")], collapse = " "), [13:31:05.593] hostname = base::Sys.info()[["nodename"]]) [13:31:05.593] info <- base::sprintf("%s: %s", base::names(info), [13:31:05.593] info) [13:31:05.593] info <- base::paste(info, collapse = "; ") [13:31:05.593] if (!has_future) { [13:31:05.593] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:05.593] info) [13:31:05.593] } [13:31:05.593] else { [13:31:05.593] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:05.593] info, version) [13:31:05.593] } [13:31:05.593] base::stop(msg) [13:31:05.593] } [13:31:05.593] }) [13:31:05.593] } [13:31:05.593] base::local({ [13:31:05.593] for (pkg in c("stats", "datasets")) { [13:31:05.593] base::loadNamespace(pkg) [13:31:05.593] base::library(pkg, character.only = TRUE) [13:31:05.593] } [13:31:05.593] }) [13:31:05.593] } [13:31:05.593] ...future.strategy.old <- future::plan("list") [13:31:05.593] options(future.plan = NULL) [13:31:05.593] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.593] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:05.593] } [13:31:05.593] ...future.workdir <- getwd() [13:31:05.593] } [13:31:05.593] ...future.oldOptions <- base::as.list(base::.Options) [13:31:05.593] ...future.oldEnvVars <- base::Sys.getenv() [13:31:05.593] } [13:31:05.593] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:05.593] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:05.593] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:05.593] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:05.593] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:05.593] future.stdout.windows.reencode = NULL, width = 80L) [13:31:05.593] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:05.593] base::names(...future.oldOptions)) [13:31:05.593] } [13:31:05.593] if (FALSE) { [13:31:05.593] } [13:31:05.593] else { [13:31:05.593] if (TRUE) { [13:31:05.593] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:05.593] open = "w") [13:31:05.593] } [13:31:05.593] else { [13:31:05.593] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:05.593] windows = "NUL", "/dev/null"), open = "w") [13:31:05.593] } [13:31:05.593] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:05.593] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:05.593] base::sink(type = "output", split = FALSE) [13:31:05.593] base::close(...future.stdout) [13:31:05.593] }, add = TRUE) [13:31:05.593] } [13:31:05.593] ...future.frame <- base::sys.nframe() [13:31:05.593] ...future.conditions <- base::list() [13:31:05.593] ...future.rng <- base::globalenv()$.Random.seed [13:31:05.593] if (FALSE) { [13:31:05.593] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:05.593] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:05.593] } [13:31:05.593] ...future.result <- base::tryCatch({ [13:31:05.593] base::withCallingHandlers({ [13:31:05.593] ...future.value <- base::withVisible(base::local({ [13:31:05.593] lm(dist ~ . - 1, data = cars) [13:31:05.593] })) [13:31:05.593] future::FutureResult(value = ...future.value$value, [13:31:05.593] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.593] ...future.rng), globalenv = if (FALSE) [13:31:05.593] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:05.593] ...future.globalenv.names)) [13:31:05.593] else NULL, started = ...future.startTime, version = "1.8") [13:31:05.593] }, condition = base::local({ [13:31:05.593] c <- base::c [13:31:05.593] inherits <- base::inherits [13:31:05.593] invokeRestart <- base::invokeRestart [13:31:05.593] length <- base::length [13:31:05.593] list <- base::list [13:31:05.593] seq.int <- base::seq.int [13:31:05.593] signalCondition <- base::signalCondition [13:31:05.593] sys.calls <- base::sys.calls [13:31:05.593] `[[` <- base::`[[` [13:31:05.593] `+` <- base::`+` [13:31:05.593] `<<-` <- base::`<<-` [13:31:05.593] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:05.593] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:05.593] 3L)] [13:31:05.593] } [13:31:05.593] function(cond) { [13:31:05.593] is_error <- inherits(cond, "error") [13:31:05.593] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:05.593] NULL) [13:31:05.593] if (is_error) { [13:31:05.593] sessionInformation <- function() { [13:31:05.593] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:05.593] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:05.593] search = base::search(), system = base::Sys.info()) [13:31:05.593] } [13:31:05.593] ...future.conditions[[length(...future.conditions) + [13:31:05.593] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:05.593] cond$call), session = sessionInformation(), [13:31:05.593] timestamp = base::Sys.time(), signaled = 0L) [13:31:05.593] signalCondition(cond) [13:31:05.593] } [13:31:05.593] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:05.593] signal <- FALSE && inherits(cond, character(0)) [13:31:05.593] ...future.conditions[[length(...future.conditions) + [13:31:05.593] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:05.593] if (FALSE && !signal) { [13:31:05.593] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.593] { [13:31:05.593] inherits <- base::inherits [13:31:05.593] invokeRestart <- base::invokeRestart [13:31:05.593] is.null <- base::is.null [13:31:05.593] muffled <- FALSE [13:31:05.593] if (inherits(cond, "message")) { [13:31:05.593] muffled <- grepl(pattern, "muffleMessage") [13:31:05.593] if (muffled) [13:31:05.593] invokeRestart("muffleMessage") [13:31:05.593] } [13:31:05.593] else if (inherits(cond, "warning")) { [13:31:05.593] muffled <- grepl(pattern, "muffleWarning") [13:31:05.593] if (muffled) [13:31:05.593] invokeRestart("muffleWarning") [13:31:05.593] } [13:31:05.593] else if (inherits(cond, "condition")) { [13:31:05.593] if (!is.null(pattern)) { [13:31:05.593] computeRestarts <- base::computeRestarts [13:31:05.593] grepl <- base::grepl [13:31:05.593] restarts <- computeRestarts(cond) [13:31:05.593] for (restart in restarts) { [13:31:05.593] name <- restart$name [13:31:05.593] if (is.null(name)) [13:31:05.593] next [13:31:05.593] if (!grepl(pattern, name)) [13:31:05.593] next [13:31:05.593] invokeRestart(restart) [13:31:05.593] muffled <- TRUE [13:31:05.593] break [13:31:05.593] } [13:31:05.593] } [13:31:05.593] } [13:31:05.593] invisible(muffled) [13:31:05.593] } [13:31:05.593] muffleCondition(cond, pattern = "^muffle") [13:31:05.593] } [13:31:05.593] } [13:31:05.593] else { [13:31:05.593] if (TRUE) { [13:31:05.593] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.593] { [13:31:05.593] inherits <- base::inherits [13:31:05.593] invokeRestart <- base::invokeRestart [13:31:05.593] is.null <- base::is.null [13:31:05.593] muffled <- FALSE [13:31:05.593] if (inherits(cond, "message")) { [13:31:05.593] muffled <- grepl(pattern, "muffleMessage") [13:31:05.593] if (muffled) [13:31:05.593] invokeRestart("muffleMessage") [13:31:05.593] } [13:31:05.593] else if (inherits(cond, "warning")) { [13:31:05.593] muffled <- grepl(pattern, "muffleWarning") [13:31:05.593] if (muffled) [13:31:05.593] invokeRestart("muffleWarning") [13:31:05.593] } [13:31:05.593] else if (inherits(cond, "condition")) { [13:31:05.593] if (!is.null(pattern)) { [13:31:05.593] computeRestarts <- base::computeRestarts [13:31:05.593] grepl <- base::grepl [13:31:05.593] restarts <- computeRestarts(cond) [13:31:05.593] for (restart in restarts) { [13:31:05.593] name <- restart$name [13:31:05.593] if (is.null(name)) [13:31:05.593] next [13:31:05.593] if (!grepl(pattern, name)) [13:31:05.593] next [13:31:05.593] invokeRestart(restart) [13:31:05.593] muffled <- TRUE [13:31:05.593] break [13:31:05.593] } [13:31:05.593] } [13:31:05.593] } [13:31:05.593] invisible(muffled) [13:31:05.593] } [13:31:05.593] muffleCondition(cond, pattern = "^muffle") [13:31:05.593] } [13:31:05.593] } [13:31:05.593] } [13:31:05.593] })) [13:31:05.593] }, error = function(ex) { [13:31:05.593] base::structure(base::list(value = NULL, visible = NULL, [13:31:05.593] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.593] ...future.rng), started = ...future.startTime, [13:31:05.593] finished = Sys.time(), session_uuid = NA_character_, [13:31:05.593] version = "1.8"), class = "FutureResult") [13:31:05.593] }, finally = { [13:31:05.593] if (!identical(...future.workdir, getwd())) [13:31:05.593] setwd(...future.workdir) [13:31:05.593] { [13:31:05.593] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:05.593] ...future.oldOptions$nwarnings <- NULL [13:31:05.593] } [13:31:05.593] base::options(...future.oldOptions) [13:31:05.593] if (.Platform$OS.type == "windows") { [13:31:05.593] old_names <- names(...future.oldEnvVars) [13:31:05.593] envs <- base::Sys.getenv() [13:31:05.593] names <- names(envs) [13:31:05.593] common <- intersect(names, old_names) [13:31:05.593] added <- setdiff(names, old_names) [13:31:05.593] removed <- setdiff(old_names, names) [13:31:05.593] changed <- common[...future.oldEnvVars[common] != [13:31:05.593] envs[common]] [13:31:05.593] NAMES <- toupper(changed) [13:31:05.593] args <- list() [13:31:05.593] for (kk in seq_along(NAMES)) { [13:31:05.593] name <- changed[[kk]] [13:31:05.593] NAME <- NAMES[[kk]] [13:31:05.593] if (name != NAME && is.element(NAME, old_names)) [13:31:05.593] next [13:31:05.593] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.593] } [13:31:05.593] NAMES <- toupper(added) [13:31:05.593] for (kk in seq_along(NAMES)) { [13:31:05.593] name <- added[[kk]] [13:31:05.593] NAME <- NAMES[[kk]] [13:31:05.593] if (name != NAME && is.element(NAME, old_names)) [13:31:05.593] next [13:31:05.593] args[[name]] <- "" [13:31:05.593] } [13:31:05.593] NAMES <- toupper(removed) [13:31:05.593] for (kk in seq_along(NAMES)) { [13:31:05.593] name <- removed[[kk]] [13:31:05.593] NAME <- NAMES[[kk]] [13:31:05.593] if (name != NAME && is.element(NAME, old_names)) [13:31:05.593] next [13:31:05.593] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.593] } [13:31:05.593] if (length(args) > 0) [13:31:05.593] base::do.call(base::Sys.setenv, args = args) [13:31:05.593] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:05.593] } [13:31:05.593] else { [13:31:05.593] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:05.593] } [13:31:05.593] { [13:31:05.593] if (base::length(...future.futureOptionsAdded) > [13:31:05.593] 0L) { [13:31:05.593] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:05.593] base::names(opts) <- ...future.futureOptionsAdded [13:31:05.593] base::options(opts) [13:31:05.593] } [13:31:05.593] { [13:31:05.593] NULL [13:31:05.593] options(future.plan = NULL) [13:31:05.593] if (is.na(NA_character_)) [13:31:05.593] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.593] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:05.593] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:05.593] .init = FALSE) [13:31:05.593] } [13:31:05.593] } [13:31:05.593] } [13:31:05.593] }) [13:31:05.593] if (TRUE) { [13:31:05.593] base::sink(type = "output", split = FALSE) [13:31:05.593] if (TRUE) { [13:31:05.593] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:05.593] } [13:31:05.593] else { [13:31:05.593] ...future.result["stdout"] <- base::list(NULL) [13:31:05.593] } [13:31:05.593] base::close(...future.stdout) [13:31:05.593] ...future.stdout <- NULL [13:31:05.593] } [13:31:05.593] ...future.result$conditions <- ...future.conditions [13:31:05.593] ...future.result$finished <- base::Sys.time() [13:31:05.593] ...future.result [13:31:05.593] } [13:31:05.597] - Launch lazy future ... done [13:31:05.597] run() for 'MiraiFuture' ... done Call: lm(formula = dist ~ . - 1, data = cars) Coefficients: speed 2.909 [13:31:05.603] - Globals - lm(, data = cars) ... Call: lm(formula = dist ~ . + 0, data = cars) Coefficients: speed 2.909 [13:31:05.604] getGlobalsAndPackages() ... [13:31:05.605] Searching for globals... [13:31:05.606] - globals found: [7] '{', 'lm', 'dist', '+', '.', '~', 'cars' [13:31:05.607] Searching for globals ... DONE [13:31:05.607] Resolving globals: FALSE [13:31:05.607] [13:31:05.608] - packages: [2] 'stats', 'datasets' [13:31:05.608] getGlobalsAndPackages() ... DONE [13:31:05.608] run() for 'Future' ... [13:31:05.608] - state: 'created' [13:31:05.609] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:05.611] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:05.611] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:05.611] - Field: 'label' [13:31:05.611] - Field: 'local' [13:31:05.612] - Field: 'owner' [13:31:05.612] - Field: 'envir' [13:31:05.612] - Field: 'packages' [13:31:05.612] - Field: 'gc' [13:31:05.612] - Field: 'conditions' [13:31:05.612] - Field: 'expr' [13:31:05.613] - Field: 'uuid' [13:31:05.613] - Field: 'seed' [13:31:05.613] - Field: 'version' [13:31:05.613] - Field: 'result' [13:31:05.613] - Field: 'asynchronous' [13:31:05.613] - Field: 'calls' [13:31:05.614] - Field: 'globals' [13:31:05.614] - Field: 'stdout' [13:31:05.614] - Field: 'earlySignal' [13:31:05.614] - Field: 'lazy' [13:31:05.614] - Field: 'state' [13:31:05.615] - Field: '.cluster' [13:31:05.615] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:05.615] - Launch lazy future ... [13:31:05.615] Packages needed by the future expression (n = 2): 'stats', 'datasets' [13:31:05.615] Packages needed by future strategies (n = 0): [13:31:05.616] { [13:31:05.616] { [13:31:05.616] { [13:31:05.616] ...future.startTime <- base::Sys.time() [13:31:05.616] { [13:31:05.616] { [13:31:05.616] { [13:31:05.616] { [13:31:05.616] base::local({ [13:31:05.616] has_future <- base::requireNamespace("future", [13:31:05.616] quietly = TRUE) [13:31:05.616] if (has_future) { [13:31:05.616] ns <- base::getNamespace("future") [13:31:05.616] version <- ns[[".package"]][["version"]] [13:31:05.616] if (is.null(version)) [13:31:05.616] version <- utils::packageVersion("future") [13:31:05.616] } [13:31:05.616] else { [13:31:05.616] version <- NULL [13:31:05.616] } [13:31:05.616] if (!has_future || version < "1.8.0") { [13:31:05.616] info <- base::c(r_version = base::gsub("R version ", [13:31:05.616] "", base::R.version$version.string), [13:31:05.616] platform = base::sprintf("%s (%s-bit)", [13:31:05.616] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:05.616] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:05.616] "release", "version")], collapse = " "), [13:31:05.616] hostname = base::Sys.info()[["nodename"]]) [13:31:05.616] info <- base::sprintf("%s: %s", base::names(info), [13:31:05.616] info) [13:31:05.616] info <- base::paste(info, collapse = "; ") [13:31:05.616] if (!has_future) { [13:31:05.616] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:05.616] info) [13:31:05.616] } [13:31:05.616] else { [13:31:05.616] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:05.616] info, version) [13:31:05.616] } [13:31:05.616] base::stop(msg) [13:31:05.616] } [13:31:05.616] }) [13:31:05.616] } [13:31:05.616] base::local({ [13:31:05.616] for (pkg in c("stats", "datasets")) { [13:31:05.616] base::loadNamespace(pkg) [13:31:05.616] base::library(pkg, character.only = TRUE) [13:31:05.616] } [13:31:05.616] }) [13:31:05.616] } [13:31:05.616] ...future.strategy.old <- future::plan("list") [13:31:05.616] options(future.plan = NULL) [13:31:05.616] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.616] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:05.616] } [13:31:05.616] ...future.workdir <- getwd() [13:31:05.616] } [13:31:05.616] ...future.oldOptions <- base::as.list(base::.Options) [13:31:05.616] ...future.oldEnvVars <- base::Sys.getenv() [13:31:05.616] } [13:31:05.616] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:05.616] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:05.616] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:05.616] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:05.616] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:05.616] future.stdout.windows.reencode = NULL, width = 80L) [13:31:05.616] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:05.616] base::names(...future.oldOptions)) [13:31:05.616] } [13:31:05.616] if (FALSE) { [13:31:05.616] } [13:31:05.616] else { [13:31:05.616] if (TRUE) { [13:31:05.616] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:05.616] open = "w") [13:31:05.616] } [13:31:05.616] else { [13:31:05.616] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:05.616] windows = "NUL", "/dev/null"), open = "w") [13:31:05.616] } [13:31:05.616] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:05.616] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:05.616] base::sink(type = "output", split = FALSE) [13:31:05.616] base::close(...future.stdout) [13:31:05.616] }, add = TRUE) [13:31:05.616] } [13:31:05.616] ...future.frame <- base::sys.nframe() [13:31:05.616] ...future.conditions <- base::list() [13:31:05.616] ...future.rng <- base::globalenv()$.Random.seed [13:31:05.616] if (FALSE) { [13:31:05.616] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:05.616] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:05.616] } [13:31:05.616] ...future.result <- base::tryCatch({ [13:31:05.616] base::withCallingHandlers({ [13:31:05.616] ...future.value <- base::withVisible(base::local({ [13:31:05.616] lm(dist ~ . + 0, data = cars) [13:31:05.616] })) [13:31:05.616] future::FutureResult(value = ...future.value$value, [13:31:05.616] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.616] ...future.rng), globalenv = if (FALSE) [13:31:05.616] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:05.616] ...future.globalenv.names)) [13:31:05.616] else NULL, started = ...future.startTime, version = "1.8") [13:31:05.616] }, condition = base::local({ [13:31:05.616] c <- base::c [13:31:05.616] inherits <- base::inherits [13:31:05.616] invokeRestart <- base::invokeRestart [13:31:05.616] length <- base::length [13:31:05.616] list <- base::list [13:31:05.616] seq.int <- base::seq.int [13:31:05.616] signalCondition <- base::signalCondition [13:31:05.616] sys.calls <- base::sys.calls [13:31:05.616] `[[` <- base::`[[` [13:31:05.616] `+` <- base::`+` [13:31:05.616] `<<-` <- base::`<<-` [13:31:05.616] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:05.616] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:05.616] 3L)] [13:31:05.616] } [13:31:05.616] function(cond) { [13:31:05.616] is_error <- inherits(cond, "error") [13:31:05.616] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:05.616] NULL) [13:31:05.616] if (is_error) { [13:31:05.616] sessionInformation <- function() { [13:31:05.616] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:05.616] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:05.616] search = base::search(), system = base::Sys.info()) [13:31:05.616] } [13:31:05.616] ...future.conditions[[length(...future.conditions) + [13:31:05.616] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:05.616] cond$call), session = sessionInformation(), [13:31:05.616] timestamp = base::Sys.time(), signaled = 0L) [13:31:05.616] signalCondition(cond) [13:31:05.616] } [13:31:05.616] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:05.616] signal <- FALSE && inherits(cond, character(0)) [13:31:05.616] ...future.conditions[[length(...future.conditions) + [13:31:05.616] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:05.616] if (FALSE && !signal) { [13:31:05.616] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.616] { [13:31:05.616] inherits <- base::inherits [13:31:05.616] invokeRestart <- base::invokeRestart [13:31:05.616] is.null <- base::is.null [13:31:05.616] muffled <- FALSE [13:31:05.616] if (inherits(cond, "message")) { [13:31:05.616] muffled <- grepl(pattern, "muffleMessage") [13:31:05.616] if (muffled) [13:31:05.616] invokeRestart("muffleMessage") [13:31:05.616] } [13:31:05.616] else if (inherits(cond, "warning")) { [13:31:05.616] muffled <- grepl(pattern, "muffleWarning") [13:31:05.616] if (muffled) [13:31:05.616] invokeRestart("muffleWarning") [13:31:05.616] } [13:31:05.616] else if (inherits(cond, "condition")) { [13:31:05.616] if (!is.null(pattern)) { [13:31:05.616] computeRestarts <- base::computeRestarts [13:31:05.616] grepl <- base::grepl [13:31:05.616] restarts <- computeRestarts(cond) [13:31:05.616] for (restart in restarts) { [13:31:05.616] name <- restart$name [13:31:05.616] if (is.null(name)) [13:31:05.616] next [13:31:05.616] if (!grepl(pattern, name)) [13:31:05.616] next [13:31:05.616] invokeRestart(restart) [13:31:05.616] muffled <- TRUE [13:31:05.616] break [13:31:05.616] } [13:31:05.616] } [13:31:05.616] } [13:31:05.616] invisible(muffled) [13:31:05.616] } [13:31:05.616] muffleCondition(cond, pattern = "^muffle") [13:31:05.616] } [13:31:05.616] } [13:31:05.616] else { [13:31:05.616] if (TRUE) { [13:31:05.616] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.616] { [13:31:05.616] inherits <- base::inherits [13:31:05.616] invokeRestart <- base::invokeRestart [13:31:05.616] is.null <- base::is.null [13:31:05.616] muffled <- FALSE [13:31:05.616] if (inherits(cond, "message")) { [13:31:05.616] muffled <- grepl(pattern, "muffleMessage") [13:31:05.616] if (muffled) [13:31:05.616] invokeRestart("muffleMessage") [13:31:05.616] } [13:31:05.616] else if (inherits(cond, "warning")) { [13:31:05.616] muffled <- grepl(pattern, "muffleWarning") [13:31:05.616] if (muffled) [13:31:05.616] invokeRestart("muffleWarning") [13:31:05.616] } [13:31:05.616] else if (inherits(cond, "condition")) { [13:31:05.616] if (!is.null(pattern)) { [13:31:05.616] computeRestarts <- base::computeRestarts [13:31:05.616] grepl <- base::grepl [13:31:05.616] restarts <- computeRestarts(cond) [13:31:05.616] for (restart in restarts) { [13:31:05.616] name <- restart$name [13:31:05.616] if (is.null(name)) [13:31:05.616] next [13:31:05.616] if (!grepl(pattern, name)) [13:31:05.616] next [13:31:05.616] invokeRestart(restart) [13:31:05.616] muffled <- TRUE [13:31:05.616] break [13:31:05.616] } [13:31:05.616] } [13:31:05.616] } [13:31:05.616] invisible(muffled) [13:31:05.616] } [13:31:05.616] muffleCondition(cond, pattern = "^muffle") [13:31:05.616] } [13:31:05.616] } [13:31:05.616] } [13:31:05.616] })) [13:31:05.616] }, error = function(ex) { [13:31:05.616] base::structure(base::list(value = NULL, visible = NULL, [13:31:05.616] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.616] ...future.rng), started = ...future.startTime, [13:31:05.616] finished = Sys.time(), session_uuid = NA_character_, [13:31:05.616] version = "1.8"), class = "FutureResult") [13:31:05.616] }, finally = { [13:31:05.616] if (!identical(...future.workdir, getwd())) [13:31:05.616] setwd(...future.workdir) [13:31:05.616] { [13:31:05.616] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:05.616] ...future.oldOptions$nwarnings <- NULL [13:31:05.616] } [13:31:05.616] base::options(...future.oldOptions) [13:31:05.616] if (.Platform$OS.type == "windows") { [13:31:05.616] old_names <- names(...future.oldEnvVars) [13:31:05.616] envs <- base::Sys.getenv() [13:31:05.616] names <- names(envs) [13:31:05.616] common <- intersect(names, old_names) [13:31:05.616] added <- setdiff(names, old_names) [13:31:05.616] removed <- setdiff(old_names, names) [13:31:05.616] changed <- common[...future.oldEnvVars[common] != [13:31:05.616] envs[common]] [13:31:05.616] NAMES <- toupper(changed) [13:31:05.616] args <- list() [13:31:05.616] for (kk in seq_along(NAMES)) { [13:31:05.616] name <- changed[[kk]] [13:31:05.616] NAME <- NAMES[[kk]] [13:31:05.616] if (name != NAME && is.element(NAME, old_names)) [13:31:05.616] next [13:31:05.616] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.616] } [13:31:05.616] NAMES <- toupper(added) [13:31:05.616] for (kk in seq_along(NAMES)) { [13:31:05.616] name <- added[[kk]] [13:31:05.616] NAME <- NAMES[[kk]] [13:31:05.616] if (name != NAME && is.element(NAME, old_names)) [13:31:05.616] next [13:31:05.616] args[[name]] <- "" [13:31:05.616] } [13:31:05.616] NAMES <- toupper(removed) [13:31:05.616] for (kk in seq_along(NAMES)) { [13:31:05.616] name <- removed[[kk]] [13:31:05.616] NAME <- NAMES[[kk]] [13:31:05.616] if (name != NAME && is.element(NAME, old_names)) [13:31:05.616] next [13:31:05.616] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.616] } [13:31:05.616] if (length(args) > 0) [13:31:05.616] base::do.call(base::Sys.setenv, args = args) [13:31:05.616] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:05.616] } [13:31:05.616] else { [13:31:05.616] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:05.616] } [13:31:05.616] { [13:31:05.616] if (base::length(...future.futureOptionsAdded) > [13:31:05.616] 0L) { [13:31:05.616] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:05.616] base::names(opts) <- ...future.futureOptionsAdded [13:31:05.616] base::options(opts) [13:31:05.616] } [13:31:05.616] { [13:31:05.616] NULL [13:31:05.616] options(future.plan = NULL) [13:31:05.616] if (is.na(NA_character_)) [13:31:05.616] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.616] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:05.616] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:05.616] .init = FALSE) [13:31:05.616] } [13:31:05.616] } [13:31:05.616] } [13:31:05.616] }) [13:31:05.616] if (TRUE) { [13:31:05.616] base::sink(type = "output", split = FALSE) [13:31:05.616] if (TRUE) { [13:31:05.616] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:05.616] } [13:31:05.616] else { [13:31:05.616] ...future.result["stdout"] <- base::list(NULL) [13:31:05.616] } [13:31:05.616] base::close(...future.stdout) [13:31:05.616] ...future.stdout <- NULL [13:31:05.616] } [13:31:05.616] ...future.result$conditions <- ...future.conditions [13:31:05.616] ...future.result$finished <- base::Sys.time() [13:31:05.616] ...future.result [13:31:05.616] } [13:31:05.620] - Launch lazy future ... done [13:31:05.620] run() for 'MiraiFuture' ... done Call: lm(formula = dist ~ . + 0, data = cars) Coefficients: speed 2.909 [13:31:05.628] - Globals - lm(, data = cars) ... Call: lm(formula = dist ~ speed + speed^2, data = cars) Coefficients: (Intercept) speed -17.579 3.932 [13:31:05.629] getGlobalsAndPackages() ... [13:31:05.629] Searching for globals... [13:31:05.631] - globals found: [8] '{', 'lm', 'dist', '+', 'speed', '^', '~', 'cars' [13:31:05.631] Searching for globals ... DONE [13:31:05.631] Resolving globals: FALSE [13:31:05.632] [13:31:05.632] - packages: [2] 'stats', 'datasets' [13:31:05.632] getGlobalsAndPackages() ... DONE [13:31:05.633] run() for 'Future' ... [13:31:05.633] - state: 'created' [13:31:05.633] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:05.635] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:05.636] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:05.636] - Field: 'label' [13:31:05.636] - Field: 'local' [13:31:05.636] - Field: 'owner' [13:31:05.636] - Field: 'envir' [13:31:05.637] - Field: 'packages' [13:31:05.637] - Field: 'gc' [13:31:05.637] - Field: 'conditions' [13:31:05.637] - Field: 'expr' [13:31:05.637] - Field: 'uuid' [13:31:05.637] - Field: 'seed' [13:31:05.638] - Field: 'version' [13:31:05.638] - Field: 'result' [13:31:05.638] - Field: 'asynchronous' [13:31:05.638] - Field: 'calls' [13:31:05.638] - Field: 'globals' [13:31:05.638] - Field: 'stdout' [13:31:05.639] - Field: 'earlySignal' [13:31:05.639] - Field: 'lazy' [13:31:05.639] - Field: 'state' [13:31:05.639] - Field: '.cluster' [13:31:05.639] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:05.639] - Launch lazy future ... [13:31:05.640] Packages needed by the future expression (n = 2): 'stats', 'datasets' [13:31:05.640] Packages needed by future strategies (n = 0): [13:31:05.640] { [13:31:05.640] { [13:31:05.640] { [13:31:05.640] ...future.startTime <- base::Sys.time() [13:31:05.640] { [13:31:05.640] { [13:31:05.640] { [13:31:05.640] { [13:31:05.640] base::local({ [13:31:05.640] has_future <- base::requireNamespace("future", [13:31:05.640] quietly = TRUE) [13:31:05.640] if (has_future) { [13:31:05.640] ns <- base::getNamespace("future") [13:31:05.640] version <- ns[[".package"]][["version"]] [13:31:05.640] if (is.null(version)) [13:31:05.640] version <- utils::packageVersion("future") [13:31:05.640] } [13:31:05.640] else { [13:31:05.640] version <- NULL [13:31:05.640] } [13:31:05.640] if (!has_future || version < "1.8.0") { [13:31:05.640] info <- base::c(r_version = base::gsub("R version ", [13:31:05.640] "", base::R.version$version.string), [13:31:05.640] platform = base::sprintf("%s (%s-bit)", [13:31:05.640] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:05.640] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:05.640] "release", "version")], collapse = " "), [13:31:05.640] hostname = base::Sys.info()[["nodename"]]) [13:31:05.640] info <- base::sprintf("%s: %s", base::names(info), [13:31:05.640] info) [13:31:05.640] info <- base::paste(info, collapse = "; ") [13:31:05.640] if (!has_future) { [13:31:05.640] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:05.640] info) [13:31:05.640] } [13:31:05.640] else { [13:31:05.640] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:05.640] info, version) [13:31:05.640] } [13:31:05.640] base::stop(msg) [13:31:05.640] } [13:31:05.640] }) [13:31:05.640] } [13:31:05.640] base::local({ [13:31:05.640] for (pkg in c("stats", "datasets")) { [13:31:05.640] base::loadNamespace(pkg) [13:31:05.640] base::library(pkg, character.only = TRUE) [13:31:05.640] } [13:31:05.640] }) [13:31:05.640] } [13:31:05.640] ...future.strategy.old <- future::plan("list") [13:31:05.640] options(future.plan = NULL) [13:31:05.640] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.640] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:05.640] } [13:31:05.640] ...future.workdir <- getwd() [13:31:05.640] } [13:31:05.640] ...future.oldOptions <- base::as.list(base::.Options) [13:31:05.640] ...future.oldEnvVars <- base::Sys.getenv() [13:31:05.640] } [13:31:05.640] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:05.640] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:05.640] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:05.640] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:05.640] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:05.640] future.stdout.windows.reencode = NULL, width = 80L) [13:31:05.640] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:05.640] base::names(...future.oldOptions)) [13:31:05.640] } [13:31:05.640] if (FALSE) { [13:31:05.640] } [13:31:05.640] else { [13:31:05.640] if (TRUE) { [13:31:05.640] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:05.640] open = "w") [13:31:05.640] } [13:31:05.640] else { [13:31:05.640] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:05.640] windows = "NUL", "/dev/null"), open = "w") [13:31:05.640] } [13:31:05.640] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:05.640] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:05.640] base::sink(type = "output", split = FALSE) [13:31:05.640] base::close(...future.stdout) [13:31:05.640] }, add = TRUE) [13:31:05.640] } [13:31:05.640] ...future.frame <- base::sys.nframe() [13:31:05.640] ...future.conditions <- base::list() [13:31:05.640] ...future.rng <- base::globalenv()$.Random.seed [13:31:05.640] if (FALSE) { [13:31:05.640] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:05.640] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:05.640] } [13:31:05.640] ...future.result <- base::tryCatch({ [13:31:05.640] base::withCallingHandlers({ [13:31:05.640] ...future.value <- base::withVisible(base::local({ [13:31:05.640] lm(dist ~ speed + speed^2, data = cars) [13:31:05.640] })) [13:31:05.640] future::FutureResult(value = ...future.value$value, [13:31:05.640] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.640] ...future.rng), globalenv = if (FALSE) [13:31:05.640] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:05.640] ...future.globalenv.names)) [13:31:05.640] else NULL, started = ...future.startTime, version = "1.8") [13:31:05.640] }, condition = base::local({ [13:31:05.640] c <- base::c [13:31:05.640] inherits <- base::inherits [13:31:05.640] invokeRestart <- base::invokeRestart [13:31:05.640] length <- base::length [13:31:05.640] list <- base::list [13:31:05.640] seq.int <- base::seq.int [13:31:05.640] signalCondition <- base::signalCondition [13:31:05.640] sys.calls <- base::sys.calls [13:31:05.640] `[[` <- base::`[[` [13:31:05.640] `+` <- base::`+` [13:31:05.640] `<<-` <- base::`<<-` [13:31:05.640] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:05.640] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:05.640] 3L)] [13:31:05.640] } [13:31:05.640] function(cond) { [13:31:05.640] is_error <- inherits(cond, "error") [13:31:05.640] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:05.640] NULL) [13:31:05.640] if (is_error) { [13:31:05.640] sessionInformation <- function() { [13:31:05.640] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:05.640] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:05.640] search = base::search(), system = base::Sys.info()) [13:31:05.640] } [13:31:05.640] ...future.conditions[[length(...future.conditions) + [13:31:05.640] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:05.640] cond$call), session = sessionInformation(), [13:31:05.640] timestamp = base::Sys.time(), signaled = 0L) [13:31:05.640] signalCondition(cond) [13:31:05.640] } [13:31:05.640] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:05.640] signal <- FALSE && inherits(cond, character(0)) [13:31:05.640] ...future.conditions[[length(...future.conditions) + [13:31:05.640] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:05.640] if (FALSE && !signal) { [13:31:05.640] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.640] { [13:31:05.640] inherits <- base::inherits [13:31:05.640] invokeRestart <- base::invokeRestart [13:31:05.640] is.null <- base::is.null [13:31:05.640] muffled <- FALSE [13:31:05.640] if (inherits(cond, "message")) { [13:31:05.640] muffled <- grepl(pattern, "muffleMessage") [13:31:05.640] if (muffled) [13:31:05.640] invokeRestart("muffleMessage") [13:31:05.640] } [13:31:05.640] else if (inherits(cond, "warning")) { [13:31:05.640] muffled <- grepl(pattern, "muffleWarning") [13:31:05.640] if (muffled) [13:31:05.640] invokeRestart("muffleWarning") [13:31:05.640] } [13:31:05.640] else if (inherits(cond, "condition")) { [13:31:05.640] if (!is.null(pattern)) { [13:31:05.640] computeRestarts <- base::computeRestarts [13:31:05.640] grepl <- base::grepl [13:31:05.640] restarts <- computeRestarts(cond) [13:31:05.640] for (restart in restarts) { [13:31:05.640] name <- restart$name [13:31:05.640] if (is.null(name)) [13:31:05.640] next [13:31:05.640] if (!grepl(pattern, name)) [13:31:05.640] next [13:31:05.640] invokeRestart(restart) [13:31:05.640] muffled <- TRUE [13:31:05.640] break [13:31:05.640] } [13:31:05.640] } [13:31:05.640] } [13:31:05.640] invisible(muffled) [13:31:05.640] } [13:31:05.640] muffleCondition(cond, pattern = "^muffle") [13:31:05.640] } [13:31:05.640] } [13:31:05.640] else { [13:31:05.640] if (TRUE) { [13:31:05.640] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.640] { [13:31:05.640] inherits <- base::inherits [13:31:05.640] invokeRestart <- base::invokeRestart [13:31:05.640] is.null <- base::is.null [13:31:05.640] muffled <- FALSE [13:31:05.640] if (inherits(cond, "message")) { [13:31:05.640] muffled <- grepl(pattern, "muffleMessage") [13:31:05.640] if (muffled) [13:31:05.640] invokeRestart("muffleMessage") [13:31:05.640] } [13:31:05.640] else if (inherits(cond, "warning")) { [13:31:05.640] muffled <- grepl(pattern, "muffleWarning") [13:31:05.640] if (muffled) [13:31:05.640] invokeRestart("muffleWarning") [13:31:05.640] } [13:31:05.640] else if (inherits(cond, "condition")) { [13:31:05.640] if (!is.null(pattern)) { [13:31:05.640] computeRestarts <- base::computeRestarts [13:31:05.640] grepl <- base::grepl [13:31:05.640] restarts <- computeRestarts(cond) [13:31:05.640] for (restart in restarts) { [13:31:05.640] name <- restart$name [13:31:05.640] if (is.null(name)) [13:31:05.640] next [13:31:05.640] if (!grepl(pattern, name)) [13:31:05.640] next [13:31:05.640] invokeRestart(restart) [13:31:05.640] muffled <- TRUE [13:31:05.640] break [13:31:05.640] } [13:31:05.640] } [13:31:05.640] } [13:31:05.640] invisible(muffled) [13:31:05.640] } [13:31:05.640] muffleCondition(cond, pattern = "^muffle") [13:31:05.640] } [13:31:05.640] } [13:31:05.640] } [13:31:05.640] })) [13:31:05.640] }, error = function(ex) { [13:31:05.640] base::structure(base::list(value = NULL, visible = NULL, [13:31:05.640] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.640] ...future.rng), started = ...future.startTime, [13:31:05.640] finished = Sys.time(), session_uuid = NA_character_, [13:31:05.640] version = "1.8"), class = "FutureResult") [13:31:05.640] }, finally = { [13:31:05.640] if (!identical(...future.workdir, getwd())) [13:31:05.640] setwd(...future.workdir) [13:31:05.640] { [13:31:05.640] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:05.640] ...future.oldOptions$nwarnings <- NULL [13:31:05.640] } [13:31:05.640] base::options(...future.oldOptions) [13:31:05.640] if (.Platform$OS.type == "windows") { [13:31:05.640] old_names <- names(...future.oldEnvVars) [13:31:05.640] envs <- base::Sys.getenv() [13:31:05.640] names <- names(envs) [13:31:05.640] common <- intersect(names, old_names) [13:31:05.640] added <- setdiff(names, old_names) [13:31:05.640] removed <- setdiff(old_names, names) [13:31:05.640] changed <- common[...future.oldEnvVars[common] != [13:31:05.640] envs[common]] [13:31:05.640] NAMES <- toupper(changed) [13:31:05.640] args <- list() [13:31:05.640] for (kk in seq_along(NAMES)) { [13:31:05.640] name <- changed[[kk]] [13:31:05.640] NAME <- NAMES[[kk]] [13:31:05.640] if (name != NAME && is.element(NAME, old_names)) [13:31:05.640] next [13:31:05.640] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.640] } [13:31:05.640] NAMES <- toupper(added) [13:31:05.640] for (kk in seq_along(NAMES)) { [13:31:05.640] name <- added[[kk]] [13:31:05.640] NAME <- NAMES[[kk]] [13:31:05.640] if (name != NAME && is.element(NAME, old_names)) [13:31:05.640] next [13:31:05.640] args[[name]] <- "" [13:31:05.640] } [13:31:05.640] NAMES <- toupper(removed) [13:31:05.640] for (kk in seq_along(NAMES)) { [13:31:05.640] name <- removed[[kk]] [13:31:05.640] NAME <- NAMES[[kk]] [13:31:05.640] if (name != NAME && is.element(NAME, old_names)) [13:31:05.640] next [13:31:05.640] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.640] } [13:31:05.640] if (length(args) > 0) [13:31:05.640] base::do.call(base::Sys.setenv, args = args) [13:31:05.640] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:05.640] } [13:31:05.640] else { [13:31:05.640] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:05.640] } [13:31:05.640] { [13:31:05.640] if (base::length(...future.futureOptionsAdded) > [13:31:05.640] 0L) { [13:31:05.640] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:05.640] base::names(opts) <- ...future.futureOptionsAdded [13:31:05.640] base::options(opts) [13:31:05.640] } [13:31:05.640] { [13:31:05.640] NULL [13:31:05.640] options(future.plan = NULL) [13:31:05.640] if (is.na(NA_character_)) [13:31:05.640] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.640] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:05.640] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:05.640] .init = FALSE) [13:31:05.640] } [13:31:05.640] } [13:31:05.640] } [13:31:05.640] }) [13:31:05.640] if (TRUE) { [13:31:05.640] base::sink(type = "output", split = FALSE) [13:31:05.640] if (TRUE) { [13:31:05.640] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:05.640] } [13:31:05.640] else { [13:31:05.640] ...future.result["stdout"] <- base::list(NULL) [13:31:05.640] } [13:31:05.640] base::close(...future.stdout) [13:31:05.640] ...future.stdout <- NULL [13:31:05.640] } [13:31:05.640] ...future.result$conditions <- ...future.conditions [13:31:05.640] ...future.result$finished <- base::Sys.time() [13:31:05.640] ...future.result [13:31:05.640] } [13:31:05.644] - Launch lazy future ... done [13:31:05.644] run() for 'MiraiFuture' ... done Call: lm(formula = dist ~ speed + speed^2, data = cars) Coefficients: (Intercept) speed -17.579 3.932 [13:31:05.650] - 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 [13:31:05.651] getGlobalsAndPackages() ... [13:31:05.651] Searching for globals... [13:31:05.655] - globals found: [9] '{', 'lm', 'dist', '+', 'speed', 'I', '^', '~', 'cars' [13:31:05.655] Searching for globals ... DONE [13:31:05.655] Resolving globals: FALSE [13:31:05.656] [13:31:05.656] - packages: [2] 'stats', 'datasets' [13:31:05.656] getGlobalsAndPackages() ... DONE [13:31:05.657] run() for 'Future' ... [13:31:05.657] - state: 'created' [13:31:05.657] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:05.659] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:05.660] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:05.660] - Field: 'label' [13:31:05.660] - Field: 'local' [13:31:05.660] - Field: 'owner' [13:31:05.660] - Field: 'envir' [13:31:05.660] - Field: 'packages' [13:31:05.661] - Field: 'gc' [13:31:05.661] - Field: 'conditions' [13:31:05.661] - Field: 'expr' [13:31:05.661] - Field: 'uuid' [13:31:05.661] - Field: 'seed' [13:31:05.661] - Field: 'version' [13:31:05.662] - Field: 'result' [13:31:05.662] - Field: 'asynchronous' [13:31:05.662] - Field: 'calls' [13:31:05.662] - Field: 'globals' [13:31:05.662] - Field: 'stdout' [13:31:05.662] - Field: 'earlySignal' [13:31:05.663] - Field: 'lazy' [13:31:05.663] - Field: 'state' [13:31:05.663] - Field: '.cluster' [13:31:05.663] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:05.663] - Launch lazy future ... [13:31:05.663] Packages needed by the future expression (n = 2): 'stats', 'datasets' [13:31:05.664] Packages needed by future strategies (n = 0): [13:31:05.664] { [13:31:05.664] { [13:31:05.664] { [13:31:05.664] ...future.startTime <- base::Sys.time() [13:31:05.664] { [13:31:05.664] { [13:31:05.664] { [13:31:05.664] { [13:31:05.664] base::local({ [13:31:05.664] has_future <- base::requireNamespace("future", [13:31:05.664] quietly = TRUE) [13:31:05.664] if (has_future) { [13:31:05.664] ns <- base::getNamespace("future") [13:31:05.664] version <- ns[[".package"]][["version"]] [13:31:05.664] if (is.null(version)) [13:31:05.664] version <- utils::packageVersion("future") [13:31:05.664] } [13:31:05.664] else { [13:31:05.664] version <- NULL [13:31:05.664] } [13:31:05.664] if (!has_future || version < "1.8.0") { [13:31:05.664] info <- base::c(r_version = base::gsub("R version ", [13:31:05.664] "", base::R.version$version.string), [13:31:05.664] platform = base::sprintf("%s (%s-bit)", [13:31:05.664] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:05.664] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:05.664] "release", "version")], collapse = " "), [13:31:05.664] hostname = base::Sys.info()[["nodename"]]) [13:31:05.664] info <- base::sprintf("%s: %s", base::names(info), [13:31:05.664] info) [13:31:05.664] info <- base::paste(info, collapse = "; ") [13:31:05.664] if (!has_future) { [13:31:05.664] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:05.664] info) [13:31:05.664] } [13:31:05.664] else { [13:31:05.664] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:05.664] info, version) [13:31:05.664] } [13:31:05.664] base::stop(msg) [13:31:05.664] } [13:31:05.664] }) [13:31:05.664] } [13:31:05.664] base::local({ [13:31:05.664] for (pkg in c("stats", "datasets")) { [13:31:05.664] base::loadNamespace(pkg) [13:31:05.664] base::library(pkg, character.only = TRUE) [13:31:05.664] } [13:31:05.664] }) [13:31:05.664] } [13:31:05.664] ...future.strategy.old <- future::plan("list") [13:31:05.664] options(future.plan = NULL) [13:31:05.664] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.664] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:05.664] } [13:31:05.664] ...future.workdir <- getwd() [13:31:05.664] } [13:31:05.664] ...future.oldOptions <- base::as.list(base::.Options) [13:31:05.664] ...future.oldEnvVars <- base::Sys.getenv() [13:31:05.664] } [13:31:05.664] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:05.664] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:05.664] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:05.664] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:05.664] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:05.664] future.stdout.windows.reencode = NULL, width = 80L) [13:31:05.664] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:05.664] base::names(...future.oldOptions)) [13:31:05.664] } [13:31:05.664] if (FALSE) { [13:31:05.664] } [13:31:05.664] else { [13:31:05.664] if (TRUE) { [13:31:05.664] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:05.664] open = "w") [13:31:05.664] } [13:31:05.664] else { [13:31:05.664] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:05.664] windows = "NUL", "/dev/null"), open = "w") [13:31:05.664] } [13:31:05.664] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:05.664] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:05.664] base::sink(type = "output", split = FALSE) [13:31:05.664] base::close(...future.stdout) [13:31:05.664] }, add = TRUE) [13:31:05.664] } [13:31:05.664] ...future.frame <- base::sys.nframe() [13:31:05.664] ...future.conditions <- base::list() [13:31:05.664] ...future.rng <- base::globalenv()$.Random.seed [13:31:05.664] if (FALSE) { [13:31:05.664] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:05.664] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:05.664] } [13:31:05.664] ...future.result <- base::tryCatch({ [13:31:05.664] base::withCallingHandlers({ [13:31:05.664] ...future.value <- base::withVisible(base::local({ [13:31:05.664] lm(dist ~ speed + I(speed^2), data = cars) [13:31:05.664] })) [13:31:05.664] future::FutureResult(value = ...future.value$value, [13:31:05.664] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.664] ...future.rng), globalenv = if (FALSE) [13:31:05.664] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:05.664] ...future.globalenv.names)) [13:31:05.664] else NULL, started = ...future.startTime, version = "1.8") [13:31:05.664] }, condition = base::local({ [13:31:05.664] c <- base::c [13:31:05.664] inherits <- base::inherits [13:31:05.664] invokeRestart <- base::invokeRestart [13:31:05.664] length <- base::length [13:31:05.664] list <- base::list [13:31:05.664] seq.int <- base::seq.int [13:31:05.664] signalCondition <- base::signalCondition [13:31:05.664] sys.calls <- base::sys.calls [13:31:05.664] `[[` <- base::`[[` [13:31:05.664] `+` <- base::`+` [13:31:05.664] `<<-` <- base::`<<-` [13:31:05.664] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:05.664] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:05.664] 3L)] [13:31:05.664] } [13:31:05.664] function(cond) { [13:31:05.664] is_error <- inherits(cond, "error") [13:31:05.664] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:05.664] NULL) [13:31:05.664] if (is_error) { [13:31:05.664] sessionInformation <- function() { [13:31:05.664] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:05.664] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:05.664] search = base::search(), system = base::Sys.info()) [13:31:05.664] } [13:31:05.664] ...future.conditions[[length(...future.conditions) + [13:31:05.664] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:05.664] cond$call), session = sessionInformation(), [13:31:05.664] timestamp = base::Sys.time(), signaled = 0L) [13:31:05.664] signalCondition(cond) [13:31:05.664] } [13:31:05.664] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:05.664] signal <- FALSE && inherits(cond, character(0)) [13:31:05.664] ...future.conditions[[length(...future.conditions) + [13:31:05.664] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:05.664] if (FALSE && !signal) { [13:31:05.664] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.664] { [13:31:05.664] inherits <- base::inherits [13:31:05.664] invokeRestart <- base::invokeRestart [13:31:05.664] is.null <- base::is.null [13:31:05.664] muffled <- FALSE [13:31:05.664] if (inherits(cond, "message")) { [13:31:05.664] muffled <- grepl(pattern, "muffleMessage") [13:31:05.664] if (muffled) [13:31:05.664] invokeRestart("muffleMessage") [13:31:05.664] } [13:31:05.664] else if (inherits(cond, "warning")) { [13:31:05.664] muffled <- grepl(pattern, "muffleWarning") [13:31:05.664] if (muffled) [13:31:05.664] invokeRestart("muffleWarning") [13:31:05.664] } [13:31:05.664] else if (inherits(cond, "condition")) { [13:31:05.664] if (!is.null(pattern)) { [13:31:05.664] computeRestarts <- base::computeRestarts [13:31:05.664] grepl <- base::grepl [13:31:05.664] restarts <- computeRestarts(cond) [13:31:05.664] for (restart in restarts) { [13:31:05.664] name <- restart$name [13:31:05.664] if (is.null(name)) [13:31:05.664] next [13:31:05.664] if (!grepl(pattern, name)) [13:31:05.664] next [13:31:05.664] invokeRestart(restart) [13:31:05.664] muffled <- TRUE [13:31:05.664] break [13:31:05.664] } [13:31:05.664] } [13:31:05.664] } [13:31:05.664] invisible(muffled) [13:31:05.664] } [13:31:05.664] muffleCondition(cond, pattern = "^muffle") [13:31:05.664] } [13:31:05.664] } [13:31:05.664] else { [13:31:05.664] if (TRUE) { [13:31:05.664] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.664] { [13:31:05.664] inherits <- base::inherits [13:31:05.664] invokeRestart <- base::invokeRestart [13:31:05.664] is.null <- base::is.null [13:31:05.664] muffled <- FALSE [13:31:05.664] if (inherits(cond, "message")) { [13:31:05.664] muffled <- grepl(pattern, "muffleMessage") [13:31:05.664] if (muffled) [13:31:05.664] invokeRestart("muffleMessage") [13:31:05.664] } [13:31:05.664] else if (inherits(cond, "warning")) { [13:31:05.664] muffled <- grepl(pattern, "muffleWarning") [13:31:05.664] if (muffled) [13:31:05.664] invokeRestart("muffleWarning") [13:31:05.664] } [13:31:05.664] else if (inherits(cond, "condition")) { [13:31:05.664] if (!is.null(pattern)) { [13:31:05.664] computeRestarts <- base::computeRestarts [13:31:05.664] grepl <- base::grepl [13:31:05.664] restarts <- computeRestarts(cond) [13:31:05.664] for (restart in restarts) { [13:31:05.664] name <- restart$name [13:31:05.664] if (is.null(name)) [13:31:05.664] next [13:31:05.664] if (!grepl(pattern, name)) [13:31:05.664] next [13:31:05.664] invokeRestart(restart) [13:31:05.664] muffled <- TRUE [13:31:05.664] break [13:31:05.664] } [13:31:05.664] } [13:31:05.664] } [13:31:05.664] invisible(muffled) [13:31:05.664] } [13:31:05.664] muffleCondition(cond, pattern = "^muffle") [13:31:05.664] } [13:31:05.664] } [13:31:05.664] } [13:31:05.664] })) [13:31:05.664] }, error = function(ex) { [13:31:05.664] base::structure(base::list(value = NULL, visible = NULL, [13:31:05.664] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.664] ...future.rng), started = ...future.startTime, [13:31:05.664] finished = Sys.time(), session_uuid = NA_character_, [13:31:05.664] version = "1.8"), class = "FutureResult") [13:31:05.664] }, finally = { [13:31:05.664] if (!identical(...future.workdir, getwd())) [13:31:05.664] setwd(...future.workdir) [13:31:05.664] { [13:31:05.664] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:05.664] ...future.oldOptions$nwarnings <- NULL [13:31:05.664] } [13:31:05.664] base::options(...future.oldOptions) [13:31:05.664] if (.Platform$OS.type == "windows") { [13:31:05.664] old_names <- names(...future.oldEnvVars) [13:31:05.664] envs <- base::Sys.getenv() [13:31:05.664] names <- names(envs) [13:31:05.664] common <- intersect(names, old_names) [13:31:05.664] added <- setdiff(names, old_names) [13:31:05.664] removed <- setdiff(old_names, names) [13:31:05.664] changed <- common[...future.oldEnvVars[common] != [13:31:05.664] envs[common]] [13:31:05.664] NAMES <- toupper(changed) [13:31:05.664] args <- list() [13:31:05.664] for (kk in seq_along(NAMES)) { [13:31:05.664] name <- changed[[kk]] [13:31:05.664] NAME <- NAMES[[kk]] [13:31:05.664] if (name != NAME && is.element(NAME, old_names)) [13:31:05.664] next [13:31:05.664] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.664] } [13:31:05.664] NAMES <- toupper(added) [13:31:05.664] for (kk in seq_along(NAMES)) { [13:31:05.664] name <- added[[kk]] [13:31:05.664] NAME <- NAMES[[kk]] [13:31:05.664] if (name != NAME && is.element(NAME, old_names)) [13:31:05.664] next [13:31:05.664] args[[name]] <- "" [13:31:05.664] } [13:31:05.664] NAMES <- toupper(removed) [13:31:05.664] for (kk in seq_along(NAMES)) { [13:31:05.664] name <- removed[[kk]] [13:31:05.664] NAME <- NAMES[[kk]] [13:31:05.664] if (name != NAME && is.element(NAME, old_names)) [13:31:05.664] next [13:31:05.664] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.664] } [13:31:05.664] if (length(args) > 0) [13:31:05.664] base::do.call(base::Sys.setenv, args = args) [13:31:05.664] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:05.664] } [13:31:05.664] else { [13:31:05.664] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:05.664] } [13:31:05.664] { [13:31:05.664] if (base::length(...future.futureOptionsAdded) > [13:31:05.664] 0L) { [13:31:05.664] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:05.664] base::names(opts) <- ...future.futureOptionsAdded [13:31:05.664] base::options(opts) [13:31:05.664] } [13:31:05.664] { [13:31:05.664] NULL [13:31:05.664] options(future.plan = NULL) [13:31:05.664] if (is.na(NA_character_)) [13:31:05.664] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.664] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:05.664] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:05.664] .init = FALSE) [13:31:05.664] } [13:31:05.664] } [13:31:05.664] } [13:31:05.664] }) [13:31:05.664] if (TRUE) { [13:31:05.664] base::sink(type = "output", split = FALSE) [13:31:05.664] if (TRUE) { [13:31:05.664] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:05.664] } [13:31:05.664] else { [13:31:05.664] ...future.result["stdout"] <- base::list(NULL) [13:31:05.664] } [13:31:05.664] base::close(...future.stdout) [13:31:05.664] ...future.stdout <- NULL [13:31:05.664] } [13:31:05.664] ...future.result$conditions <- ...future.conditions [13:31:05.664] ...future.result$finished <- base::Sys.time() [13:31:05.664] ...future.result [13:31:05.664] } [13:31:05.668] - Launch lazy future ... done [13:31:05.669] 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 [13:31:05.677] - 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 [13:31:05.679] getGlobalsAndPackages() ... [13:31:05.679] Searching for globals... [13:31:05.681] - globals found: [7] '{', 'lm', 'dist', 'poly', 'speed', '~', 'cars' [13:31:05.681] Searching for globals ... DONE [13:31:05.681] Resolving globals: FALSE [13:31:05.682] [13:31:05.682] - packages: [2] 'stats', 'datasets' [13:31:05.682] getGlobalsAndPackages() ... DONE [13:31:05.683] run() for 'Future' ... [13:31:05.683] - state: 'created' [13:31:05.683] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:05.722] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:05.722] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:05.722] - Field: 'label' [13:31:05.722] - Field: 'local' [13:31:05.722] - Field: 'owner' [13:31:05.723] - Field: 'envir' [13:31:05.723] - Field: 'packages' [13:31:05.723] - Field: 'gc' [13:31:05.723] - Field: 'conditions' [13:31:05.723] - Field: 'expr' [13:31:05.724] - Field: 'uuid' [13:31:05.724] - Field: 'seed' [13:31:05.724] - Field: 'version' [13:31:05.724] - Field: 'result' [13:31:05.724] - Field: 'asynchronous' [13:31:05.725] - Field: 'calls' [13:31:05.725] - Field: 'globals' [13:31:05.725] - Field: 'stdout' [13:31:05.725] - Field: 'earlySignal' [13:31:05.725] - Field: 'lazy' [13:31:05.725] - Field: 'state' [13:31:05.726] - Field: '.cluster' [13:31:05.726] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:05.726] - Launch lazy future ... [13:31:05.726] Packages needed by the future expression (n = 2): 'stats', 'datasets' [13:31:05.726] Packages needed by future strategies (n = 0): [13:31:05.727] { [13:31:05.727] { [13:31:05.727] { [13:31:05.727] ...future.startTime <- base::Sys.time() [13:31:05.727] { [13:31:05.727] { [13:31:05.727] { [13:31:05.727] { [13:31:05.727] base::local({ [13:31:05.727] has_future <- base::requireNamespace("future", [13:31:05.727] quietly = TRUE) [13:31:05.727] if (has_future) { [13:31:05.727] ns <- base::getNamespace("future") [13:31:05.727] version <- ns[[".package"]][["version"]] [13:31:05.727] if (is.null(version)) [13:31:05.727] version <- utils::packageVersion("future") [13:31:05.727] } [13:31:05.727] else { [13:31:05.727] version <- NULL [13:31:05.727] } [13:31:05.727] if (!has_future || version < "1.8.0") { [13:31:05.727] info <- base::c(r_version = base::gsub("R version ", [13:31:05.727] "", base::R.version$version.string), [13:31:05.727] platform = base::sprintf("%s (%s-bit)", [13:31:05.727] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:05.727] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:05.727] "release", "version")], collapse = " "), [13:31:05.727] hostname = base::Sys.info()[["nodename"]]) [13:31:05.727] info <- base::sprintf("%s: %s", base::names(info), [13:31:05.727] info) [13:31:05.727] info <- base::paste(info, collapse = "; ") [13:31:05.727] if (!has_future) { [13:31:05.727] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:05.727] info) [13:31:05.727] } [13:31:05.727] else { [13:31:05.727] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:05.727] info, version) [13:31:05.727] } [13:31:05.727] base::stop(msg) [13:31:05.727] } [13:31:05.727] }) [13:31:05.727] } [13:31:05.727] base::local({ [13:31:05.727] for (pkg in c("stats", "datasets")) { [13:31:05.727] base::loadNamespace(pkg) [13:31:05.727] base::library(pkg, character.only = TRUE) [13:31:05.727] } [13:31:05.727] }) [13:31:05.727] } [13:31:05.727] ...future.strategy.old <- future::plan("list") [13:31:05.727] options(future.plan = NULL) [13:31:05.727] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.727] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:05.727] } [13:31:05.727] ...future.workdir <- getwd() [13:31:05.727] } [13:31:05.727] ...future.oldOptions <- base::as.list(base::.Options) [13:31:05.727] ...future.oldEnvVars <- base::Sys.getenv() [13:31:05.727] } [13:31:05.727] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:05.727] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:05.727] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:05.727] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:05.727] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:05.727] future.stdout.windows.reencode = NULL, width = 80L) [13:31:05.727] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:05.727] base::names(...future.oldOptions)) [13:31:05.727] } [13:31:05.727] if (FALSE) { [13:31:05.727] } [13:31:05.727] else { [13:31:05.727] if (TRUE) { [13:31:05.727] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:05.727] open = "w") [13:31:05.727] } [13:31:05.727] else { [13:31:05.727] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:05.727] windows = "NUL", "/dev/null"), open = "w") [13:31:05.727] } [13:31:05.727] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:05.727] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:05.727] base::sink(type = "output", split = FALSE) [13:31:05.727] base::close(...future.stdout) [13:31:05.727] }, add = TRUE) [13:31:05.727] } [13:31:05.727] ...future.frame <- base::sys.nframe() [13:31:05.727] ...future.conditions <- base::list() [13:31:05.727] ...future.rng <- base::globalenv()$.Random.seed [13:31:05.727] if (FALSE) { [13:31:05.727] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:05.727] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:05.727] } [13:31:05.727] ...future.result <- base::tryCatch({ [13:31:05.727] base::withCallingHandlers({ [13:31:05.727] ...future.value <- base::withVisible(base::local({ [13:31:05.727] lm(dist ~ poly(speed, 2), data = cars) [13:31:05.727] })) [13:31:05.727] future::FutureResult(value = ...future.value$value, [13:31:05.727] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.727] ...future.rng), globalenv = if (FALSE) [13:31:05.727] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:05.727] ...future.globalenv.names)) [13:31:05.727] else NULL, started = ...future.startTime, version = "1.8") [13:31:05.727] }, condition = base::local({ [13:31:05.727] c <- base::c [13:31:05.727] inherits <- base::inherits [13:31:05.727] invokeRestart <- base::invokeRestart [13:31:05.727] length <- base::length [13:31:05.727] list <- base::list [13:31:05.727] seq.int <- base::seq.int [13:31:05.727] signalCondition <- base::signalCondition [13:31:05.727] sys.calls <- base::sys.calls [13:31:05.727] `[[` <- base::`[[` [13:31:05.727] `+` <- base::`+` [13:31:05.727] `<<-` <- base::`<<-` [13:31:05.727] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:05.727] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:05.727] 3L)] [13:31:05.727] } [13:31:05.727] function(cond) { [13:31:05.727] is_error <- inherits(cond, "error") [13:31:05.727] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:05.727] NULL) [13:31:05.727] if (is_error) { [13:31:05.727] sessionInformation <- function() { [13:31:05.727] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:05.727] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:05.727] search = base::search(), system = base::Sys.info()) [13:31:05.727] } [13:31:05.727] ...future.conditions[[length(...future.conditions) + [13:31:05.727] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:05.727] cond$call), session = sessionInformation(), [13:31:05.727] timestamp = base::Sys.time(), signaled = 0L) [13:31:05.727] signalCondition(cond) [13:31:05.727] } [13:31:05.727] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:05.727] signal <- FALSE && inherits(cond, character(0)) [13:31:05.727] ...future.conditions[[length(...future.conditions) + [13:31:05.727] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:05.727] if (FALSE && !signal) { [13:31:05.727] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.727] { [13:31:05.727] inherits <- base::inherits [13:31:05.727] invokeRestart <- base::invokeRestart [13:31:05.727] is.null <- base::is.null [13:31:05.727] muffled <- FALSE [13:31:05.727] if (inherits(cond, "message")) { [13:31:05.727] muffled <- grepl(pattern, "muffleMessage") [13:31:05.727] if (muffled) [13:31:05.727] invokeRestart("muffleMessage") [13:31:05.727] } [13:31:05.727] else if (inherits(cond, "warning")) { [13:31:05.727] muffled <- grepl(pattern, "muffleWarning") [13:31:05.727] if (muffled) [13:31:05.727] invokeRestart("muffleWarning") [13:31:05.727] } [13:31:05.727] else if (inherits(cond, "condition")) { [13:31:05.727] if (!is.null(pattern)) { [13:31:05.727] computeRestarts <- base::computeRestarts [13:31:05.727] grepl <- base::grepl [13:31:05.727] restarts <- computeRestarts(cond) [13:31:05.727] for (restart in restarts) { [13:31:05.727] name <- restart$name [13:31:05.727] if (is.null(name)) [13:31:05.727] next [13:31:05.727] if (!grepl(pattern, name)) [13:31:05.727] next [13:31:05.727] invokeRestart(restart) [13:31:05.727] muffled <- TRUE [13:31:05.727] break [13:31:05.727] } [13:31:05.727] } [13:31:05.727] } [13:31:05.727] invisible(muffled) [13:31:05.727] } [13:31:05.727] muffleCondition(cond, pattern = "^muffle") [13:31:05.727] } [13:31:05.727] } [13:31:05.727] else { [13:31:05.727] if (TRUE) { [13:31:05.727] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.727] { [13:31:05.727] inherits <- base::inherits [13:31:05.727] invokeRestart <- base::invokeRestart [13:31:05.727] is.null <- base::is.null [13:31:05.727] muffled <- FALSE [13:31:05.727] if (inherits(cond, "message")) { [13:31:05.727] muffled <- grepl(pattern, "muffleMessage") [13:31:05.727] if (muffled) [13:31:05.727] invokeRestart("muffleMessage") [13:31:05.727] } [13:31:05.727] else if (inherits(cond, "warning")) { [13:31:05.727] muffled <- grepl(pattern, "muffleWarning") [13:31:05.727] if (muffled) [13:31:05.727] invokeRestart("muffleWarning") [13:31:05.727] } [13:31:05.727] else if (inherits(cond, "condition")) { [13:31:05.727] if (!is.null(pattern)) { [13:31:05.727] computeRestarts <- base::computeRestarts [13:31:05.727] grepl <- base::grepl [13:31:05.727] restarts <- computeRestarts(cond) [13:31:05.727] for (restart in restarts) { [13:31:05.727] name <- restart$name [13:31:05.727] if (is.null(name)) [13:31:05.727] next [13:31:05.727] if (!grepl(pattern, name)) [13:31:05.727] next [13:31:05.727] invokeRestart(restart) [13:31:05.727] muffled <- TRUE [13:31:05.727] break [13:31:05.727] } [13:31:05.727] } [13:31:05.727] } [13:31:05.727] invisible(muffled) [13:31:05.727] } [13:31:05.727] muffleCondition(cond, pattern = "^muffle") [13:31:05.727] } [13:31:05.727] } [13:31:05.727] } [13:31:05.727] })) [13:31:05.727] }, error = function(ex) { [13:31:05.727] base::structure(base::list(value = NULL, visible = NULL, [13:31:05.727] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.727] ...future.rng), started = ...future.startTime, [13:31:05.727] finished = Sys.time(), session_uuid = NA_character_, [13:31:05.727] version = "1.8"), class = "FutureResult") [13:31:05.727] }, finally = { [13:31:05.727] if (!identical(...future.workdir, getwd())) [13:31:05.727] setwd(...future.workdir) [13:31:05.727] { [13:31:05.727] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:05.727] ...future.oldOptions$nwarnings <- NULL [13:31:05.727] } [13:31:05.727] base::options(...future.oldOptions) [13:31:05.727] if (.Platform$OS.type == "windows") { [13:31:05.727] old_names <- names(...future.oldEnvVars) [13:31:05.727] envs <- base::Sys.getenv() [13:31:05.727] names <- names(envs) [13:31:05.727] common <- intersect(names, old_names) [13:31:05.727] added <- setdiff(names, old_names) [13:31:05.727] removed <- setdiff(old_names, names) [13:31:05.727] changed <- common[...future.oldEnvVars[common] != [13:31:05.727] envs[common]] [13:31:05.727] NAMES <- toupper(changed) [13:31:05.727] args <- list() [13:31:05.727] for (kk in seq_along(NAMES)) { [13:31:05.727] name <- changed[[kk]] [13:31:05.727] NAME <- NAMES[[kk]] [13:31:05.727] if (name != NAME && is.element(NAME, old_names)) [13:31:05.727] next [13:31:05.727] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.727] } [13:31:05.727] NAMES <- toupper(added) [13:31:05.727] for (kk in seq_along(NAMES)) { [13:31:05.727] name <- added[[kk]] [13:31:05.727] NAME <- NAMES[[kk]] [13:31:05.727] if (name != NAME && is.element(NAME, old_names)) [13:31:05.727] next [13:31:05.727] args[[name]] <- "" [13:31:05.727] } [13:31:05.727] NAMES <- toupper(removed) [13:31:05.727] for (kk in seq_along(NAMES)) { [13:31:05.727] name <- removed[[kk]] [13:31:05.727] NAME <- NAMES[[kk]] [13:31:05.727] if (name != NAME && is.element(NAME, old_names)) [13:31:05.727] next [13:31:05.727] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.727] } [13:31:05.727] if (length(args) > 0) [13:31:05.727] base::do.call(base::Sys.setenv, args = args) [13:31:05.727] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:05.727] } [13:31:05.727] else { [13:31:05.727] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:05.727] } [13:31:05.727] { [13:31:05.727] if (base::length(...future.futureOptionsAdded) > [13:31:05.727] 0L) { [13:31:05.727] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:05.727] base::names(opts) <- ...future.futureOptionsAdded [13:31:05.727] base::options(opts) [13:31:05.727] } [13:31:05.727] { [13:31:05.727] NULL [13:31:05.727] options(future.plan = NULL) [13:31:05.727] if (is.na(NA_character_)) [13:31:05.727] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.727] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:05.727] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:05.727] .init = FALSE) [13:31:05.727] } [13:31:05.727] } [13:31:05.727] } [13:31:05.727] }) [13:31:05.727] if (TRUE) { [13:31:05.727] base::sink(type = "output", split = FALSE) [13:31:05.727] if (TRUE) { [13:31:05.727] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:05.727] } [13:31:05.727] else { [13:31:05.727] ...future.result["stdout"] <- base::list(NULL) [13:31:05.727] } [13:31:05.727] base::close(...future.stdout) [13:31:05.727] ...future.stdout <- NULL [13:31:05.727] } [13:31:05.727] ...future.result$conditions <- ...future.conditions [13:31:05.727] ...future.result$finished <- base::Sys.time() [13:31:05.727] ...future.result [13:31:05.727] } [13:31:05.731] - Launch lazy future ... done [13:31:05.731] 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)) + } [13:31:05.746] getGlobalsAndPackages() ... [13:31:05.746] Searching for globals... [13:31:05.752] - globals found: [16] '{', 'outer_function', 'map', ':', '~', 'inner_function', '.x', 'if', 'inherits', '<-', '[[', '-', 'eval', 'bquote', 'lapply', '+' [13:31:05.752] Searching for globals ... DONE [13:31:05.752] Resolving globals: FALSE [13:31:05.753] The total size of the 3 globals is 7.52 KiB (7704 bytes) [13:31:05.754] 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') [13:31:05.754] - globals: [3] 'outer_function', 'map', 'inner_function' [13:31:05.754] [13:31:05.754] getGlobalsAndPackages() ... DONE [13:31:05.755] run() for 'Future' ... [13:31:05.755] - state: 'created' [13:31:05.756] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:05.759] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:05.759] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:05.759] - Field: 'label' [13:31:05.759] - Field: 'local' [13:31:05.759] - Field: 'owner' [13:31:05.759] - Field: 'envir' [13:31:05.760] - Field: 'packages' [13:31:05.760] - Field: 'gc' [13:31:05.760] - Field: 'conditions' [13:31:05.760] - Field: 'expr' [13:31:05.760] - Field: 'uuid' [13:31:05.760] - Field: 'seed' [13:31:05.761] - Field: 'version' [13:31:05.761] - Field: 'result' [13:31:05.761] - Field: 'asynchronous' [13:31:05.761] - Field: 'calls' [13:31:05.761] - Field: 'globals' [13:31:05.762] - Field: 'stdout' [13:31:05.762] - Field: 'earlySignal' [13:31:05.762] - Field: 'lazy' [13:31:05.762] - Field: 'state' [13:31:05.762] - Field: '.cluster' [13:31:05.762] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:05.763] - Launch lazy future ... [13:31:05.763] Packages needed by the future expression (n = 0): [13:31:05.763] Packages needed by future strategies (n = 0): [13:31:05.763] { [13:31:05.763] { [13:31:05.763] { [13:31:05.763] ...future.startTime <- base::Sys.time() [13:31:05.763] { [13:31:05.763] { [13:31:05.763] { [13:31:05.763] base::local({ [13:31:05.763] has_future <- base::requireNamespace("future", [13:31:05.763] quietly = TRUE) [13:31:05.763] if (has_future) { [13:31:05.763] ns <- base::getNamespace("future") [13:31:05.763] version <- ns[[".package"]][["version"]] [13:31:05.763] if (is.null(version)) [13:31:05.763] version <- utils::packageVersion("future") [13:31:05.763] } [13:31:05.763] else { [13:31:05.763] version <- NULL [13:31:05.763] } [13:31:05.763] if (!has_future || version < "1.8.0") { [13:31:05.763] info <- base::c(r_version = base::gsub("R version ", [13:31:05.763] "", base::R.version$version.string), [13:31:05.763] platform = base::sprintf("%s (%s-bit)", [13:31:05.763] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:05.763] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:05.763] "release", "version")], collapse = " "), [13:31:05.763] hostname = base::Sys.info()[["nodename"]]) [13:31:05.763] info <- base::sprintf("%s: %s", base::names(info), [13:31:05.763] info) [13:31:05.763] info <- base::paste(info, collapse = "; ") [13:31:05.763] if (!has_future) { [13:31:05.763] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:05.763] info) [13:31:05.763] } [13:31:05.763] else { [13:31:05.763] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:05.763] info, version) [13:31:05.763] } [13:31:05.763] base::stop(msg) [13:31:05.763] } [13:31:05.763] }) [13:31:05.763] } [13:31:05.763] ...future.strategy.old <- future::plan("list") [13:31:05.763] options(future.plan = NULL) [13:31:05.763] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.763] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:05.763] } [13:31:05.763] ...future.workdir <- getwd() [13:31:05.763] } [13:31:05.763] ...future.oldOptions <- base::as.list(base::.Options) [13:31:05.763] ...future.oldEnvVars <- base::Sys.getenv() [13:31:05.763] } [13:31:05.763] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:05.763] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:05.763] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:05.763] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:05.763] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:05.763] future.stdout.windows.reencode = NULL, width = 80L) [13:31:05.763] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:05.763] base::names(...future.oldOptions)) [13:31:05.763] } [13:31:05.763] if (FALSE) { [13:31:05.763] } [13:31:05.763] else { [13:31:05.763] if (TRUE) { [13:31:05.763] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:05.763] open = "w") [13:31:05.763] } [13:31:05.763] else { [13:31:05.763] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:05.763] windows = "NUL", "/dev/null"), open = "w") [13:31:05.763] } [13:31:05.763] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:05.763] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:05.763] base::sink(type = "output", split = FALSE) [13:31:05.763] base::close(...future.stdout) [13:31:05.763] }, add = TRUE) [13:31:05.763] } [13:31:05.763] ...future.frame <- base::sys.nframe() [13:31:05.763] ...future.conditions <- base::list() [13:31:05.763] ...future.rng <- base::globalenv()$.Random.seed [13:31:05.763] if (FALSE) { [13:31:05.763] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:05.763] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:05.763] } [13:31:05.763] ...future.result <- base::tryCatch({ [13:31:05.763] base::withCallingHandlers({ [13:31:05.763] ...future.value <- base::withVisible(base::local({ [13:31:05.763] outer_function(1L) [13:31:05.763] })) [13:31:05.763] future::FutureResult(value = ...future.value$value, [13:31:05.763] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.763] ...future.rng), globalenv = if (FALSE) [13:31:05.763] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:05.763] ...future.globalenv.names)) [13:31:05.763] else NULL, started = ...future.startTime, version = "1.8") [13:31:05.763] }, condition = base::local({ [13:31:05.763] c <- base::c [13:31:05.763] inherits <- base::inherits [13:31:05.763] invokeRestart <- base::invokeRestart [13:31:05.763] length <- base::length [13:31:05.763] list <- base::list [13:31:05.763] seq.int <- base::seq.int [13:31:05.763] signalCondition <- base::signalCondition [13:31:05.763] sys.calls <- base::sys.calls [13:31:05.763] `[[` <- base::`[[` [13:31:05.763] `+` <- base::`+` [13:31:05.763] `<<-` <- base::`<<-` [13:31:05.763] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:05.763] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:05.763] 3L)] [13:31:05.763] } [13:31:05.763] function(cond) { [13:31:05.763] is_error <- inherits(cond, "error") [13:31:05.763] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:05.763] NULL) [13:31:05.763] if (is_error) { [13:31:05.763] sessionInformation <- function() { [13:31:05.763] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:05.763] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:05.763] search = base::search(), system = base::Sys.info()) [13:31:05.763] } [13:31:05.763] ...future.conditions[[length(...future.conditions) + [13:31:05.763] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:05.763] cond$call), session = sessionInformation(), [13:31:05.763] timestamp = base::Sys.time(), signaled = 0L) [13:31:05.763] signalCondition(cond) [13:31:05.763] } [13:31:05.763] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:05.763] signal <- FALSE && inherits(cond, character(0)) [13:31:05.763] ...future.conditions[[length(...future.conditions) + [13:31:05.763] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:05.763] if (FALSE && !signal) { [13:31:05.763] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.763] { [13:31:05.763] inherits <- base::inherits [13:31:05.763] invokeRestart <- base::invokeRestart [13:31:05.763] is.null <- base::is.null [13:31:05.763] muffled <- FALSE [13:31:05.763] if (inherits(cond, "message")) { [13:31:05.763] muffled <- grepl(pattern, "muffleMessage") [13:31:05.763] if (muffled) [13:31:05.763] invokeRestart("muffleMessage") [13:31:05.763] } [13:31:05.763] else if (inherits(cond, "warning")) { [13:31:05.763] muffled <- grepl(pattern, "muffleWarning") [13:31:05.763] if (muffled) [13:31:05.763] invokeRestart("muffleWarning") [13:31:05.763] } [13:31:05.763] else if (inherits(cond, "condition")) { [13:31:05.763] if (!is.null(pattern)) { [13:31:05.763] computeRestarts <- base::computeRestarts [13:31:05.763] grepl <- base::grepl [13:31:05.763] restarts <- computeRestarts(cond) [13:31:05.763] for (restart in restarts) { [13:31:05.763] name <- restart$name [13:31:05.763] if (is.null(name)) [13:31:05.763] next [13:31:05.763] if (!grepl(pattern, name)) [13:31:05.763] next [13:31:05.763] invokeRestart(restart) [13:31:05.763] muffled <- TRUE [13:31:05.763] break [13:31:05.763] } [13:31:05.763] } [13:31:05.763] } [13:31:05.763] invisible(muffled) [13:31:05.763] } [13:31:05.763] muffleCondition(cond, pattern = "^muffle") [13:31:05.763] } [13:31:05.763] } [13:31:05.763] else { [13:31:05.763] if (TRUE) { [13:31:05.763] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.763] { [13:31:05.763] inherits <- base::inherits [13:31:05.763] invokeRestart <- base::invokeRestart [13:31:05.763] is.null <- base::is.null [13:31:05.763] muffled <- FALSE [13:31:05.763] if (inherits(cond, "message")) { [13:31:05.763] muffled <- grepl(pattern, "muffleMessage") [13:31:05.763] if (muffled) [13:31:05.763] invokeRestart("muffleMessage") [13:31:05.763] } [13:31:05.763] else if (inherits(cond, "warning")) { [13:31:05.763] muffled <- grepl(pattern, "muffleWarning") [13:31:05.763] if (muffled) [13:31:05.763] invokeRestart("muffleWarning") [13:31:05.763] } [13:31:05.763] else if (inherits(cond, "condition")) { [13:31:05.763] if (!is.null(pattern)) { [13:31:05.763] computeRestarts <- base::computeRestarts [13:31:05.763] grepl <- base::grepl [13:31:05.763] restarts <- computeRestarts(cond) [13:31:05.763] for (restart in restarts) { [13:31:05.763] name <- restart$name [13:31:05.763] if (is.null(name)) [13:31:05.763] next [13:31:05.763] if (!grepl(pattern, name)) [13:31:05.763] next [13:31:05.763] invokeRestart(restart) [13:31:05.763] muffled <- TRUE [13:31:05.763] break [13:31:05.763] } [13:31:05.763] } [13:31:05.763] } [13:31:05.763] invisible(muffled) [13:31:05.763] } [13:31:05.763] muffleCondition(cond, pattern = "^muffle") [13:31:05.763] } [13:31:05.763] } [13:31:05.763] } [13:31:05.763] })) [13:31:05.763] }, error = function(ex) { [13:31:05.763] base::structure(base::list(value = NULL, visible = NULL, [13:31:05.763] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.763] ...future.rng), started = ...future.startTime, [13:31:05.763] finished = Sys.time(), session_uuid = NA_character_, [13:31:05.763] version = "1.8"), class = "FutureResult") [13:31:05.763] }, finally = { [13:31:05.763] if (!identical(...future.workdir, getwd())) [13:31:05.763] setwd(...future.workdir) [13:31:05.763] { [13:31:05.763] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:05.763] ...future.oldOptions$nwarnings <- NULL [13:31:05.763] } [13:31:05.763] base::options(...future.oldOptions) [13:31:05.763] if (.Platform$OS.type == "windows") { [13:31:05.763] old_names <- names(...future.oldEnvVars) [13:31:05.763] envs <- base::Sys.getenv() [13:31:05.763] names <- names(envs) [13:31:05.763] common <- intersect(names, old_names) [13:31:05.763] added <- setdiff(names, old_names) [13:31:05.763] removed <- setdiff(old_names, names) [13:31:05.763] changed <- common[...future.oldEnvVars[common] != [13:31:05.763] envs[common]] [13:31:05.763] NAMES <- toupper(changed) [13:31:05.763] args <- list() [13:31:05.763] for (kk in seq_along(NAMES)) { [13:31:05.763] name <- changed[[kk]] [13:31:05.763] NAME <- NAMES[[kk]] [13:31:05.763] if (name != NAME && is.element(NAME, old_names)) [13:31:05.763] next [13:31:05.763] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.763] } [13:31:05.763] NAMES <- toupper(added) [13:31:05.763] for (kk in seq_along(NAMES)) { [13:31:05.763] name <- added[[kk]] [13:31:05.763] NAME <- NAMES[[kk]] [13:31:05.763] if (name != NAME && is.element(NAME, old_names)) [13:31:05.763] next [13:31:05.763] args[[name]] <- "" [13:31:05.763] } [13:31:05.763] NAMES <- toupper(removed) [13:31:05.763] for (kk in seq_along(NAMES)) { [13:31:05.763] name <- removed[[kk]] [13:31:05.763] NAME <- NAMES[[kk]] [13:31:05.763] if (name != NAME && is.element(NAME, old_names)) [13:31:05.763] next [13:31:05.763] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.763] } [13:31:05.763] if (length(args) > 0) [13:31:05.763] base::do.call(base::Sys.setenv, args = args) [13:31:05.763] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:05.763] } [13:31:05.763] else { [13:31:05.763] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:05.763] } [13:31:05.763] { [13:31:05.763] if (base::length(...future.futureOptionsAdded) > [13:31:05.763] 0L) { [13:31:05.763] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:05.763] base::names(opts) <- ...future.futureOptionsAdded [13:31:05.763] base::options(opts) [13:31:05.763] } [13:31:05.763] { [13:31:05.763] NULL [13:31:05.763] options(future.plan = NULL) [13:31:05.763] if (is.na(NA_character_)) [13:31:05.763] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.763] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:05.763] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:05.763] .init = FALSE) [13:31:05.763] } [13:31:05.763] } [13:31:05.763] } [13:31:05.763] }) [13:31:05.763] if (TRUE) { [13:31:05.763] base::sink(type = "output", split = FALSE) [13:31:05.763] if (TRUE) { [13:31:05.763] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:05.763] } [13:31:05.763] else { [13:31:05.763] ...future.result["stdout"] <- base::list(NULL) [13:31:05.763] } [13:31:05.763] base::close(...future.stdout) [13:31:05.763] ...future.stdout <- NULL [13:31:05.763] } [13:31:05.763] ...future.result$conditions <- ...future.conditions [13:31:05.763] ...future.result$finished <- base::Sys.time() [13:31:05.763] ...future.result [13:31:05.763] } [13:31:05.767] - Launch lazy future ... done [13:31:05.767] run() for 'MiraiFuture' ... done List of 2 $ : num [1:2] 2 3 $ : num [1:2] 2 3 [13:31:05.776] getGlobalsAndPackages() ... [13:31:05.776] Searching for globals... [13:31:05.781] - globals found: [16] '{', 'outer_function', 'map', ':', '~', 'inner_function', '.x', 'if', 'inherits', '<-', '[[', '-', 'eval', 'bquote', 'lapply', '+' [13:31:05.781] Searching for globals ... DONE [13:31:05.782] Resolving globals: FALSE [13:31:05.783] The total size of the 3 globals is 7.52 KiB (7704 bytes) [13:31:05.783] 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') [13:31:05.783] - globals: [3] 'outer_function', 'map', 'inner_function' [13:31:05.783] [13:31:05.784] getGlobalsAndPackages() ... DONE [13:31:05.784] run() for 'Future' ... [13:31:05.784] - state: 'created' [13:31:05.784] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:05.787] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:05.787] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:05.787] - Field: 'label' [13:31:05.787] - Field: 'local' [13:31:05.787] - Field: 'owner' [13:31:05.788] - Field: 'envir' [13:31:05.788] - Field: 'packages' [13:31:05.788] - Field: 'gc' [13:31:05.788] - Field: 'conditions' [13:31:05.788] - Field: 'expr' [13:31:05.789] - Field: 'uuid' [13:31:05.789] - Field: 'seed' [13:31:05.790] - Field: 'version' [13:31:05.790] - Field: 'result' [13:31:05.790] - Field: 'asynchronous' [13:31:05.790] - Field: 'calls' [13:31:05.791] - Field: 'globals' [13:31:05.791] - Field: 'stdout' [13:31:05.791] - Field: 'earlySignal' [13:31:05.791] - Field: 'lazy' [13:31:05.791] - Field: 'state' [13:31:05.791] - Field: '.cluster' [13:31:05.792] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:05.792] - Launch lazy future ... [13:31:05.792] Packages needed by the future expression (n = 0): [13:31:05.792] Packages needed by future strategies (n = 0): [13:31:05.793] { [13:31:05.793] { [13:31:05.793] { [13:31:05.793] ...future.startTime <- base::Sys.time() [13:31:05.793] { [13:31:05.793] { [13:31:05.793] { [13:31:05.793] base::local({ [13:31:05.793] has_future <- base::requireNamespace("future", [13:31:05.793] quietly = TRUE) [13:31:05.793] if (has_future) { [13:31:05.793] ns <- base::getNamespace("future") [13:31:05.793] version <- ns[[".package"]][["version"]] [13:31:05.793] if (is.null(version)) [13:31:05.793] version <- utils::packageVersion("future") [13:31:05.793] } [13:31:05.793] else { [13:31:05.793] version <- NULL [13:31:05.793] } [13:31:05.793] if (!has_future || version < "1.8.0") { [13:31:05.793] info <- base::c(r_version = base::gsub("R version ", [13:31:05.793] "", base::R.version$version.string), [13:31:05.793] platform = base::sprintf("%s (%s-bit)", [13:31:05.793] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:05.793] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:05.793] "release", "version")], collapse = " "), [13:31:05.793] hostname = base::Sys.info()[["nodename"]]) [13:31:05.793] info <- base::sprintf("%s: %s", base::names(info), [13:31:05.793] info) [13:31:05.793] info <- base::paste(info, collapse = "; ") [13:31:05.793] if (!has_future) { [13:31:05.793] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:05.793] info) [13:31:05.793] } [13:31:05.793] else { [13:31:05.793] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:05.793] info, version) [13:31:05.793] } [13:31:05.793] base::stop(msg) [13:31:05.793] } [13:31:05.793] }) [13:31:05.793] } [13:31:05.793] ...future.strategy.old <- future::plan("list") [13:31:05.793] options(future.plan = NULL) [13:31:05.793] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.793] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:05.793] } [13:31:05.793] ...future.workdir <- getwd() [13:31:05.793] } [13:31:05.793] ...future.oldOptions <- base::as.list(base::.Options) [13:31:05.793] ...future.oldEnvVars <- base::Sys.getenv() [13:31:05.793] } [13:31:05.793] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:05.793] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:05.793] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:05.793] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:05.793] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:05.793] future.stdout.windows.reencode = NULL, width = 80L) [13:31:05.793] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:05.793] base::names(...future.oldOptions)) [13:31:05.793] } [13:31:05.793] if (FALSE) { [13:31:05.793] } [13:31:05.793] else { [13:31:05.793] if (TRUE) { [13:31:05.793] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:05.793] open = "w") [13:31:05.793] } [13:31:05.793] else { [13:31:05.793] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:05.793] windows = "NUL", "/dev/null"), open = "w") [13:31:05.793] } [13:31:05.793] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:05.793] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:05.793] base::sink(type = "output", split = FALSE) [13:31:05.793] base::close(...future.stdout) [13:31:05.793] }, add = TRUE) [13:31:05.793] } [13:31:05.793] ...future.frame <- base::sys.nframe() [13:31:05.793] ...future.conditions <- base::list() [13:31:05.793] ...future.rng <- base::globalenv()$.Random.seed [13:31:05.793] if (FALSE) { [13:31:05.793] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:05.793] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:05.793] } [13:31:05.793] ...future.result <- base::tryCatch({ [13:31:05.793] base::withCallingHandlers({ [13:31:05.793] ...future.value <- base::withVisible(base::local({ [13:31:05.793] outer_function(1L) [13:31:05.793] })) [13:31:05.793] future::FutureResult(value = ...future.value$value, [13:31:05.793] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.793] ...future.rng), globalenv = if (FALSE) [13:31:05.793] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:05.793] ...future.globalenv.names)) [13:31:05.793] else NULL, started = ...future.startTime, version = "1.8") [13:31:05.793] }, condition = base::local({ [13:31:05.793] c <- base::c [13:31:05.793] inherits <- base::inherits [13:31:05.793] invokeRestart <- base::invokeRestart [13:31:05.793] length <- base::length [13:31:05.793] list <- base::list [13:31:05.793] seq.int <- base::seq.int [13:31:05.793] signalCondition <- base::signalCondition [13:31:05.793] sys.calls <- base::sys.calls [13:31:05.793] `[[` <- base::`[[` [13:31:05.793] `+` <- base::`+` [13:31:05.793] `<<-` <- base::`<<-` [13:31:05.793] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:05.793] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:05.793] 3L)] [13:31:05.793] } [13:31:05.793] function(cond) { [13:31:05.793] is_error <- inherits(cond, "error") [13:31:05.793] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:05.793] NULL) [13:31:05.793] if (is_error) { [13:31:05.793] sessionInformation <- function() { [13:31:05.793] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:05.793] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:05.793] search = base::search(), system = base::Sys.info()) [13:31:05.793] } [13:31:05.793] ...future.conditions[[length(...future.conditions) + [13:31:05.793] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:05.793] cond$call), session = sessionInformation(), [13:31:05.793] timestamp = base::Sys.time(), signaled = 0L) [13:31:05.793] signalCondition(cond) [13:31:05.793] } [13:31:05.793] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:05.793] signal <- FALSE && inherits(cond, character(0)) [13:31:05.793] ...future.conditions[[length(...future.conditions) + [13:31:05.793] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:05.793] if (FALSE && !signal) { [13:31:05.793] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.793] { [13:31:05.793] inherits <- base::inherits [13:31:05.793] invokeRestart <- base::invokeRestart [13:31:05.793] is.null <- base::is.null [13:31:05.793] muffled <- FALSE [13:31:05.793] if (inherits(cond, "message")) { [13:31:05.793] muffled <- grepl(pattern, "muffleMessage") [13:31:05.793] if (muffled) [13:31:05.793] invokeRestart("muffleMessage") [13:31:05.793] } [13:31:05.793] else if (inherits(cond, "warning")) { [13:31:05.793] muffled <- grepl(pattern, "muffleWarning") [13:31:05.793] if (muffled) [13:31:05.793] invokeRestart("muffleWarning") [13:31:05.793] } [13:31:05.793] else if (inherits(cond, "condition")) { [13:31:05.793] if (!is.null(pattern)) { [13:31:05.793] computeRestarts <- base::computeRestarts [13:31:05.793] grepl <- base::grepl [13:31:05.793] restarts <- computeRestarts(cond) [13:31:05.793] for (restart in restarts) { [13:31:05.793] name <- restart$name [13:31:05.793] if (is.null(name)) [13:31:05.793] next [13:31:05.793] if (!grepl(pattern, name)) [13:31:05.793] next [13:31:05.793] invokeRestart(restart) [13:31:05.793] muffled <- TRUE [13:31:05.793] break [13:31:05.793] } [13:31:05.793] } [13:31:05.793] } [13:31:05.793] invisible(muffled) [13:31:05.793] } [13:31:05.793] muffleCondition(cond, pattern = "^muffle") [13:31:05.793] } [13:31:05.793] } [13:31:05.793] else { [13:31:05.793] if (TRUE) { [13:31:05.793] muffleCondition <- function (cond, pattern = "^muffle") [13:31:05.793] { [13:31:05.793] inherits <- base::inherits [13:31:05.793] invokeRestart <- base::invokeRestart [13:31:05.793] is.null <- base::is.null [13:31:05.793] muffled <- FALSE [13:31:05.793] if (inherits(cond, "message")) { [13:31:05.793] muffled <- grepl(pattern, "muffleMessage") [13:31:05.793] if (muffled) [13:31:05.793] invokeRestart("muffleMessage") [13:31:05.793] } [13:31:05.793] else if (inherits(cond, "warning")) { [13:31:05.793] muffled <- grepl(pattern, "muffleWarning") [13:31:05.793] if (muffled) [13:31:05.793] invokeRestart("muffleWarning") [13:31:05.793] } [13:31:05.793] else if (inherits(cond, "condition")) { [13:31:05.793] if (!is.null(pattern)) { [13:31:05.793] computeRestarts <- base::computeRestarts [13:31:05.793] grepl <- base::grepl [13:31:05.793] restarts <- computeRestarts(cond) [13:31:05.793] for (restart in restarts) { [13:31:05.793] name <- restart$name [13:31:05.793] if (is.null(name)) [13:31:05.793] next [13:31:05.793] if (!grepl(pattern, name)) [13:31:05.793] next [13:31:05.793] invokeRestart(restart) [13:31:05.793] muffled <- TRUE [13:31:05.793] break [13:31:05.793] } [13:31:05.793] } [13:31:05.793] } [13:31:05.793] invisible(muffled) [13:31:05.793] } [13:31:05.793] muffleCondition(cond, pattern = "^muffle") [13:31:05.793] } [13:31:05.793] } [13:31:05.793] } [13:31:05.793] })) [13:31:05.793] }, error = function(ex) { [13:31:05.793] base::structure(base::list(value = NULL, visible = NULL, [13:31:05.793] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:05.793] ...future.rng), started = ...future.startTime, [13:31:05.793] finished = Sys.time(), session_uuid = NA_character_, [13:31:05.793] version = "1.8"), class = "FutureResult") [13:31:05.793] }, finally = { [13:31:05.793] if (!identical(...future.workdir, getwd())) [13:31:05.793] setwd(...future.workdir) [13:31:05.793] { [13:31:05.793] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:05.793] ...future.oldOptions$nwarnings <- NULL [13:31:05.793] } [13:31:05.793] base::options(...future.oldOptions) [13:31:05.793] if (.Platform$OS.type == "windows") { [13:31:05.793] old_names <- names(...future.oldEnvVars) [13:31:05.793] envs <- base::Sys.getenv() [13:31:05.793] names <- names(envs) [13:31:05.793] common <- intersect(names, old_names) [13:31:05.793] added <- setdiff(names, old_names) [13:31:05.793] removed <- setdiff(old_names, names) [13:31:05.793] changed <- common[...future.oldEnvVars[common] != [13:31:05.793] envs[common]] [13:31:05.793] NAMES <- toupper(changed) [13:31:05.793] args <- list() [13:31:05.793] for (kk in seq_along(NAMES)) { [13:31:05.793] name <- changed[[kk]] [13:31:05.793] NAME <- NAMES[[kk]] [13:31:05.793] if (name != NAME && is.element(NAME, old_names)) [13:31:05.793] next [13:31:05.793] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.793] } [13:31:05.793] NAMES <- toupper(added) [13:31:05.793] for (kk in seq_along(NAMES)) { [13:31:05.793] name <- added[[kk]] [13:31:05.793] NAME <- NAMES[[kk]] [13:31:05.793] if (name != NAME && is.element(NAME, old_names)) [13:31:05.793] next [13:31:05.793] args[[name]] <- "" [13:31:05.793] } [13:31:05.793] NAMES <- toupper(removed) [13:31:05.793] for (kk in seq_along(NAMES)) { [13:31:05.793] name <- removed[[kk]] [13:31:05.793] NAME <- NAMES[[kk]] [13:31:05.793] if (name != NAME && is.element(NAME, old_names)) [13:31:05.793] next [13:31:05.793] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:05.793] } [13:31:05.793] if (length(args) > 0) [13:31:05.793] base::do.call(base::Sys.setenv, args = args) [13:31:05.793] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:05.793] } [13:31:05.793] else { [13:31:05.793] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:05.793] } [13:31:05.793] { [13:31:05.793] if (base::length(...future.futureOptionsAdded) > [13:31:05.793] 0L) { [13:31:05.793] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:05.793] base::names(opts) <- ...future.futureOptionsAdded [13:31:05.793] base::options(opts) [13:31:05.793] } [13:31:05.793] { [13:31:05.793] NULL [13:31:05.793] options(future.plan = NULL) [13:31:05.793] if (is.na(NA_character_)) [13:31:05.793] Sys.unsetenv("R_FUTURE_PLAN") [13:31:05.793] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:05.793] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:05.793] .init = FALSE) [13:31:05.793] } [13:31:05.793] } [13:31:05.793] } [13:31:05.793] }) [13:31:05.793] if (TRUE) { [13:31:05.793] base::sink(type = "output", split = FALSE) [13:31:05.793] if (TRUE) { [13:31:05.793] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:05.793] } [13:31:05.793] else { [13:31:05.793] ...future.result["stdout"] <- base::list(NULL) [13:31:05.793] } [13:31:05.793] base::close(...future.stdout) [13:31:05.793] ...future.stdout <- NULL [13:31:05.793] } [13:31:05.793] ...future.result$conditions <- ...future.conditions [13:31:05.793] ...future.result$finished <- base::Sys.time() [13:31:05.793] ...future.result [13:31:05.793] } [13:31:05.797] - Launch lazy future ... done [13:31:05.797] 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.67 0.10 1.21