R Under development (unstable) (2024-07-02 r86866 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > source("incl/start.R") Loading required package: future [13:31:09.135] plan(): Setting new future strategy stack: [13:31:09.136] List of future strategies: [13:31:09.136] 1. mirai_multisession: [13:31:09.136] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:31:09.136] - tweaked: FALSE [13:31:09.136] - call: future::plan(future.mirai::mirai_multisession) [13:31:09.149] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:31:09.149] < mirai [$data] > [13:31:09.154] getGlobalsAndPackages() ... [13:31:09.154] Not searching for globals [13:31:09.154] - globals: [0] [13:31:09.155] getGlobalsAndPackages() ... DONE [13:31:09.155] getGlobalsAndPackages() ... [13:31:09.155] [13:31:09.155] - globals: [0] [13:31:09.156] getGlobalsAndPackages() ... DONE [13:31:09.417] Packages needed by the future expression (n = 0): [13:31:09.417] Packages needed by future strategies (n = 0): [13:31:09.418] { [13:31:09.418] { [13:31:09.418] { [13:31:09.418] ...future.startTime <- base::Sys.time() [13:31:09.418] { [13:31:09.418] { [13:31:09.418] { [13:31:09.418] base::local({ [13:31:09.418] has_future <- base::requireNamespace("future", [13:31:09.418] quietly = TRUE) [13:31:09.418] if (has_future) { [13:31:09.418] ns <- base::getNamespace("future") [13:31:09.418] version <- ns[[".package"]][["version"]] [13:31:09.418] if (is.null(version)) [13:31:09.418] version <- utils::packageVersion("future") [13:31:09.418] } [13:31:09.418] else { [13:31:09.418] version <- NULL [13:31:09.418] } [13:31:09.418] if (!has_future || version < "1.8.0") { [13:31:09.418] info <- base::c(r_version = base::gsub("R version ", [13:31:09.418] "", base::R.version$version.string), [13:31:09.418] platform = base::sprintf("%s (%s-bit)", [13:31:09.418] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.418] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.418] "release", "version")], collapse = " "), [13:31:09.418] hostname = base::Sys.info()[["nodename"]]) [13:31:09.418] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.418] info) [13:31:09.418] info <- base::paste(info, collapse = "; ") [13:31:09.418] if (!has_future) { [13:31:09.418] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.418] info) [13:31:09.418] } [13:31:09.418] else { [13:31:09.418] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.418] info, version) [13:31:09.418] } [13:31:09.418] base::stop(msg) [13:31:09.418] } [13:31:09.418] }) [13:31:09.418] } [13:31:09.418] ...future.strategy.old <- future::plan("list") [13:31:09.418] options(future.plan = NULL) [13:31:09.418] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.418] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.418] } [13:31:09.418] ...future.workdir <- getwd() [13:31:09.418] } [13:31:09.418] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.418] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.418] } [13:31:09.418] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.418] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.418] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.418] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.418] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.418] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.418] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.418] base::names(...future.oldOptions)) [13:31:09.418] } [13:31:09.418] if (FALSE) { [13:31:09.418] } [13:31:09.418] else { [13:31:09.418] if (TRUE) { [13:31:09.418] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.418] open = "w") [13:31:09.418] } [13:31:09.418] else { [13:31:09.418] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.418] windows = "NUL", "/dev/null"), open = "w") [13:31:09.418] } [13:31:09.418] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.418] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.418] base::sink(type = "output", split = FALSE) [13:31:09.418] base::close(...future.stdout) [13:31:09.418] }, add = TRUE) [13:31:09.418] } [13:31:09.418] ...future.frame <- base::sys.nframe() [13:31:09.418] ...future.conditions <- base::list() [13:31:09.418] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.418] if (FALSE) { [13:31:09.418] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.418] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.418] } [13:31:09.418] ...future.result <- base::tryCatch({ [13:31:09.418] base::withCallingHandlers({ [13:31:09.418] ...future.value <- base::withVisible(base::local(NA)) [13:31:09.418] future::FutureResult(value = ...future.value$value, [13:31:09.418] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.418] ...future.rng), globalenv = if (FALSE) [13:31:09.418] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.418] ...future.globalenv.names)) [13:31:09.418] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.418] }, condition = base::local({ [13:31:09.418] c <- base::c [13:31:09.418] inherits <- base::inherits [13:31:09.418] invokeRestart <- base::invokeRestart [13:31:09.418] length <- base::length [13:31:09.418] list <- base::list [13:31:09.418] seq.int <- base::seq.int [13:31:09.418] signalCondition <- base::signalCondition [13:31:09.418] sys.calls <- base::sys.calls [13:31:09.418] `[[` <- base::`[[` [13:31:09.418] `+` <- base::`+` [13:31:09.418] `<<-` <- base::`<<-` [13:31:09.418] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.418] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.418] 3L)] [13:31:09.418] } [13:31:09.418] function(cond) { [13:31:09.418] is_error <- inherits(cond, "error") [13:31:09.418] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.418] NULL) [13:31:09.418] if (is_error) { [13:31:09.418] sessionInformation <- function() { [13:31:09.418] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.418] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.418] search = base::search(), system = base::Sys.info()) [13:31:09.418] } [13:31:09.418] ...future.conditions[[length(...future.conditions) + [13:31:09.418] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.418] cond$call), session = sessionInformation(), [13:31:09.418] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.418] signalCondition(cond) [13:31:09.418] } [13:31:09.418] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.418] signal <- FALSE && inherits(cond, character(0)) [13:31:09.418] ...future.conditions[[length(...future.conditions) + [13:31:09.418] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.418] if (FALSE && !signal) { [13:31:09.418] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.418] { [13:31:09.418] inherits <- base::inherits [13:31:09.418] invokeRestart <- base::invokeRestart [13:31:09.418] is.null <- base::is.null [13:31:09.418] muffled <- FALSE [13:31:09.418] if (inherits(cond, "message")) { [13:31:09.418] muffled <- grepl(pattern, "muffleMessage") [13:31:09.418] if (muffled) [13:31:09.418] invokeRestart("muffleMessage") [13:31:09.418] } [13:31:09.418] else if (inherits(cond, "warning")) { [13:31:09.418] muffled <- grepl(pattern, "muffleWarning") [13:31:09.418] if (muffled) [13:31:09.418] invokeRestart("muffleWarning") [13:31:09.418] } [13:31:09.418] else if (inherits(cond, "condition")) { [13:31:09.418] if (!is.null(pattern)) { [13:31:09.418] computeRestarts <- base::computeRestarts [13:31:09.418] grepl <- base::grepl [13:31:09.418] restarts <- computeRestarts(cond) [13:31:09.418] for (restart in restarts) { [13:31:09.418] name <- restart$name [13:31:09.418] if (is.null(name)) [13:31:09.418] next [13:31:09.418] if (!grepl(pattern, name)) [13:31:09.418] next [13:31:09.418] invokeRestart(restart) [13:31:09.418] muffled <- TRUE [13:31:09.418] break [13:31:09.418] } [13:31:09.418] } [13:31:09.418] } [13:31:09.418] invisible(muffled) [13:31:09.418] } [13:31:09.418] muffleCondition(cond, pattern = "^muffle") [13:31:09.418] } [13:31:09.418] } [13:31:09.418] else { [13:31:09.418] if (TRUE) { [13:31:09.418] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.418] { [13:31:09.418] inherits <- base::inherits [13:31:09.418] invokeRestart <- base::invokeRestart [13:31:09.418] is.null <- base::is.null [13:31:09.418] muffled <- FALSE [13:31:09.418] if (inherits(cond, "message")) { [13:31:09.418] muffled <- grepl(pattern, "muffleMessage") [13:31:09.418] if (muffled) [13:31:09.418] invokeRestart("muffleMessage") [13:31:09.418] } [13:31:09.418] else if (inherits(cond, "warning")) { [13:31:09.418] muffled <- grepl(pattern, "muffleWarning") [13:31:09.418] if (muffled) [13:31:09.418] invokeRestart("muffleWarning") [13:31:09.418] } [13:31:09.418] else if (inherits(cond, "condition")) { [13:31:09.418] if (!is.null(pattern)) { [13:31:09.418] computeRestarts <- base::computeRestarts [13:31:09.418] grepl <- base::grepl [13:31:09.418] restarts <- computeRestarts(cond) [13:31:09.418] for (restart in restarts) { [13:31:09.418] name <- restart$name [13:31:09.418] if (is.null(name)) [13:31:09.418] next [13:31:09.418] if (!grepl(pattern, name)) [13:31:09.418] next [13:31:09.418] invokeRestart(restart) [13:31:09.418] muffled <- TRUE [13:31:09.418] break [13:31:09.418] } [13:31:09.418] } [13:31:09.418] } [13:31:09.418] invisible(muffled) [13:31:09.418] } [13:31:09.418] muffleCondition(cond, pattern = "^muffle") [13:31:09.418] } [13:31:09.418] } [13:31:09.418] } [13:31:09.418] })) [13:31:09.418] }, error = function(ex) { [13:31:09.418] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.418] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.418] ...future.rng), started = ...future.startTime, [13:31:09.418] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.418] version = "1.8"), class = "FutureResult") [13:31:09.418] }, finally = { [13:31:09.418] if (!identical(...future.workdir, getwd())) [13:31:09.418] setwd(...future.workdir) [13:31:09.418] { [13:31:09.418] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.418] ...future.oldOptions$nwarnings <- NULL [13:31:09.418] } [13:31:09.418] base::options(...future.oldOptions) [13:31:09.418] if (.Platform$OS.type == "windows") { [13:31:09.418] old_names <- names(...future.oldEnvVars) [13:31:09.418] envs <- base::Sys.getenv() [13:31:09.418] names <- names(envs) [13:31:09.418] common <- intersect(names, old_names) [13:31:09.418] added <- setdiff(names, old_names) [13:31:09.418] removed <- setdiff(old_names, names) [13:31:09.418] changed <- common[...future.oldEnvVars[common] != [13:31:09.418] envs[common]] [13:31:09.418] NAMES <- toupper(changed) [13:31:09.418] args <- list() [13:31:09.418] for (kk in seq_along(NAMES)) { [13:31:09.418] name <- changed[[kk]] [13:31:09.418] NAME <- NAMES[[kk]] [13:31:09.418] if (name != NAME && is.element(NAME, old_names)) [13:31:09.418] next [13:31:09.418] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.418] } [13:31:09.418] NAMES <- toupper(added) [13:31:09.418] for (kk in seq_along(NAMES)) { [13:31:09.418] name <- added[[kk]] [13:31:09.418] NAME <- NAMES[[kk]] [13:31:09.418] if (name != NAME && is.element(NAME, old_names)) [13:31:09.418] next [13:31:09.418] args[[name]] <- "" [13:31:09.418] } [13:31:09.418] NAMES <- toupper(removed) [13:31:09.418] for (kk in seq_along(NAMES)) { [13:31:09.418] name <- removed[[kk]] [13:31:09.418] NAME <- NAMES[[kk]] [13:31:09.418] if (name != NAME && is.element(NAME, old_names)) [13:31:09.418] next [13:31:09.418] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.418] } [13:31:09.418] if (length(args) > 0) [13:31:09.418] base::do.call(base::Sys.setenv, args = args) [13:31:09.418] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.418] } [13:31:09.418] else { [13:31:09.418] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.418] } [13:31:09.418] { [13:31:09.418] if (base::length(...future.futureOptionsAdded) > [13:31:09.418] 0L) { [13:31:09.418] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.418] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.418] base::options(opts) [13:31:09.418] } [13:31:09.418] { [13:31:09.418] NULL [13:31:09.418] options(future.plan = NULL) [13:31:09.418] if (is.na(NA_character_)) [13:31:09.418] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.418] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.418] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.418] .init = FALSE) [13:31:09.418] } [13:31:09.418] } [13:31:09.418] } [13:31:09.418] }) [13:31:09.418] if (TRUE) { [13:31:09.418] base::sink(type = "output", split = FALSE) [13:31:09.418] if (TRUE) { [13:31:09.418] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.418] } [13:31:09.418] else { [13:31:09.418] ...future.result["stdout"] <- base::list(NULL) [13:31:09.418] } [13:31:09.418] base::close(...future.stdout) [13:31:09.418] ...future.stdout <- NULL [13:31:09.418] } [13:31:09.418] ...future.result$conditions <- ...future.conditions [13:31:09.418] ...future.result$finished <- base::Sys.time() [13:31:09.418] ...future.result [13:31:09.418] } [13:31:09.534] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:31:09.535] plan(): nbrOfWorkers() = 2 > > library("datasets") ## cars data set > library("stats") ## lm(), poly(), xtabs() > > plan(mirai_multisession) [13:31:09.536] plan(): Setting new future strategy stack: [13:31:09.536] List of future strategies: [13:31:09.536] 1. mirai_multisession: [13:31:09.536] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:31:09.536] - tweaked: FALSE [13:31:09.536] - call: plan(mirai_multisession) [13:31:09.549] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:31:09.549] < mirai [$data] > [13:31:09.552] getGlobalsAndPackages() ... [13:31:09.552] Not searching for globals [13:31:09.552] - globals: [0] [13:31:09.552] getGlobalsAndPackages() ... DONE [13:31:09.553] getGlobalsAndPackages() ... [13:31:09.553] [13:31:09.553] - globals: [0] [13:31:09.553] getGlobalsAndPackages() ... DONE [13:31:09.553] Packages needed by the future expression (n = 0): [13:31:09.554] Packages needed by future strategies (n = 0): [13:31:09.554] { [13:31:09.554] { [13:31:09.554] { [13:31:09.554] ...future.startTime <- base::Sys.time() [13:31:09.554] { [13:31:09.554] { [13:31:09.554] { [13:31:09.554] base::local({ [13:31:09.554] has_future <- base::requireNamespace("future", [13:31:09.554] quietly = TRUE) [13:31:09.554] if (has_future) { [13:31:09.554] ns <- base::getNamespace("future") [13:31:09.554] version <- ns[[".package"]][["version"]] [13:31:09.554] if (is.null(version)) [13:31:09.554] version <- utils::packageVersion("future") [13:31:09.554] } [13:31:09.554] else { [13:31:09.554] version <- NULL [13:31:09.554] } [13:31:09.554] if (!has_future || version < "1.8.0") { [13:31:09.554] info <- base::c(r_version = base::gsub("R version ", [13:31:09.554] "", base::R.version$version.string), [13:31:09.554] platform = base::sprintf("%s (%s-bit)", [13:31:09.554] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.554] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.554] "release", "version")], collapse = " "), [13:31:09.554] hostname = base::Sys.info()[["nodename"]]) [13:31:09.554] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.554] info) [13:31:09.554] info <- base::paste(info, collapse = "; ") [13:31:09.554] if (!has_future) { [13:31:09.554] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.554] info) [13:31:09.554] } [13:31:09.554] else { [13:31:09.554] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.554] info, version) [13:31:09.554] } [13:31:09.554] base::stop(msg) [13:31:09.554] } [13:31:09.554] }) [13:31:09.554] } [13:31:09.554] ...future.strategy.old <- future::plan("list") [13:31:09.554] options(future.plan = NULL) [13:31:09.554] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.554] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.554] } [13:31:09.554] ...future.workdir <- getwd() [13:31:09.554] } [13:31:09.554] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.554] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.554] } [13:31:09.554] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.554] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.554] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.554] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.554] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.554] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.554] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.554] base::names(...future.oldOptions)) [13:31:09.554] } [13:31:09.554] if (FALSE) { [13:31:09.554] } [13:31:09.554] else { [13:31:09.554] if (TRUE) { [13:31:09.554] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.554] open = "w") [13:31:09.554] } [13:31:09.554] else { [13:31:09.554] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.554] windows = "NUL", "/dev/null"), open = "w") [13:31:09.554] } [13:31:09.554] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.554] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.554] base::sink(type = "output", split = FALSE) [13:31:09.554] base::close(...future.stdout) [13:31:09.554] }, add = TRUE) [13:31:09.554] } [13:31:09.554] ...future.frame <- base::sys.nframe() [13:31:09.554] ...future.conditions <- base::list() [13:31:09.554] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.554] if (FALSE) { [13:31:09.554] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.554] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.554] } [13:31:09.554] ...future.result <- base::tryCatch({ [13:31:09.554] base::withCallingHandlers({ [13:31:09.554] ...future.value <- base::withVisible(base::local(NA)) [13:31:09.554] future::FutureResult(value = ...future.value$value, [13:31:09.554] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.554] ...future.rng), globalenv = if (FALSE) [13:31:09.554] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.554] ...future.globalenv.names)) [13:31:09.554] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.554] }, condition = base::local({ [13:31:09.554] c <- base::c [13:31:09.554] inherits <- base::inherits [13:31:09.554] invokeRestart <- base::invokeRestart [13:31:09.554] length <- base::length [13:31:09.554] list <- base::list [13:31:09.554] seq.int <- base::seq.int [13:31:09.554] signalCondition <- base::signalCondition [13:31:09.554] sys.calls <- base::sys.calls [13:31:09.554] `[[` <- base::`[[` [13:31:09.554] `+` <- base::`+` [13:31:09.554] `<<-` <- base::`<<-` [13:31:09.554] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.554] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.554] 3L)] [13:31:09.554] } [13:31:09.554] function(cond) { [13:31:09.554] is_error <- inherits(cond, "error") [13:31:09.554] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.554] NULL) [13:31:09.554] if (is_error) { [13:31:09.554] sessionInformation <- function() { [13:31:09.554] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.554] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.554] search = base::search(), system = base::Sys.info()) [13:31:09.554] } [13:31:09.554] ...future.conditions[[length(...future.conditions) + [13:31:09.554] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.554] cond$call), session = sessionInformation(), [13:31:09.554] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.554] signalCondition(cond) [13:31:09.554] } [13:31:09.554] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.554] signal <- FALSE && inherits(cond, character(0)) [13:31:09.554] ...future.conditions[[length(...future.conditions) + [13:31:09.554] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.554] if (FALSE && !signal) { [13:31:09.554] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.554] { [13:31:09.554] inherits <- base::inherits [13:31:09.554] invokeRestart <- base::invokeRestart [13:31:09.554] is.null <- base::is.null [13:31:09.554] muffled <- FALSE [13:31:09.554] if (inherits(cond, "message")) { [13:31:09.554] muffled <- grepl(pattern, "muffleMessage") [13:31:09.554] if (muffled) [13:31:09.554] invokeRestart("muffleMessage") [13:31:09.554] } [13:31:09.554] else if (inherits(cond, "warning")) { [13:31:09.554] muffled <- grepl(pattern, "muffleWarning") [13:31:09.554] if (muffled) [13:31:09.554] invokeRestart("muffleWarning") [13:31:09.554] } [13:31:09.554] else if (inherits(cond, "condition")) { [13:31:09.554] if (!is.null(pattern)) { [13:31:09.554] computeRestarts <- base::computeRestarts [13:31:09.554] grepl <- base::grepl [13:31:09.554] restarts <- computeRestarts(cond) [13:31:09.554] for (restart in restarts) { [13:31:09.554] name <- restart$name [13:31:09.554] if (is.null(name)) [13:31:09.554] next [13:31:09.554] if (!grepl(pattern, name)) [13:31:09.554] next [13:31:09.554] invokeRestart(restart) [13:31:09.554] muffled <- TRUE [13:31:09.554] break [13:31:09.554] } [13:31:09.554] } [13:31:09.554] } [13:31:09.554] invisible(muffled) [13:31:09.554] } [13:31:09.554] muffleCondition(cond, pattern = "^muffle") [13:31:09.554] } [13:31:09.554] } [13:31:09.554] else { [13:31:09.554] if (TRUE) { [13:31:09.554] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.554] { [13:31:09.554] inherits <- base::inherits [13:31:09.554] invokeRestart <- base::invokeRestart [13:31:09.554] is.null <- base::is.null [13:31:09.554] muffled <- FALSE [13:31:09.554] if (inherits(cond, "message")) { [13:31:09.554] muffled <- grepl(pattern, "muffleMessage") [13:31:09.554] if (muffled) [13:31:09.554] invokeRestart("muffleMessage") [13:31:09.554] } [13:31:09.554] else if (inherits(cond, "warning")) { [13:31:09.554] muffled <- grepl(pattern, "muffleWarning") [13:31:09.554] if (muffled) [13:31:09.554] invokeRestart("muffleWarning") [13:31:09.554] } [13:31:09.554] else if (inherits(cond, "condition")) { [13:31:09.554] if (!is.null(pattern)) { [13:31:09.554] computeRestarts <- base::computeRestarts [13:31:09.554] grepl <- base::grepl [13:31:09.554] restarts <- computeRestarts(cond) [13:31:09.554] for (restart in restarts) { [13:31:09.554] name <- restart$name [13:31:09.554] if (is.null(name)) [13:31:09.554] next [13:31:09.554] if (!grepl(pattern, name)) [13:31:09.554] next [13:31:09.554] invokeRestart(restart) [13:31:09.554] muffled <- TRUE [13:31:09.554] break [13:31:09.554] } [13:31:09.554] } [13:31:09.554] } [13:31:09.554] invisible(muffled) [13:31:09.554] } [13:31:09.554] muffleCondition(cond, pattern = "^muffle") [13:31:09.554] } [13:31:09.554] } [13:31:09.554] } [13:31:09.554] })) [13:31:09.554] }, error = function(ex) { [13:31:09.554] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.554] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.554] ...future.rng), started = ...future.startTime, [13:31:09.554] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.554] version = "1.8"), class = "FutureResult") [13:31:09.554] }, finally = { [13:31:09.554] if (!identical(...future.workdir, getwd())) [13:31:09.554] setwd(...future.workdir) [13:31:09.554] { [13:31:09.554] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.554] ...future.oldOptions$nwarnings <- NULL [13:31:09.554] } [13:31:09.554] base::options(...future.oldOptions) [13:31:09.554] if (.Platform$OS.type == "windows") { [13:31:09.554] old_names <- names(...future.oldEnvVars) [13:31:09.554] envs <- base::Sys.getenv() [13:31:09.554] names <- names(envs) [13:31:09.554] common <- intersect(names, old_names) [13:31:09.554] added <- setdiff(names, old_names) [13:31:09.554] removed <- setdiff(old_names, names) [13:31:09.554] changed <- common[...future.oldEnvVars[common] != [13:31:09.554] envs[common]] [13:31:09.554] NAMES <- toupper(changed) [13:31:09.554] args <- list() [13:31:09.554] for (kk in seq_along(NAMES)) { [13:31:09.554] name <- changed[[kk]] [13:31:09.554] NAME <- NAMES[[kk]] [13:31:09.554] if (name != NAME && is.element(NAME, old_names)) [13:31:09.554] next [13:31:09.554] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.554] } [13:31:09.554] NAMES <- toupper(added) [13:31:09.554] for (kk in seq_along(NAMES)) { [13:31:09.554] name <- added[[kk]] [13:31:09.554] NAME <- NAMES[[kk]] [13:31:09.554] if (name != NAME && is.element(NAME, old_names)) [13:31:09.554] next [13:31:09.554] args[[name]] <- "" [13:31:09.554] } [13:31:09.554] NAMES <- toupper(removed) [13:31:09.554] for (kk in seq_along(NAMES)) { [13:31:09.554] name <- removed[[kk]] [13:31:09.554] NAME <- NAMES[[kk]] [13:31:09.554] if (name != NAME && is.element(NAME, old_names)) [13:31:09.554] next [13:31:09.554] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.554] } [13:31:09.554] if (length(args) > 0) [13:31:09.554] base::do.call(base::Sys.setenv, args = args) [13:31:09.554] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.554] } [13:31:09.554] else { [13:31:09.554] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.554] } [13:31:09.554] { [13:31:09.554] if (base::length(...future.futureOptionsAdded) > [13:31:09.554] 0L) { [13:31:09.554] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.554] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.554] base::options(opts) [13:31:09.554] } [13:31:09.554] { [13:31:09.554] NULL [13:31:09.554] options(future.plan = NULL) [13:31:09.554] if (is.na(NA_character_)) [13:31:09.554] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.554] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.554] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.554] .init = FALSE) [13:31:09.554] } [13:31:09.554] } [13:31:09.554] } [13:31:09.554] }) [13:31:09.554] if (TRUE) { [13:31:09.554] base::sink(type = "output", split = FALSE) [13:31:09.554] if (TRUE) { [13:31:09.554] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.554] } [13:31:09.554] else { [13:31:09.554] ...future.result["stdout"] <- base::list(NULL) [13:31:09.554] } [13:31:09.554] base::close(...future.stdout) [13:31:09.554] ...future.stdout <- NULL [13:31:09.554] } [13:31:09.554] ...future.result$conditions <- ...future.conditions [13:31:09.554] ...future.result$finished <- base::Sys.time() [13:31:09.554] ...future.result [13:31:09.554] } [13:31:09.674] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:31:09.674] 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:09.679] getGlobalsAndPackages() ... [13:31:09.679] Searching for globals... [13:31:09.689] - globals found: [6] '{', 'lm', 'weight', '-', 'group', '~' [13:31:09.690] Searching for globals ... DONE [13:31:09.690] Resolving globals: FALSE [13:31:09.691] The total size of the 2 globals is 896 bytes (896 bytes) [13:31:09.692] 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:09.692] - globals: [2] 'weight', 'group' [13:31:09.692] - packages: [1] 'stats' [13:31:09.692] getGlobalsAndPackages() ... DONE [13:31:09.693] run() for 'Future' ... [13:31:09.693] - state: 'created' [13:31:09.693] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.696] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.696] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.696] - Field: 'label' [13:31:09.696] - Field: 'local' [13:31:09.697] - Field: 'owner' [13:31:09.697] - Field: 'envir' [13:31:09.697] - Field: 'packages' [13:31:09.697] - Field: 'gc' [13:31:09.697] - Field: 'conditions' [13:31:09.697] - Field: 'expr' [13:31:09.698] - Field: 'uuid' [13:31:09.698] - Field: 'seed' [13:31:09.698] - Field: 'version' [13:31:09.698] - Field: 'result' [13:31:09.698] - Field: 'asynchronous' [13:31:09.699] - Field: 'calls' [13:31:09.699] - Field: 'globals' [13:31:09.699] - Field: 'stdout' [13:31:09.699] - Field: 'earlySignal' [13:31:09.699] - Field: 'lazy' [13:31:09.699] - Field: 'state' [13:31:09.700] - Field: '.cluster' [13:31:09.700] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.700] - Launch lazy future ... [13:31:09.700] Packages needed by the future expression (n = 1): 'stats' [13:31:09.700] Packages needed by future strategies (n = 0): [13:31:09.701] { [13:31:09.701] { [13:31:09.701] { [13:31:09.701] ...future.startTime <- base::Sys.time() [13:31:09.701] { [13:31:09.701] { [13:31:09.701] { [13:31:09.701] { [13:31:09.701] base::local({ [13:31:09.701] has_future <- base::requireNamespace("future", [13:31:09.701] quietly = TRUE) [13:31:09.701] if (has_future) { [13:31:09.701] ns <- base::getNamespace("future") [13:31:09.701] version <- ns[[".package"]][["version"]] [13:31:09.701] if (is.null(version)) [13:31:09.701] version <- utils::packageVersion("future") [13:31:09.701] } [13:31:09.701] else { [13:31:09.701] version <- NULL [13:31:09.701] } [13:31:09.701] if (!has_future || version < "1.8.0") { [13:31:09.701] info <- base::c(r_version = base::gsub("R version ", [13:31:09.701] "", base::R.version$version.string), [13:31:09.701] platform = base::sprintf("%s (%s-bit)", [13:31:09.701] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.701] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.701] "release", "version")], collapse = " "), [13:31:09.701] hostname = base::Sys.info()[["nodename"]]) [13:31:09.701] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.701] info) [13:31:09.701] info <- base::paste(info, collapse = "; ") [13:31:09.701] if (!has_future) { [13:31:09.701] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.701] info) [13:31:09.701] } [13:31:09.701] else { [13:31:09.701] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.701] info, version) [13:31:09.701] } [13:31:09.701] base::stop(msg) [13:31:09.701] } [13:31:09.701] }) [13:31:09.701] } [13:31:09.701] base::local({ [13:31:09.701] for (pkg in "stats") { [13:31:09.701] base::loadNamespace(pkg) [13:31:09.701] base::library(pkg, character.only = TRUE) [13:31:09.701] } [13:31:09.701] }) [13:31:09.701] } [13:31:09.701] ...future.strategy.old <- future::plan("list") [13:31:09.701] options(future.plan = NULL) [13:31:09.701] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.701] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.701] } [13:31:09.701] ...future.workdir <- getwd() [13:31:09.701] } [13:31:09.701] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.701] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.701] } [13:31:09.701] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.701] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.701] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.701] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.701] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.701] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.701] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.701] base::names(...future.oldOptions)) [13:31:09.701] } [13:31:09.701] if (FALSE) { [13:31:09.701] } [13:31:09.701] else { [13:31:09.701] if (TRUE) { [13:31:09.701] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.701] open = "w") [13:31:09.701] } [13:31:09.701] else { [13:31:09.701] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.701] windows = "NUL", "/dev/null"), open = "w") [13:31:09.701] } [13:31:09.701] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.701] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.701] base::sink(type = "output", split = FALSE) [13:31:09.701] base::close(...future.stdout) [13:31:09.701] }, add = TRUE) [13:31:09.701] } [13:31:09.701] ...future.frame <- base::sys.nframe() [13:31:09.701] ...future.conditions <- base::list() [13:31:09.701] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.701] if (FALSE) { [13:31:09.701] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.701] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.701] } [13:31:09.701] ...future.result <- base::tryCatch({ [13:31:09.701] base::withCallingHandlers({ [13:31:09.701] ...future.value <- base::withVisible(base::local({ [13:31:09.701] lm(weight ~ group - 1) [13:31:09.701] })) [13:31:09.701] future::FutureResult(value = ...future.value$value, [13:31:09.701] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.701] ...future.rng), globalenv = if (FALSE) [13:31:09.701] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.701] ...future.globalenv.names)) [13:31:09.701] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.701] }, condition = base::local({ [13:31:09.701] c <- base::c [13:31:09.701] inherits <- base::inherits [13:31:09.701] invokeRestart <- base::invokeRestart [13:31:09.701] length <- base::length [13:31:09.701] list <- base::list [13:31:09.701] seq.int <- base::seq.int [13:31:09.701] signalCondition <- base::signalCondition [13:31:09.701] sys.calls <- base::sys.calls [13:31:09.701] `[[` <- base::`[[` [13:31:09.701] `+` <- base::`+` [13:31:09.701] `<<-` <- base::`<<-` [13:31:09.701] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.701] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.701] 3L)] [13:31:09.701] } [13:31:09.701] function(cond) { [13:31:09.701] is_error <- inherits(cond, "error") [13:31:09.701] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.701] NULL) [13:31:09.701] if (is_error) { [13:31:09.701] sessionInformation <- function() { [13:31:09.701] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.701] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.701] search = base::search(), system = base::Sys.info()) [13:31:09.701] } [13:31:09.701] ...future.conditions[[length(...future.conditions) + [13:31:09.701] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.701] cond$call), session = sessionInformation(), [13:31:09.701] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.701] signalCondition(cond) [13:31:09.701] } [13:31:09.701] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.701] signal <- FALSE && inherits(cond, character(0)) [13:31:09.701] ...future.conditions[[length(...future.conditions) + [13:31:09.701] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.701] if (FALSE && !signal) { [13:31:09.701] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.701] { [13:31:09.701] inherits <- base::inherits [13:31:09.701] invokeRestart <- base::invokeRestart [13:31:09.701] is.null <- base::is.null [13:31:09.701] muffled <- FALSE [13:31:09.701] if (inherits(cond, "message")) { [13:31:09.701] muffled <- grepl(pattern, "muffleMessage") [13:31:09.701] if (muffled) [13:31:09.701] invokeRestart("muffleMessage") [13:31:09.701] } [13:31:09.701] else if (inherits(cond, "warning")) { [13:31:09.701] muffled <- grepl(pattern, "muffleWarning") [13:31:09.701] if (muffled) [13:31:09.701] invokeRestart("muffleWarning") [13:31:09.701] } [13:31:09.701] else if (inherits(cond, "condition")) { [13:31:09.701] if (!is.null(pattern)) { [13:31:09.701] computeRestarts <- base::computeRestarts [13:31:09.701] grepl <- base::grepl [13:31:09.701] restarts <- computeRestarts(cond) [13:31:09.701] for (restart in restarts) { [13:31:09.701] name <- restart$name [13:31:09.701] if (is.null(name)) [13:31:09.701] next [13:31:09.701] if (!grepl(pattern, name)) [13:31:09.701] next [13:31:09.701] invokeRestart(restart) [13:31:09.701] muffled <- TRUE [13:31:09.701] break [13:31:09.701] } [13:31:09.701] } [13:31:09.701] } [13:31:09.701] invisible(muffled) [13:31:09.701] } [13:31:09.701] muffleCondition(cond, pattern = "^muffle") [13:31:09.701] } [13:31:09.701] } [13:31:09.701] else { [13:31:09.701] if (TRUE) { [13:31:09.701] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.701] { [13:31:09.701] inherits <- base::inherits [13:31:09.701] invokeRestart <- base::invokeRestart [13:31:09.701] is.null <- base::is.null [13:31:09.701] muffled <- FALSE [13:31:09.701] if (inherits(cond, "message")) { [13:31:09.701] muffled <- grepl(pattern, "muffleMessage") [13:31:09.701] if (muffled) [13:31:09.701] invokeRestart("muffleMessage") [13:31:09.701] } [13:31:09.701] else if (inherits(cond, "warning")) { [13:31:09.701] muffled <- grepl(pattern, "muffleWarning") [13:31:09.701] if (muffled) [13:31:09.701] invokeRestart("muffleWarning") [13:31:09.701] } [13:31:09.701] else if (inherits(cond, "condition")) { [13:31:09.701] if (!is.null(pattern)) { [13:31:09.701] computeRestarts <- base::computeRestarts [13:31:09.701] grepl <- base::grepl [13:31:09.701] restarts <- computeRestarts(cond) [13:31:09.701] for (restart in restarts) { [13:31:09.701] name <- restart$name [13:31:09.701] if (is.null(name)) [13:31:09.701] next [13:31:09.701] if (!grepl(pattern, name)) [13:31:09.701] next [13:31:09.701] invokeRestart(restart) [13:31:09.701] muffled <- TRUE [13:31:09.701] break [13:31:09.701] } [13:31:09.701] } [13:31:09.701] } [13:31:09.701] invisible(muffled) [13:31:09.701] } [13:31:09.701] muffleCondition(cond, pattern = "^muffle") [13:31:09.701] } [13:31:09.701] } [13:31:09.701] } [13:31:09.701] })) [13:31:09.701] }, error = function(ex) { [13:31:09.701] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.701] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.701] ...future.rng), started = ...future.startTime, [13:31:09.701] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.701] version = "1.8"), class = "FutureResult") [13:31:09.701] }, finally = { [13:31:09.701] if (!identical(...future.workdir, getwd())) [13:31:09.701] setwd(...future.workdir) [13:31:09.701] { [13:31:09.701] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.701] ...future.oldOptions$nwarnings <- NULL [13:31:09.701] } [13:31:09.701] base::options(...future.oldOptions) [13:31:09.701] if (.Platform$OS.type == "windows") { [13:31:09.701] old_names <- names(...future.oldEnvVars) [13:31:09.701] envs <- base::Sys.getenv() [13:31:09.701] names <- names(envs) [13:31:09.701] common <- intersect(names, old_names) [13:31:09.701] added <- setdiff(names, old_names) [13:31:09.701] removed <- setdiff(old_names, names) [13:31:09.701] changed <- common[...future.oldEnvVars[common] != [13:31:09.701] envs[common]] [13:31:09.701] NAMES <- toupper(changed) [13:31:09.701] args <- list() [13:31:09.701] for (kk in seq_along(NAMES)) { [13:31:09.701] name <- changed[[kk]] [13:31:09.701] NAME <- NAMES[[kk]] [13:31:09.701] if (name != NAME && is.element(NAME, old_names)) [13:31:09.701] next [13:31:09.701] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.701] } [13:31:09.701] NAMES <- toupper(added) [13:31:09.701] for (kk in seq_along(NAMES)) { [13:31:09.701] name <- added[[kk]] [13:31:09.701] NAME <- NAMES[[kk]] [13:31:09.701] if (name != NAME && is.element(NAME, old_names)) [13:31:09.701] next [13:31:09.701] args[[name]] <- "" [13:31:09.701] } [13:31:09.701] NAMES <- toupper(removed) [13:31:09.701] for (kk in seq_along(NAMES)) { [13:31:09.701] name <- removed[[kk]] [13:31:09.701] NAME <- NAMES[[kk]] [13:31:09.701] if (name != NAME && is.element(NAME, old_names)) [13:31:09.701] next [13:31:09.701] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.701] } [13:31:09.701] if (length(args) > 0) [13:31:09.701] base::do.call(base::Sys.setenv, args = args) [13:31:09.701] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.701] } [13:31:09.701] else { [13:31:09.701] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.701] } [13:31:09.701] { [13:31:09.701] if (base::length(...future.futureOptionsAdded) > [13:31:09.701] 0L) { [13:31:09.701] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.701] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.701] base::options(opts) [13:31:09.701] } [13:31:09.701] { [13:31:09.701] NULL [13:31:09.701] options(future.plan = NULL) [13:31:09.701] if (is.na(NA_character_)) [13:31:09.701] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.701] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.701] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.701] .init = FALSE) [13:31:09.701] } [13:31:09.701] } [13:31:09.701] } [13:31:09.701] }) [13:31:09.701] if (TRUE) { [13:31:09.701] base::sink(type = "output", split = FALSE) [13:31:09.701] if (TRUE) { [13:31:09.701] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.701] } [13:31:09.701] else { [13:31:09.701] ...future.result["stdout"] <- base::list(NULL) [13:31:09.701] } [13:31:09.701] base::close(...future.stdout) [13:31:09.701] ...future.stdout <- NULL [13:31:09.701] } [13:31:09.701] ...future.result$conditions <- ...future.conditions [13:31:09.701] ...future.result$finished <- base::Sys.time() [13:31:09.701] ...future.result [13:31:09.701] } [13:31:09.705] - Launch lazy future ... done [13:31:09.705] 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:09.715] getGlobalsAndPackages() ... [13:31:09.715] Searching for globals... [13:31:09.717] - globals found: [6] '{', 'lm', 'weight', '-', 'group', '~' [13:31:09.717] Searching for globals ... DONE [13:31:09.717] Resolving globals: FALSE [13:31:09.718] The total size of the 2 globals is 896 bytes (896 bytes) [13:31:09.718] 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:09.719] - globals: [2] 'weight', 'group' [13:31:09.719] - packages: [1] 'stats' [13:31:09.719] getGlobalsAndPackages() ... DONE [13:31:09.719] run() for 'Future' ... [13:31:09.720] - state: 'created' [13:31:09.720] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.724] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.724] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.724] - Field: 'label' [13:31:09.724] - Field: 'local' [13:31:09.725] - Field: 'owner' [13:31:09.725] - Field: 'envir' [13:31:09.725] - Field: 'packages' [13:31:09.725] - Field: 'gc' [13:31:09.725] - Field: 'conditions' [13:31:09.725] - Field: 'expr' [13:31:09.726] - Field: 'uuid' [13:31:09.726] - Field: 'seed' [13:31:09.726] - Field: 'version' [13:31:09.726] - Field: 'result' [13:31:09.726] - Field: 'asynchronous' [13:31:09.726] - Field: 'calls' [13:31:09.727] - Field: 'globals' [13:31:09.727] - Field: 'stdout' [13:31:09.727] - Field: 'earlySignal' [13:31:09.727] - Field: 'lazy' [13:31:09.727] - Field: 'state' [13:31:09.727] - Field: '.cluster' [13:31:09.728] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.728] - Launch lazy future ... [13:31:09.728] Packages needed by the future expression (n = 1): 'stats' [13:31:09.728] Packages needed by future strategies (n = 0): [13:31:09.729] { [13:31:09.729] { [13:31:09.729] { [13:31:09.729] ...future.startTime <- base::Sys.time() [13:31:09.729] { [13:31:09.729] { [13:31:09.729] { [13:31:09.729] { [13:31:09.729] base::local({ [13:31:09.729] has_future <- base::requireNamespace("future", [13:31:09.729] quietly = TRUE) [13:31:09.729] if (has_future) { [13:31:09.729] ns <- base::getNamespace("future") [13:31:09.729] version <- ns[[".package"]][["version"]] [13:31:09.729] if (is.null(version)) [13:31:09.729] version <- utils::packageVersion("future") [13:31:09.729] } [13:31:09.729] else { [13:31:09.729] version <- NULL [13:31:09.729] } [13:31:09.729] if (!has_future || version < "1.8.0") { [13:31:09.729] info <- base::c(r_version = base::gsub("R version ", [13:31:09.729] "", base::R.version$version.string), [13:31:09.729] platform = base::sprintf("%s (%s-bit)", [13:31:09.729] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.729] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.729] "release", "version")], collapse = " "), [13:31:09.729] hostname = base::Sys.info()[["nodename"]]) [13:31:09.729] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.729] info) [13:31:09.729] info <- base::paste(info, collapse = "; ") [13:31:09.729] if (!has_future) { [13:31:09.729] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.729] info) [13:31:09.729] } [13:31:09.729] else { [13:31:09.729] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.729] info, version) [13:31:09.729] } [13:31:09.729] base::stop(msg) [13:31:09.729] } [13:31:09.729] }) [13:31:09.729] } [13:31:09.729] base::local({ [13:31:09.729] for (pkg in "stats") { [13:31:09.729] base::loadNamespace(pkg) [13:31:09.729] base::library(pkg, character.only = TRUE) [13:31:09.729] } [13:31:09.729] }) [13:31:09.729] } [13:31:09.729] ...future.strategy.old <- future::plan("list") [13:31:09.729] options(future.plan = NULL) [13:31:09.729] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.729] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.729] } [13:31:09.729] ...future.workdir <- getwd() [13:31:09.729] } [13:31:09.729] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.729] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.729] } [13:31:09.729] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.729] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.729] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.729] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.729] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.729] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.729] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.729] base::names(...future.oldOptions)) [13:31:09.729] } [13:31:09.729] if (FALSE) { [13:31:09.729] } [13:31:09.729] else { [13:31:09.729] if (TRUE) { [13:31:09.729] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.729] open = "w") [13:31:09.729] } [13:31:09.729] else { [13:31:09.729] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.729] windows = "NUL", "/dev/null"), open = "w") [13:31:09.729] } [13:31:09.729] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.729] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.729] base::sink(type = "output", split = FALSE) [13:31:09.729] base::close(...future.stdout) [13:31:09.729] }, add = TRUE) [13:31:09.729] } [13:31:09.729] ...future.frame <- base::sys.nframe() [13:31:09.729] ...future.conditions <- base::list() [13:31:09.729] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.729] if (FALSE) { [13:31:09.729] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.729] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.729] } [13:31:09.729] ...future.result <- base::tryCatch({ [13:31:09.729] base::withCallingHandlers({ [13:31:09.729] ...future.value <- base::withVisible(base::local({ [13:31:09.729] lm(weight ~ group - 1) [13:31:09.729] })) [13:31:09.729] future::FutureResult(value = ...future.value$value, [13:31:09.729] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.729] ...future.rng), globalenv = if (FALSE) [13:31:09.729] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.729] ...future.globalenv.names)) [13:31:09.729] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.729] }, condition = base::local({ [13:31:09.729] c <- base::c [13:31:09.729] inherits <- base::inherits [13:31:09.729] invokeRestart <- base::invokeRestart [13:31:09.729] length <- base::length [13:31:09.729] list <- base::list [13:31:09.729] seq.int <- base::seq.int [13:31:09.729] signalCondition <- base::signalCondition [13:31:09.729] sys.calls <- base::sys.calls [13:31:09.729] `[[` <- base::`[[` [13:31:09.729] `+` <- base::`+` [13:31:09.729] `<<-` <- base::`<<-` [13:31:09.729] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.729] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.729] 3L)] [13:31:09.729] } [13:31:09.729] function(cond) { [13:31:09.729] is_error <- inherits(cond, "error") [13:31:09.729] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.729] NULL) [13:31:09.729] if (is_error) { [13:31:09.729] sessionInformation <- function() { [13:31:09.729] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.729] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.729] search = base::search(), system = base::Sys.info()) [13:31:09.729] } [13:31:09.729] ...future.conditions[[length(...future.conditions) + [13:31:09.729] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.729] cond$call), session = sessionInformation(), [13:31:09.729] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.729] signalCondition(cond) [13:31:09.729] } [13:31:09.729] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.729] signal <- FALSE && inherits(cond, character(0)) [13:31:09.729] ...future.conditions[[length(...future.conditions) + [13:31:09.729] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.729] if (FALSE && !signal) { [13:31:09.729] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.729] { [13:31:09.729] inherits <- base::inherits [13:31:09.729] invokeRestart <- base::invokeRestart [13:31:09.729] is.null <- base::is.null [13:31:09.729] muffled <- FALSE [13:31:09.729] if (inherits(cond, "message")) { [13:31:09.729] muffled <- grepl(pattern, "muffleMessage") [13:31:09.729] if (muffled) [13:31:09.729] invokeRestart("muffleMessage") [13:31:09.729] } [13:31:09.729] else if (inherits(cond, "warning")) { [13:31:09.729] muffled <- grepl(pattern, "muffleWarning") [13:31:09.729] if (muffled) [13:31:09.729] invokeRestart("muffleWarning") [13:31:09.729] } [13:31:09.729] else if (inherits(cond, "condition")) { [13:31:09.729] if (!is.null(pattern)) { [13:31:09.729] computeRestarts <- base::computeRestarts [13:31:09.729] grepl <- base::grepl [13:31:09.729] restarts <- computeRestarts(cond) [13:31:09.729] for (restart in restarts) { [13:31:09.729] name <- restart$name [13:31:09.729] if (is.null(name)) [13:31:09.729] next [13:31:09.729] if (!grepl(pattern, name)) [13:31:09.729] next [13:31:09.729] invokeRestart(restart) [13:31:09.729] muffled <- TRUE [13:31:09.729] break [13:31:09.729] } [13:31:09.729] } [13:31:09.729] } [13:31:09.729] invisible(muffled) [13:31:09.729] } [13:31:09.729] muffleCondition(cond, pattern = "^muffle") [13:31:09.729] } [13:31:09.729] } [13:31:09.729] else { [13:31:09.729] if (TRUE) { [13:31:09.729] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.729] { [13:31:09.729] inherits <- base::inherits [13:31:09.729] invokeRestart <- base::invokeRestart [13:31:09.729] is.null <- base::is.null [13:31:09.729] muffled <- FALSE [13:31:09.729] if (inherits(cond, "message")) { [13:31:09.729] muffled <- grepl(pattern, "muffleMessage") [13:31:09.729] if (muffled) [13:31:09.729] invokeRestart("muffleMessage") [13:31:09.729] } [13:31:09.729] else if (inherits(cond, "warning")) { [13:31:09.729] muffled <- grepl(pattern, "muffleWarning") [13:31:09.729] if (muffled) [13:31:09.729] invokeRestart("muffleWarning") [13:31:09.729] } [13:31:09.729] else if (inherits(cond, "condition")) { [13:31:09.729] if (!is.null(pattern)) { [13:31:09.729] computeRestarts <- base::computeRestarts [13:31:09.729] grepl <- base::grepl [13:31:09.729] restarts <- computeRestarts(cond) [13:31:09.729] for (restart in restarts) { [13:31:09.729] name <- restart$name [13:31:09.729] if (is.null(name)) [13:31:09.729] next [13:31:09.729] if (!grepl(pattern, name)) [13:31:09.729] next [13:31:09.729] invokeRestart(restart) [13:31:09.729] muffled <- TRUE [13:31:09.729] break [13:31:09.729] } [13:31:09.729] } [13:31:09.729] } [13:31:09.729] invisible(muffled) [13:31:09.729] } [13:31:09.729] muffleCondition(cond, pattern = "^muffle") [13:31:09.729] } [13:31:09.729] } [13:31:09.729] } [13:31:09.729] })) [13:31:09.729] }, error = function(ex) { [13:31:09.729] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.729] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.729] ...future.rng), started = ...future.startTime, [13:31:09.729] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.729] version = "1.8"), class = "FutureResult") [13:31:09.729] }, finally = { [13:31:09.729] if (!identical(...future.workdir, getwd())) [13:31:09.729] setwd(...future.workdir) [13:31:09.729] { [13:31:09.729] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.729] ...future.oldOptions$nwarnings <- NULL [13:31:09.729] } [13:31:09.729] base::options(...future.oldOptions) [13:31:09.729] if (.Platform$OS.type == "windows") { [13:31:09.729] old_names <- names(...future.oldEnvVars) [13:31:09.729] envs <- base::Sys.getenv() [13:31:09.729] names <- names(envs) [13:31:09.729] common <- intersect(names, old_names) [13:31:09.729] added <- setdiff(names, old_names) [13:31:09.729] removed <- setdiff(old_names, names) [13:31:09.729] changed <- common[...future.oldEnvVars[common] != [13:31:09.729] envs[common]] [13:31:09.729] NAMES <- toupper(changed) [13:31:09.729] args <- list() [13:31:09.729] for (kk in seq_along(NAMES)) { [13:31:09.729] name <- changed[[kk]] [13:31:09.729] NAME <- NAMES[[kk]] [13:31:09.729] if (name != NAME && is.element(NAME, old_names)) [13:31:09.729] next [13:31:09.729] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.729] } [13:31:09.729] NAMES <- toupper(added) [13:31:09.729] for (kk in seq_along(NAMES)) { [13:31:09.729] name <- added[[kk]] [13:31:09.729] NAME <- NAMES[[kk]] [13:31:09.729] if (name != NAME && is.element(NAME, old_names)) [13:31:09.729] next [13:31:09.729] args[[name]] <- "" [13:31:09.729] } [13:31:09.729] NAMES <- toupper(removed) [13:31:09.729] for (kk in seq_along(NAMES)) { [13:31:09.729] name <- removed[[kk]] [13:31:09.729] NAME <- NAMES[[kk]] [13:31:09.729] if (name != NAME && is.element(NAME, old_names)) [13:31:09.729] next [13:31:09.729] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.729] } [13:31:09.729] if (length(args) > 0) [13:31:09.729] base::do.call(base::Sys.setenv, args = args) [13:31:09.729] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.729] } [13:31:09.729] else { [13:31:09.729] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.729] } [13:31:09.729] { [13:31:09.729] if (base::length(...future.futureOptionsAdded) > [13:31:09.729] 0L) { [13:31:09.729] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.729] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.729] base::options(opts) [13:31:09.729] } [13:31:09.729] { [13:31:09.729] NULL [13:31:09.729] options(future.plan = NULL) [13:31:09.729] if (is.na(NA_character_)) [13:31:09.729] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.729] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.729] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.729] .init = FALSE) [13:31:09.729] } [13:31:09.729] } [13:31:09.729] } [13:31:09.729] }) [13:31:09.729] if (TRUE) { [13:31:09.729] base::sink(type = "output", split = FALSE) [13:31:09.729] if (TRUE) { [13:31:09.729] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.729] } [13:31:09.729] else { [13:31:09.729] ...future.result["stdout"] <- base::list(NULL) [13:31:09.729] } [13:31:09.729] base::close(...future.stdout) [13:31:09.729] ...future.stdout <- NULL [13:31:09.729] } [13:31:09.729] ...future.result$conditions <- ...future.conditions [13:31:09.729] ...future.result$finished <- base::Sys.time() [13:31:09.729] ...future.result [13:31:09.729] } [13:31:09.733] - Launch lazy future ... done [13:31:09.733] 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:09.743] getGlobalsAndPackages() ... [13:31:09.743] Searching for globals... [13:31:09.744] - globals found: [4] '{', 'xtabs', 'x', '~' [13:31:09.745] Searching for globals ... DONE [13:31:09.745] Resolving globals: FALSE [13:31:09.745] The total size of the 1 globals is 96 bytes (96 bytes) [13:31:09.746] 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:09.746] - globals: [1] 'x' [13:31:09.747] - packages: [1] 'stats' [13:31:09.747] getGlobalsAndPackages() ... DONE [13:31:09.747] run() for 'Future' ... [13:31:09.748] - state: 'created' [13:31:09.748] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.751] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.751] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.752] - Field: 'label' [13:31:09.752] - Field: 'local' [13:31:09.752] - Field: 'owner' [13:31:09.752] - Field: 'envir' [13:31:09.753] - Field: 'packages' [13:31:09.753] - Field: 'gc' [13:31:09.753] - Field: 'conditions' [13:31:09.753] - Field: 'expr' [13:31:09.754] - Field: 'uuid' [13:31:09.754] - Field: 'seed' [13:31:09.754] - Field: 'version' [13:31:09.755] - Field: 'result' [13:31:09.755] - Field: 'asynchronous' [13:31:09.755] - Field: 'calls' [13:31:09.755] - Field: 'globals' [13:31:09.756] - Field: 'stdout' [13:31:09.756] - Field: 'earlySignal' [13:31:09.756] - Field: 'lazy' [13:31:09.756] - Field: 'state' [13:31:09.757] - Field: '.cluster' [13:31:09.757] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.757] - Launch lazy future ... [13:31:09.757] Packages needed by the future expression (n = 1): 'stats' [13:31:09.758] Packages needed by future strategies (n = 0): [13:31:09.758] { [13:31:09.758] { [13:31:09.758] { [13:31:09.758] ...future.startTime <- base::Sys.time() [13:31:09.758] { [13:31:09.758] { [13:31:09.758] { [13:31:09.758] { [13:31:09.758] base::local({ [13:31:09.758] has_future <- base::requireNamespace("future", [13:31:09.758] quietly = TRUE) [13:31:09.758] if (has_future) { [13:31:09.758] ns <- base::getNamespace("future") [13:31:09.758] version <- ns[[".package"]][["version"]] [13:31:09.758] if (is.null(version)) [13:31:09.758] version <- utils::packageVersion("future") [13:31:09.758] } [13:31:09.758] else { [13:31:09.758] version <- NULL [13:31:09.758] } [13:31:09.758] if (!has_future || version < "1.8.0") { [13:31:09.758] info <- base::c(r_version = base::gsub("R version ", [13:31:09.758] "", base::R.version$version.string), [13:31:09.758] platform = base::sprintf("%s (%s-bit)", [13:31:09.758] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.758] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.758] "release", "version")], collapse = " "), [13:31:09.758] hostname = base::Sys.info()[["nodename"]]) [13:31:09.758] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.758] info) [13:31:09.758] info <- base::paste(info, collapse = "; ") [13:31:09.758] if (!has_future) { [13:31:09.758] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.758] info) [13:31:09.758] } [13:31:09.758] else { [13:31:09.758] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.758] info, version) [13:31:09.758] } [13:31:09.758] base::stop(msg) [13:31:09.758] } [13:31:09.758] }) [13:31:09.758] } [13:31:09.758] base::local({ [13:31:09.758] for (pkg in "stats") { [13:31:09.758] base::loadNamespace(pkg) [13:31:09.758] base::library(pkg, character.only = TRUE) [13:31:09.758] } [13:31:09.758] }) [13:31:09.758] } [13:31:09.758] ...future.strategy.old <- future::plan("list") [13:31:09.758] options(future.plan = NULL) [13:31:09.758] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.758] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.758] } [13:31:09.758] ...future.workdir <- getwd() [13:31:09.758] } [13:31:09.758] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.758] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.758] } [13:31:09.758] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.758] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.758] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.758] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.758] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.758] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.758] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.758] base::names(...future.oldOptions)) [13:31:09.758] } [13:31:09.758] if (FALSE) { [13:31:09.758] } [13:31:09.758] else { [13:31:09.758] if (TRUE) { [13:31:09.758] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.758] open = "w") [13:31:09.758] } [13:31:09.758] else { [13:31:09.758] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.758] windows = "NUL", "/dev/null"), open = "w") [13:31:09.758] } [13:31:09.758] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.758] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.758] base::sink(type = "output", split = FALSE) [13:31:09.758] base::close(...future.stdout) [13:31:09.758] }, add = TRUE) [13:31:09.758] } [13:31:09.758] ...future.frame <- base::sys.nframe() [13:31:09.758] ...future.conditions <- base::list() [13:31:09.758] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.758] if (FALSE) { [13:31:09.758] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.758] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.758] } [13:31:09.758] ...future.result <- base::tryCatch({ [13:31:09.758] base::withCallingHandlers({ [13:31:09.758] ...future.value <- base::withVisible(base::local({ [13:31:09.758] xtabs(~x) [13:31:09.758] })) [13:31:09.758] future::FutureResult(value = ...future.value$value, [13:31:09.758] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.758] ...future.rng), globalenv = if (FALSE) [13:31:09.758] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.758] ...future.globalenv.names)) [13:31:09.758] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.758] }, condition = base::local({ [13:31:09.758] c <- base::c [13:31:09.758] inherits <- base::inherits [13:31:09.758] invokeRestart <- base::invokeRestart [13:31:09.758] length <- base::length [13:31:09.758] list <- base::list [13:31:09.758] seq.int <- base::seq.int [13:31:09.758] signalCondition <- base::signalCondition [13:31:09.758] sys.calls <- base::sys.calls [13:31:09.758] `[[` <- base::`[[` [13:31:09.758] `+` <- base::`+` [13:31:09.758] `<<-` <- base::`<<-` [13:31:09.758] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.758] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.758] 3L)] [13:31:09.758] } [13:31:09.758] function(cond) { [13:31:09.758] is_error <- inherits(cond, "error") [13:31:09.758] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.758] NULL) [13:31:09.758] if (is_error) { [13:31:09.758] sessionInformation <- function() { [13:31:09.758] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.758] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.758] search = base::search(), system = base::Sys.info()) [13:31:09.758] } [13:31:09.758] ...future.conditions[[length(...future.conditions) + [13:31:09.758] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.758] cond$call), session = sessionInformation(), [13:31:09.758] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.758] signalCondition(cond) [13:31:09.758] } [13:31:09.758] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.758] signal <- FALSE && inherits(cond, character(0)) [13:31:09.758] ...future.conditions[[length(...future.conditions) + [13:31:09.758] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.758] if (FALSE && !signal) { [13:31:09.758] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.758] { [13:31:09.758] inherits <- base::inherits [13:31:09.758] invokeRestart <- base::invokeRestart [13:31:09.758] is.null <- base::is.null [13:31:09.758] muffled <- FALSE [13:31:09.758] if (inherits(cond, "message")) { [13:31:09.758] muffled <- grepl(pattern, "muffleMessage") [13:31:09.758] if (muffled) [13:31:09.758] invokeRestart("muffleMessage") [13:31:09.758] } [13:31:09.758] else if (inherits(cond, "warning")) { [13:31:09.758] muffled <- grepl(pattern, "muffleWarning") [13:31:09.758] if (muffled) [13:31:09.758] invokeRestart("muffleWarning") [13:31:09.758] } [13:31:09.758] else if (inherits(cond, "condition")) { [13:31:09.758] if (!is.null(pattern)) { [13:31:09.758] computeRestarts <- base::computeRestarts [13:31:09.758] grepl <- base::grepl [13:31:09.758] restarts <- computeRestarts(cond) [13:31:09.758] for (restart in restarts) { [13:31:09.758] name <- restart$name [13:31:09.758] if (is.null(name)) [13:31:09.758] next [13:31:09.758] if (!grepl(pattern, name)) [13:31:09.758] next [13:31:09.758] invokeRestart(restart) [13:31:09.758] muffled <- TRUE [13:31:09.758] break [13:31:09.758] } [13:31:09.758] } [13:31:09.758] } [13:31:09.758] invisible(muffled) [13:31:09.758] } [13:31:09.758] muffleCondition(cond, pattern = "^muffle") [13:31:09.758] } [13:31:09.758] } [13:31:09.758] else { [13:31:09.758] if (TRUE) { [13:31:09.758] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.758] { [13:31:09.758] inherits <- base::inherits [13:31:09.758] invokeRestart <- base::invokeRestart [13:31:09.758] is.null <- base::is.null [13:31:09.758] muffled <- FALSE [13:31:09.758] if (inherits(cond, "message")) { [13:31:09.758] muffled <- grepl(pattern, "muffleMessage") [13:31:09.758] if (muffled) [13:31:09.758] invokeRestart("muffleMessage") [13:31:09.758] } [13:31:09.758] else if (inherits(cond, "warning")) { [13:31:09.758] muffled <- grepl(pattern, "muffleWarning") [13:31:09.758] if (muffled) [13:31:09.758] invokeRestart("muffleWarning") [13:31:09.758] } [13:31:09.758] else if (inherits(cond, "condition")) { [13:31:09.758] if (!is.null(pattern)) { [13:31:09.758] computeRestarts <- base::computeRestarts [13:31:09.758] grepl <- base::grepl [13:31:09.758] restarts <- computeRestarts(cond) [13:31:09.758] for (restart in restarts) { [13:31:09.758] name <- restart$name [13:31:09.758] if (is.null(name)) [13:31:09.758] next [13:31:09.758] if (!grepl(pattern, name)) [13:31:09.758] next [13:31:09.758] invokeRestart(restart) [13:31:09.758] muffled <- TRUE [13:31:09.758] break [13:31:09.758] } [13:31:09.758] } [13:31:09.758] } [13:31:09.758] invisible(muffled) [13:31:09.758] } [13:31:09.758] muffleCondition(cond, pattern = "^muffle") [13:31:09.758] } [13:31:09.758] } [13:31:09.758] } [13:31:09.758] })) [13:31:09.758] }, error = function(ex) { [13:31:09.758] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.758] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.758] ...future.rng), started = ...future.startTime, [13:31:09.758] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.758] version = "1.8"), class = "FutureResult") [13:31:09.758] }, finally = { [13:31:09.758] if (!identical(...future.workdir, getwd())) [13:31:09.758] setwd(...future.workdir) [13:31:09.758] { [13:31:09.758] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.758] ...future.oldOptions$nwarnings <- NULL [13:31:09.758] } [13:31:09.758] base::options(...future.oldOptions) [13:31:09.758] if (.Platform$OS.type == "windows") { [13:31:09.758] old_names <- names(...future.oldEnvVars) [13:31:09.758] envs <- base::Sys.getenv() [13:31:09.758] names <- names(envs) [13:31:09.758] common <- intersect(names, old_names) [13:31:09.758] added <- setdiff(names, old_names) [13:31:09.758] removed <- setdiff(old_names, names) [13:31:09.758] changed <- common[...future.oldEnvVars[common] != [13:31:09.758] envs[common]] [13:31:09.758] NAMES <- toupper(changed) [13:31:09.758] args <- list() [13:31:09.758] for (kk in seq_along(NAMES)) { [13:31:09.758] name <- changed[[kk]] [13:31:09.758] NAME <- NAMES[[kk]] [13:31:09.758] if (name != NAME && is.element(NAME, old_names)) [13:31:09.758] next [13:31:09.758] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.758] } [13:31:09.758] NAMES <- toupper(added) [13:31:09.758] for (kk in seq_along(NAMES)) { [13:31:09.758] name <- added[[kk]] [13:31:09.758] NAME <- NAMES[[kk]] [13:31:09.758] if (name != NAME && is.element(NAME, old_names)) [13:31:09.758] next [13:31:09.758] args[[name]] <- "" [13:31:09.758] } [13:31:09.758] NAMES <- toupper(removed) [13:31:09.758] for (kk in seq_along(NAMES)) { [13:31:09.758] name <- removed[[kk]] [13:31:09.758] NAME <- NAMES[[kk]] [13:31:09.758] if (name != NAME && is.element(NAME, old_names)) [13:31:09.758] next [13:31:09.758] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.758] } [13:31:09.758] if (length(args) > 0) [13:31:09.758] base::do.call(base::Sys.setenv, args = args) [13:31:09.758] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.758] } [13:31:09.758] else { [13:31:09.758] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.758] } [13:31:09.758] { [13:31:09.758] if (base::length(...future.futureOptionsAdded) > [13:31:09.758] 0L) { [13:31:09.758] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.758] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.758] base::options(opts) [13:31:09.758] } [13:31:09.758] { [13:31:09.758] NULL [13:31:09.758] options(future.plan = NULL) [13:31:09.758] if (is.na(NA_character_)) [13:31:09.758] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.758] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.758] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.758] .init = FALSE) [13:31:09.758] } [13:31:09.758] } [13:31:09.758] } [13:31:09.758] }) [13:31:09.758] if (TRUE) { [13:31:09.758] base::sink(type = "output", split = FALSE) [13:31:09.758] if (TRUE) { [13:31:09.758] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.758] } [13:31:09.758] else { [13:31:09.758] ...future.result["stdout"] <- base::list(NULL) [13:31:09.758] } [13:31:09.758] base::close(...future.stdout) [13:31:09.758] ...future.stdout <- NULL [13:31:09.758] } [13:31:09.758] ...future.result$conditions <- ...future.conditions [13:31:09.758] ...future.result$finished <- base::Sys.time() [13:31:09.758] ...future.result [13:31:09.758] } [13:31:09.762] - Launch lazy future ... done [13:31:09.763] 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:09.766] getGlobalsAndPackages() ... [13:31:09.767] Searching for globals... [13:31:09.770] - globals found: [4] '{', 'xtabs', 'x', '~' [13:31:09.770] Searching for globals ... DONE [13:31:09.770] Resolving globals: FALSE [13:31:09.770] The total size of the 1 globals is 96 bytes (96 bytes) [13:31:09.771] 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:09.771] - globals: [1] 'x' [13:31:09.771] - packages: [1] 'stats' [13:31:09.771] getGlobalsAndPackages() ... DONE [13:31:09.772] run() for 'Future' ... [13:31:09.772] - state: 'created' [13:31:09.772] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.774] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.775] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.775] - Field: 'label' [13:31:09.775] - Field: 'local' [13:31:09.775] - Field: 'owner' [13:31:09.775] - Field: 'envir' [13:31:09.776] - Field: 'packages' [13:31:09.776] - Field: 'gc' [13:31:09.776] - Field: 'conditions' [13:31:09.776] - Field: 'expr' [13:31:09.776] - Field: 'uuid' [13:31:09.776] - Field: 'seed' [13:31:09.777] - Field: 'version' [13:31:09.777] - Field: 'result' [13:31:09.777] - Field: 'asynchronous' [13:31:09.777] - Field: 'calls' [13:31:09.777] - Field: 'globals' [13:31:09.777] - Field: 'stdout' [13:31:09.778] - Field: 'earlySignal' [13:31:09.778] - Field: 'lazy' [13:31:09.778] - Field: 'state' [13:31:09.778] - Field: '.cluster' [13:31:09.778] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.778] - Launch lazy future ... [13:31:09.779] Packages needed by the future expression (n = 1): 'stats' [13:31:09.779] Packages needed by future strategies (n = 0): [13:31:09.779] { [13:31:09.779] { [13:31:09.779] { [13:31:09.779] ...future.startTime <- base::Sys.time() [13:31:09.779] { [13:31:09.779] { [13:31:09.779] { [13:31:09.779] { [13:31:09.779] base::local({ [13:31:09.779] has_future <- base::requireNamespace("future", [13:31:09.779] quietly = TRUE) [13:31:09.779] if (has_future) { [13:31:09.779] ns <- base::getNamespace("future") [13:31:09.779] version <- ns[[".package"]][["version"]] [13:31:09.779] if (is.null(version)) [13:31:09.779] version <- utils::packageVersion("future") [13:31:09.779] } [13:31:09.779] else { [13:31:09.779] version <- NULL [13:31:09.779] } [13:31:09.779] if (!has_future || version < "1.8.0") { [13:31:09.779] info <- base::c(r_version = base::gsub("R version ", [13:31:09.779] "", base::R.version$version.string), [13:31:09.779] platform = base::sprintf("%s (%s-bit)", [13:31:09.779] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.779] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.779] "release", "version")], collapse = " "), [13:31:09.779] hostname = base::Sys.info()[["nodename"]]) [13:31:09.779] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.779] info) [13:31:09.779] info <- base::paste(info, collapse = "; ") [13:31:09.779] if (!has_future) { [13:31:09.779] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.779] info) [13:31:09.779] } [13:31:09.779] else { [13:31:09.779] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.779] info, version) [13:31:09.779] } [13:31:09.779] base::stop(msg) [13:31:09.779] } [13:31:09.779] }) [13:31:09.779] } [13:31:09.779] base::local({ [13:31:09.779] for (pkg in "stats") { [13:31:09.779] base::loadNamespace(pkg) [13:31:09.779] base::library(pkg, character.only = TRUE) [13:31:09.779] } [13:31:09.779] }) [13:31:09.779] } [13:31:09.779] ...future.strategy.old <- future::plan("list") [13:31:09.779] options(future.plan = NULL) [13:31:09.779] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.779] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.779] } [13:31:09.779] ...future.workdir <- getwd() [13:31:09.779] } [13:31:09.779] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.779] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.779] } [13:31:09.779] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.779] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.779] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.779] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.779] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.779] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.779] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.779] base::names(...future.oldOptions)) [13:31:09.779] } [13:31:09.779] if (FALSE) { [13:31:09.779] } [13:31:09.779] else { [13:31:09.779] if (TRUE) { [13:31:09.779] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.779] open = "w") [13:31:09.779] } [13:31:09.779] else { [13:31:09.779] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.779] windows = "NUL", "/dev/null"), open = "w") [13:31:09.779] } [13:31:09.779] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.779] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.779] base::sink(type = "output", split = FALSE) [13:31:09.779] base::close(...future.stdout) [13:31:09.779] }, add = TRUE) [13:31:09.779] } [13:31:09.779] ...future.frame <- base::sys.nframe() [13:31:09.779] ...future.conditions <- base::list() [13:31:09.779] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.779] if (FALSE) { [13:31:09.779] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.779] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.779] } [13:31:09.779] ...future.result <- base::tryCatch({ [13:31:09.779] base::withCallingHandlers({ [13:31:09.779] ...future.value <- base::withVisible(base::local({ [13:31:09.779] xtabs(~x) [13:31:09.779] })) [13:31:09.779] future::FutureResult(value = ...future.value$value, [13:31:09.779] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.779] ...future.rng), globalenv = if (FALSE) [13:31:09.779] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.779] ...future.globalenv.names)) [13:31:09.779] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.779] }, condition = base::local({ [13:31:09.779] c <- base::c [13:31:09.779] inherits <- base::inherits [13:31:09.779] invokeRestart <- base::invokeRestart [13:31:09.779] length <- base::length [13:31:09.779] list <- base::list [13:31:09.779] seq.int <- base::seq.int [13:31:09.779] signalCondition <- base::signalCondition [13:31:09.779] sys.calls <- base::sys.calls [13:31:09.779] `[[` <- base::`[[` [13:31:09.779] `+` <- base::`+` [13:31:09.779] `<<-` <- base::`<<-` [13:31:09.779] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.779] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.779] 3L)] [13:31:09.779] } [13:31:09.779] function(cond) { [13:31:09.779] is_error <- inherits(cond, "error") [13:31:09.779] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.779] NULL) [13:31:09.779] if (is_error) { [13:31:09.779] sessionInformation <- function() { [13:31:09.779] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.779] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.779] search = base::search(), system = base::Sys.info()) [13:31:09.779] } [13:31:09.779] ...future.conditions[[length(...future.conditions) + [13:31:09.779] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.779] cond$call), session = sessionInformation(), [13:31:09.779] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.779] signalCondition(cond) [13:31:09.779] } [13:31:09.779] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.779] signal <- FALSE && inherits(cond, character(0)) [13:31:09.779] ...future.conditions[[length(...future.conditions) + [13:31:09.779] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.779] if (FALSE && !signal) { [13:31:09.779] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.779] { [13:31:09.779] inherits <- base::inherits [13:31:09.779] invokeRestart <- base::invokeRestart [13:31:09.779] is.null <- base::is.null [13:31:09.779] muffled <- FALSE [13:31:09.779] if (inherits(cond, "message")) { [13:31:09.779] muffled <- grepl(pattern, "muffleMessage") [13:31:09.779] if (muffled) [13:31:09.779] invokeRestart("muffleMessage") [13:31:09.779] } [13:31:09.779] else if (inherits(cond, "warning")) { [13:31:09.779] muffled <- grepl(pattern, "muffleWarning") [13:31:09.779] if (muffled) [13:31:09.779] invokeRestart("muffleWarning") [13:31:09.779] } [13:31:09.779] else if (inherits(cond, "condition")) { [13:31:09.779] if (!is.null(pattern)) { [13:31:09.779] computeRestarts <- base::computeRestarts [13:31:09.779] grepl <- base::grepl [13:31:09.779] restarts <- computeRestarts(cond) [13:31:09.779] for (restart in restarts) { [13:31:09.779] name <- restart$name [13:31:09.779] if (is.null(name)) [13:31:09.779] next [13:31:09.779] if (!grepl(pattern, name)) [13:31:09.779] next [13:31:09.779] invokeRestart(restart) [13:31:09.779] muffled <- TRUE [13:31:09.779] break [13:31:09.779] } [13:31:09.779] } [13:31:09.779] } [13:31:09.779] invisible(muffled) [13:31:09.779] } [13:31:09.779] muffleCondition(cond, pattern = "^muffle") [13:31:09.779] } [13:31:09.779] } [13:31:09.779] else { [13:31:09.779] if (TRUE) { [13:31:09.779] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.779] { [13:31:09.779] inherits <- base::inherits [13:31:09.779] invokeRestart <- base::invokeRestart [13:31:09.779] is.null <- base::is.null [13:31:09.779] muffled <- FALSE [13:31:09.779] if (inherits(cond, "message")) { [13:31:09.779] muffled <- grepl(pattern, "muffleMessage") [13:31:09.779] if (muffled) [13:31:09.779] invokeRestart("muffleMessage") [13:31:09.779] } [13:31:09.779] else if (inherits(cond, "warning")) { [13:31:09.779] muffled <- grepl(pattern, "muffleWarning") [13:31:09.779] if (muffled) [13:31:09.779] invokeRestart("muffleWarning") [13:31:09.779] } [13:31:09.779] else if (inherits(cond, "condition")) { [13:31:09.779] if (!is.null(pattern)) { [13:31:09.779] computeRestarts <- base::computeRestarts [13:31:09.779] grepl <- base::grepl [13:31:09.779] restarts <- computeRestarts(cond) [13:31:09.779] for (restart in restarts) { [13:31:09.779] name <- restart$name [13:31:09.779] if (is.null(name)) [13:31:09.779] next [13:31:09.779] if (!grepl(pattern, name)) [13:31:09.779] next [13:31:09.779] invokeRestart(restart) [13:31:09.779] muffled <- TRUE [13:31:09.779] break [13:31:09.779] } [13:31:09.779] } [13:31:09.779] } [13:31:09.779] invisible(muffled) [13:31:09.779] } [13:31:09.779] muffleCondition(cond, pattern = "^muffle") [13:31:09.779] } [13:31:09.779] } [13:31:09.779] } [13:31:09.779] })) [13:31:09.779] }, error = function(ex) { [13:31:09.779] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.779] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.779] ...future.rng), started = ...future.startTime, [13:31:09.779] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.779] version = "1.8"), class = "FutureResult") [13:31:09.779] }, finally = { [13:31:09.779] if (!identical(...future.workdir, getwd())) [13:31:09.779] setwd(...future.workdir) [13:31:09.779] { [13:31:09.779] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.779] ...future.oldOptions$nwarnings <- NULL [13:31:09.779] } [13:31:09.779] base::options(...future.oldOptions) [13:31:09.779] if (.Platform$OS.type == "windows") { [13:31:09.779] old_names <- names(...future.oldEnvVars) [13:31:09.779] envs <- base::Sys.getenv() [13:31:09.779] names <- names(envs) [13:31:09.779] common <- intersect(names, old_names) [13:31:09.779] added <- setdiff(names, old_names) [13:31:09.779] removed <- setdiff(old_names, names) [13:31:09.779] changed <- common[...future.oldEnvVars[common] != [13:31:09.779] envs[common]] [13:31:09.779] NAMES <- toupper(changed) [13:31:09.779] args <- list() [13:31:09.779] for (kk in seq_along(NAMES)) { [13:31:09.779] name <- changed[[kk]] [13:31:09.779] NAME <- NAMES[[kk]] [13:31:09.779] if (name != NAME && is.element(NAME, old_names)) [13:31:09.779] next [13:31:09.779] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.779] } [13:31:09.779] NAMES <- toupper(added) [13:31:09.779] for (kk in seq_along(NAMES)) { [13:31:09.779] name <- added[[kk]] [13:31:09.779] NAME <- NAMES[[kk]] [13:31:09.779] if (name != NAME && is.element(NAME, old_names)) [13:31:09.779] next [13:31:09.779] args[[name]] <- "" [13:31:09.779] } [13:31:09.779] NAMES <- toupper(removed) [13:31:09.779] for (kk in seq_along(NAMES)) { [13:31:09.779] name <- removed[[kk]] [13:31:09.779] NAME <- NAMES[[kk]] [13:31:09.779] if (name != NAME && is.element(NAME, old_names)) [13:31:09.779] next [13:31:09.779] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.779] } [13:31:09.779] if (length(args) > 0) [13:31:09.779] base::do.call(base::Sys.setenv, args = args) [13:31:09.779] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.779] } [13:31:09.779] else { [13:31:09.779] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.779] } [13:31:09.779] { [13:31:09.779] if (base::length(...future.futureOptionsAdded) > [13:31:09.779] 0L) { [13:31:09.779] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.779] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.779] base::options(opts) [13:31:09.779] } [13:31:09.779] { [13:31:09.779] NULL [13:31:09.779] options(future.plan = NULL) [13:31:09.779] if (is.na(NA_character_)) [13:31:09.779] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.779] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.779] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.779] .init = FALSE) [13:31:09.779] } [13:31:09.779] } [13:31:09.779] } [13:31:09.779] }) [13:31:09.779] if (TRUE) { [13:31:09.779] base::sink(type = "output", split = FALSE) [13:31:09.779] if (TRUE) { [13:31:09.779] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.779] } [13:31:09.779] else { [13:31:09.779] ...future.result["stdout"] <- base::list(NULL) [13:31:09.779] } [13:31:09.779] base::close(...future.stdout) [13:31:09.779] ...future.stdout <- NULL [13:31:09.779] } [13:31:09.779] ...future.result$conditions <- ...future.conditions [13:31:09.779] ...future.result$finished <- base::Sys.time() [13:31:09.779] ...future.result [13:31:09.779] } [13:31:09.783] - Launch lazy future ... done [13:31:09.783] 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:09.794] - Globals - lm(, data = cars) ... Call: lm(formula = dist ~ . - 1, data = cars) Coefficients: speed 2.909 [13:31:09.796] getGlobalsAndPackages() ... [13:31:09.796] Searching for globals... [13:31:09.799] - globals found: [7] '{', 'lm', 'dist', '-', '.', '~', 'cars' [13:31:09.799] Searching for globals ... DONE [13:31:09.799] Resolving globals: FALSE [13:31:09.800] [13:31:09.800] - packages: [2] 'stats', 'datasets' [13:31:09.800] getGlobalsAndPackages() ... DONE [13:31:09.801] run() for 'Future' ... [13:31:09.801] - state: 'created' [13:31:09.801] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.803] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.804] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.804] - Field: 'label' [13:31:09.804] - Field: 'local' [13:31:09.804] - Field: 'owner' [13:31:09.804] - Field: 'envir' [13:31:09.804] - Field: 'packages' [13:31:09.805] - Field: 'gc' [13:31:09.805] - Field: 'conditions' [13:31:09.805] - Field: 'expr' [13:31:09.805] - Field: 'uuid' [13:31:09.805] - Field: 'seed' [13:31:09.805] - Field: 'version' [13:31:09.806] - Field: 'result' [13:31:09.806] - Field: 'asynchronous' [13:31:09.806] - Field: 'calls' [13:31:09.806] - Field: 'globals' [13:31:09.806] - Field: 'stdout' [13:31:09.807] - Field: 'earlySignal' [13:31:09.807] - Field: 'lazy' [13:31:09.807] - Field: 'state' [13:31:09.807] - Field: '.cluster' [13:31:09.807] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.807] - Launch lazy future ... [13:31:09.808] Packages needed by the future expression (n = 2): 'stats', 'datasets' [13:31:09.808] Packages needed by future strategies (n = 0): [13:31:09.808] { [13:31:09.808] { [13:31:09.808] { [13:31:09.808] ...future.startTime <- base::Sys.time() [13:31:09.808] { [13:31:09.808] { [13:31:09.808] { [13:31:09.808] { [13:31:09.808] base::local({ [13:31:09.808] has_future <- base::requireNamespace("future", [13:31:09.808] quietly = TRUE) [13:31:09.808] if (has_future) { [13:31:09.808] ns <- base::getNamespace("future") [13:31:09.808] version <- ns[[".package"]][["version"]] [13:31:09.808] if (is.null(version)) [13:31:09.808] version <- utils::packageVersion("future") [13:31:09.808] } [13:31:09.808] else { [13:31:09.808] version <- NULL [13:31:09.808] } [13:31:09.808] if (!has_future || version < "1.8.0") { [13:31:09.808] info <- base::c(r_version = base::gsub("R version ", [13:31:09.808] "", base::R.version$version.string), [13:31:09.808] platform = base::sprintf("%s (%s-bit)", [13:31:09.808] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.808] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.808] "release", "version")], collapse = " "), [13:31:09.808] hostname = base::Sys.info()[["nodename"]]) [13:31:09.808] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.808] info) [13:31:09.808] info <- base::paste(info, collapse = "; ") [13:31:09.808] if (!has_future) { [13:31:09.808] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.808] info) [13:31:09.808] } [13:31:09.808] else { [13:31:09.808] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.808] info, version) [13:31:09.808] } [13:31:09.808] base::stop(msg) [13:31:09.808] } [13:31:09.808] }) [13:31:09.808] } [13:31:09.808] base::local({ [13:31:09.808] for (pkg in c("stats", "datasets")) { [13:31:09.808] base::loadNamespace(pkg) [13:31:09.808] base::library(pkg, character.only = TRUE) [13:31:09.808] } [13:31:09.808] }) [13:31:09.808] } [13:31:09.808] ...future.strategy.old <- future::plan("list") [13:31:09.808] options(future.plan = NULL) [13:31:09.808] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.808] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.808] } [13:31:09.808] ...future.workdir <- getwd() [13:31:09.808] } [13:31:09.808] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.808] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.808] } [13:31:09.808] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.808] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.808] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.808] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.808] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.808] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.808] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.808] base::names(...future.oldOptions)) [13:31:09.808] } [13:31:09.808] if (FALSE) { [13:31:09.808] } [13:31:09.808] else { [13:31:09.808] if (TRUE) { [13:31:09.808] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.808] open = "w") [13:31:09.808] } [13:31:09.808] else { [13:31:09.808] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.808] windows = "NUL", "/dev/null"), open = "w") [13:31:09.808] } [13:31:09.808] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.808] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.808] base::sink(type = "output", split = FALSE) [13:31:09.808] base::close(...future.stdout) [13:31:09.808] }, add = TRUE) [13:31:09.808] } [13:31:09.808] ...future.frame <- base::sys.nframe() [13:31:09.808] ...future.conditions <- base::list() [13:31:09.808] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.808] if (FALSE) { [13:31:09.808] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.808] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.808] } [13:31:09.808] ...future.result <- base::tryCatch({ [13:31:09.808] base::withCallingHandlers({ [13:31:09.808] ...future.value <- base::withVisible(base::local({ [13:31:09.808] lm(dist ~ . - 1, data = cars) [13:31:09.808] })) [13:31:09.808] future::FutureResult(value = ...future.value$value, [13:31:09.808] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.808] ...future.rng), globalenv = if (FALSE) [13:31:09.808] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.808] ...future.globalenv.names)) [13:31:09.808] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.808] }, condition = base::local({ [13:31:09.808] c <- base::c [13:31:09.808] inherits <- base::inherits [13:31:09.808] invokeRestart <- base::invokeRestart [13:31:09.808] length <- base::length [13:31:09.808] list <- base::list [13:31:09.808] seq.int <- base::seq.int [13:31:09.808] signalCondition <- base::signalCondition [13:31:09.808] sys.calls <- base::sys.calls [13:31:09.808] `[[` <- base::`[[` [13:31:09.808] `+` <- base::`+` [13:31:09.808] `<<-` <- base::`<<-` [13:31:09.808] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.808] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.808] 3L)] [13:31:09.808] } [13:31:09.808] function(cond) { [13:31:09.808] is_error <- inherits(cond, "error") [13:31:09.808] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.808] NULL) [13:31:09.808] if (is_error) { [13:31:09.808] sessionInformation <- function() { [13:31:09.808] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.808] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.808] search = base::search(), system = base::Sys.info()) [13:31:09.808] } [13:31:09.808] ...future.conditions[[length(...future.conditions) + [13:31:09.808] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.808] cond$call), session = sessionInformation(), [13:31:09.808] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.808] signalCondition(cond) [13:31:09.808] } [13:31:09.808] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.808] signal <- FALSE && inherits(cond, character(0)) [13:31:09.808] ...future.conditions[[length(...future.conditions) + [13:31:09.808] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.808] if (FALSE && !signal) { [13:31:09.808] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.808] { [13:31:09.808] inherits <- base::inherits [13:31:09.808] invokeRestart <- base::invokeRestart [13:31:09.808] is.null <- base::is.null [13:31:09.808] muffled <- FALSE [13:31:09.808] if (inherits(cond, "message")) { [13:31:09.808] muffled <- grepl(pattern, "muffleMessage") [13:31:09.808] if (muffled) [13:31:09.808] invokeRestart("muffleMessage") [13:31:09.808] } [13:31:09.808] else if (inherits(cond, "warning")) { [13:31:09.808] muffled <- grepl(pattern, "muffleWarning") [13:31:09.808] if (muffled) [13:31:09.808] invokeRestart("muffleWarning") [13:31:09.808] } [13:31:09.808] else if (inherits(cond, "condition")) { [13:31:09.808] if (!is.null(pattern)) { [13:31:09.808] computeRestarts <- base::computeRestarts [13:31:09.808] grepl <- base::grepl [13:31:09.808] restarts <- computeRestarts(cond) [13:31:09.808] for (restart in restarts) { [13:31:09.808] name <- restart$name [13:31:09.808] if (is.null(name)) [13:31:09.808] next [13:31:09.808] if (!grepl(pattern, name)) [13:31:09.808] next [13:31:09.808] invokeRestart(restart) [13:31:09.808] muffled <- TRUE [13:31:09.808] break [13:31:09.808] } [13:31:09.808] } [13:31:09.808] } [13:31:09.808] invisible(muffled) [13:31:09.808] } [13:31:09.808] muffleCondition(cond, pattern = "^muffle") [13:31:09.808] } [13:31:09.808] } [13:31:09.808] else { [13:31:09.808] if (TRUE) { [13:31:09.808] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.808] { [13:31:09.808] inherits <- base::inherits [13:31:09.808] invokeRestart <- base::invokeRestart [13:31:09.808] is.null <- base::is.null [13:31:09.808] muffled <- FALSE [13:31:09.808] if (inherits(cond, "message")) { [13:31:09.808] muffled <- grepl(pattern, "muffleMessage") [13:31:09.808] if (muffled) [13:31:09.808] invokeRestart("muffleMessage") [13:31:09.808] } [13:31:09.808] else if (inherits(cond, "warning")) { [13:31:09.808] muffled <- grepl(pattern, "muffleWarning") [13:31:09.808] if (muffled) [13:31:09.808] invokeRestart("muffleWarning") [13:31:09.808] } [13:31:09.808] else if (inherits(cond, "condition")) { [13:31:09.808] if (!is.null(pattern)) { [13:31:09.808] computeRestarts <- base::computeRestarts [13:31:09.808] grepl <- base::grepl [13:31:09.808] restarts <- computeRestarts(cond) [13:31:09.808] for (restart in restarts) { [13:31:09.808] name <- restart$name [13:31:09.808] if (is.null(name)) [13:31:09.808] next [13:31:09.808] if (!grepl(pattern, name)) [13:31:09.808] next [13:31:09.808] invokeRestart(restart) [13:31:09.808] muffled <- TRUE [13:31:09.808] break [13:31:09.808] } [13:31:09.808] } [13:31:09.808] } [13:31:09.808] invisible(muffled) [13:31:09.808] } [13:31:09.808] muffleCondition(cond, pattern = "^muffle") [13:31:09.808] } [13:31:09.808] } [13:31:09.808] } [13:31:09.808] })) [13:31:09.808] }, error = function(ex) { [13:31:09.808] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.808] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.808] ...future.rng), started = ...future.startTime, [13:31:09.808] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.808] version = "1.8"), class = "FutureResult") [13:31:09.808] }, finally = { [13:31:09.808] if (!identical(...future.workdir, getwd())) [13:31:09.808] setwd(...future.workdir) [13:31:09.808] { [13:31:09.808] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.808] ...future.oldOptions$nwarnings <- NULL [13:31:09.808] } [13:31:09.808] base::options(...future.oldOptions) [13:31:09.808] if (.Platform$OS.type == "windows") { [13:31:09.808] old_names <- names(...future.oldEnvVars) [13:31:09.808] envs <- base::Sys.getenv() [13:31:09.808] names <- names(envs) [13:31:09.808] common <- intersect(names, old_names) [13:31:09.808] added <- setdiff(names, old_names) [13:31:09.808] removed <- setdiff(old_names, names) [13:31:09.808] changed <- common[...future.oldEnvVars[common] != [13:31:09.808] envs[common]] [13:31:09.808] NAMES <- toupper(changed) [13:31:09.808] args <- list() [13:31:09.808] for (kk in seq_along(NAMES)) { [13:31:09.808] name <- changed[[kk]] [13:31:09.808] NAME <- NAMES[[kk]] [13:31:09.808] if (name != NAME && is.element(NAME, old_names)) [13:31:09.808] next [13:31:09.808] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.808] } [13:31:09.808] NAMES <- toupper(added) [13:31:09.808] for (kk in seq_along(NAMES)) { [13:31:09.808] name <- added[[kk]] [13:31:09.808] NAME <- NAMES[[kk]] [13:31:09.808] if (name != NAME && is.element(NAME, old_names)) [13:31:09.808] next [13:31:09.808] args[[name]] <- "" [13:31:09.808] } [13:31:09.808] NAMES <- toupper(removed) [13:31:09.808] for (kk in seq_along(NAMES)) { [13:31:09.808] name <- removed[[kk]] [13:31:09.808] NAME <- NAMES[[kk]] [13:31:09.808] if (name != NAME && is.element(NAME, old_names)) [13:31:09.808] next [13:31:09.808] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.808] } [13:31:09.808] if (length(args) > 0) [13:31:09.808] base::do.call(base::Sys.setenv, args = args) [13:31:09.808] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.808] } [13:31:09.808] else { [13:31:09.808] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.808] } [13:31:09.808] { [13:31:09.808] if (base::length(...future.futureOptionsAdded) > [13:31:09.808] 0L) { [13:31:09.808] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.808] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.808] base::options(opts) [13:31:09.808] } [13:31:09.808] { [13:31:09.808] NULL [13:31:09.808] options(future.plan = NULL) [13:31:09.808] if (is.na(NA_character_)) [13:31:09.808] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.808] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.808] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.808] .init = FALSE) [13:31:09.808] } [13:31:09.808] } [13:31:09.808] } [13:31:09.808] }) [13:31:09.808] if (TRUE) { [13:31:09.808] base::sink(type = "output", split = FALSE) [13:31:09.808] if (TRUE) { [13:31:09.808] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.808] } [13:31:09.808] else { [13:31:09.808] ...future.result["stdout"] <- base::list(NULL) [13:31:09.808] } [13:31:09.808] base::close(...future.stdout) [13:31:09.808] ...future.stdout <- NULL [13:31:09.808] } [13:31:09.808] ...future.result$conditions <- ...future.conditions [13:31:09.808] ...future.result$finished <- base::Sys.time() [13:31:09.808] ...future.result [13:31:09.808] } [13:31:09.812] - Launch lazy future ... done [13:31:09.812] run() for 'MiraiFuture' ... done Call: lm(formula = dist ~ . - 1, data = cars) Coefficients: speed 2.909 [13:31:09.818] - Globals - lm(, data = cars) ... Call: lm(formula = dist ~ . + 0, data = cars) Coefficients: speed 2.909 [13:31:09.819] getGlobalsAndPackages() ... [13:31:09.819] Searching for globals... [13:31:09.821] - globals found: [7] '{', 'lm', 'dist', '+', '.', '~', 'cars' [13:31:09.821] Searching for globals ... DONE [13:31:09.822] Resolving globals: FALSE [13:31:09.822] [13:31:09.823] - packages: [2] 'stats', 'datasets' [13:31:09.823] getGlobalsAndPackages() ... DONE [13:31:09.823] run() for 'Future' ... [13:31:09.823] - state: 'created' [13:31:09.823] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.826] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.826] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.826] - Field: 'label' [13:31:09.826] - Field: 'local' [13:31:09.826] - Field: 'owner' [13:31:09.827] - Field: 'envir' [13:31:09.827] - Field: 'packages' [13:31:09.827] - Field: 'gc' [13:31:09.827] - Field: 'conditions' [13:31:09.827] - Field: 'expr' [13:31:09.827] - Field: 'uuid' [13:31:09.828] - Field: 'seed' [13:31:09.829] - Field: 'version' [13:31:09.829] - Field: 'result' [13:31:09.829] - Field: 'asynchronous' [13:31:09.829] - Field: 'calls' [13:31:09.829] - Field: 'globals' [13:31:09.830] - Field: 'stdout' [13:31:09.830] - Field: 'earlySignal' [13:31:09.830] - Field: 'lazy' [13:31:09.830] - Field: 'state' [13:31:09.830] - Field: '.cluster' [13:31:09.830] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.831] - Launch lazy future ... [13:31:09.831] Packages needed by the future expression (n = 2): 'stats', 'datasets' [13:31:09.831] Packages needed by future strategies (n = 0): [13:31:09.832] { [13:31:09.832] { [13:31:09.832] { [13:31:09.832] ...future.startTime <- base::Sys.time() [13:31:09.832] { [13:31:09.832] { [13:31:09.832] { [13:31:09.832] { [13:31:09.832] base::local({ [13:31:09.832] has_future <- base::requireNamespace("future", [13:31:09.832] quietly = TRUE) [13:31:09.832] if (has_future) { [13:31:09.832] ns <- base::getNamespace("future") [13:31:09.832] version <- ns[[".package"]][["version"]] [13:31:09.832] if (is.null(version)) [13:31:09.832] version <- utils::packageVersion("future") [13:31:09.832] } [13:31:09.832] else { [13:31:09.832] version <- NULL [13:31:09.832] } [13:31:09.832] if (!has_future || version < "1.8.0") { [13:31:09.832] info <- base::c(r_version = base::gsub("R version ", [13:31:09.832] "", base::R.version$version.string), [13:31:09.832] platform = base::sprintf("%s (%s-bit)", [13:31:09.832] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.832] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.832] "release", "version")], collapse = " "), [13:31:09.832] hostname = base::Sys.info()[["nodename"]]) [13:31:09.832] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.832] info) [13:31:09.832] info <- base::paste(info, collapse = "; ") [13:31:09.832] if (!has_future) { [13:31:09.832] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.832] info) [13:31:09.832] } [13:31:09.832] else { [13:31:09.832] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.832] info, version) [13:31:09.832] } [13:31:09.832] base::stop(msg) [13:31:09.832] } [13:31:09.832] }) [13:31:09.832] } [13:31:09.832] base::local({ [13:31:09.832] for (pkg in c("stats", "datasets")) { [13:31:09.832] base::loadNamespace(pkg) [13:31:09.832] base::library(pkg, character.only = TRUE) [13:31:09.832] } [13:31:09.832] }) [13:31:09.832] } [13:31:09.832] ...future.strategy.old <- future::plan("list") [13:31:09.832] options(future.plan = NULL) [13:31:09.832] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.832] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.832] } [13:31:09.832] ...future.workdir <- getwd() [13:31:09.832] } [13:31:09.832] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.832] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.832] } [13:31:09.832] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.832] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.832] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.832] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.832] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.832] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.832] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.832] base::names(...future.oldOptions)) [13:31:09.832] } [13:31:09.832] if (FALSE) { [13:31:09.832] } [13:31:09.832] else { [13:31:09.832] if (TRUE) { [13:31:09.832] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.832] open = "w") [13:31:09.832] } [13:31:09.832] else { [13:31:09.832] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.832] windows = "NUL", "/dev/null"), open = "w") [13:31:09.832] } [13:31:09.832] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.832] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.832] base::sink(type = "output", split = FALSE) [13:31:09.832] base::close(...future.stdout) [13:31:09.832] }, add = TRUE) [13:31:09.832] } [13:31:09.832] ...future.frame <- base::sys.nframe() [13:31:09.832] ...future.conditions <- base::list() [13:31:09.832] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.832] if (FALSE) { [13:31:09.832] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.832] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.832] } [13:31:09.832] ...future.result <- base::tryCatch({ [13:31:09.832] base::withCallingHandlers({ [13:31:09.832] ...future.value <- base::withVisible(base::local({ [13:31:09.832] lm(dist ~ . + 0, data = cars) [13:31:09.832] })) [13:31:09.832] future::FutureResult(value = ...future.value$value, [13:31:09.832] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.832] ...future.rng), globalenv = if (FALSE) [13:31:09.832] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.832] ...future.globalenv.names)) [13:31:09.832] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.832] }, condition = base::local({ [13:31:09.832] c <- base::c [13:31:09.832] inherits <- base::inherits [13:31:09.832] invokeRestart <- base::invokeRestart [13:31:09.832] length <- base::length [13:31:09.832] list <- base::list [13:31:09.832] seq.int <- base::seq.int [13:31:09.832] signalCondition <- base::signalCondition [13:31:09.832] sys.calls <- base::sys.calls [13:31:09.832] `[[` <- base::`[[` [13:31:09.832] `+` <- base::`+` [13:31:09.832] `<<-` <- base::`<<-` [13:31:09.832] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.832] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.832] 3L)] [13:31:09.832] } [13:31:09.832] function(cond) { [13:31:09.832] is_error <- inherits(cond, "error") [13:31:09.832] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.832] NULL) [13:31:09.832] if (is_error) { [13:31:09.832] sessionInformation <- function() { [13:31:09.832] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.832] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.832] search = base::search(), system = base::Sys.info()) [13:31:09.832] } [13:31:09.832] ...future.conditions[[length(...future.conditions) + [13:31:09.832] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.832] cond$call), session = sessionInformation(), [13:31:09.832] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.832] signalCondition(cond) [13:31:09.832] } [13:31:09.832] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.832] signal <- FALSE && inherits(cond, character(0)) [13:31:09.832] ...future.conditions[[length(...future.conditions) + [13:31:09.832] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.832] if (FALSE && !signal) { [13:31:09.832] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.832] { [13:31:09.832] inherits <- base::inherits [13:31:09.832] invokeRestart <- base::invokeRestart [13:31:09.832] is.null <- base::is.null [13:31:09.832] muffled <- FALSE [13:31:09.832] if (inherits(cond, "message")) { [13:31:09.832] muffled <- grepl(pattern, "muffleMessage") [13:31:09.832] if (muffled) [13:31:09.832] invokeRestart("muffleMessage") [13:31:09.832] } [13:31:09.832] else if (inherits(cond, "warning")) { [13:31:09.832] muffled <- grepl(pattern, "muffleWarning") [13:31:09.832] if (muffled) [13:31:09.832] invokeRestart("muffleWarning") [13:31:09.832] } [13:31:09.832] else if (inherits(cond, "condition")) { [13:31:09.832] if (!is.null(pattern)) { [13:31:09.832] computeRestarts <- base::computeRestarts [13:31:09.832] grepl <- base::grepl [13:31:09.832] restarts <- computeRestarts(cond) [13:31:09.832] for (restart in restarts) { [13:31:09.832] name <- restart$name [13:31:09.832] if (is.null(name)) [13:31:09.832] next [13:31:09.832] if (!grepl(pattern, name)) [13:31:09.832] next [13:31:09.832] invokeRestart(restart) [13:31:09.832] muffled <- TRUE [13:31:09.832] break [13:31:09.832] } [13:31:09.832] } [13:31:09.832] } [13:31:09.832] invisible(muffled) [13:31:09.832] } [13:31:09.832] muffleCondition(cond, pattern = "^muffle") [13:31:09.832] } [13:31:09.832] } [13:31:09.832] else { [13:31:09.832] if (TRUE) { [13:31:09.832] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.832] { [13:31:09.832] inherits <- base::inherits [13:31:09.832] invokeRestart <- base::invokeRestart [13:31:09.832] is.null <- base::is.null [13:31:09.832] muffled <- FALSE [13:31:09.832] if (inherits(cond, "message")) { [13:31:09.832] muffled <- grepl(pattern, "muffleMessage") [13:31:09.832] if (muffled) [13:31:09.832] invokeRestart("muffleMessage") [13:31:09.832] } [13:31:09.832] else if (inherits(cond, "warning")) { [13:31:09.832] muffled <- grepl(pattern, "muffleWarning") [13:31:09.832] if (muffled) [13:31:09.832] invokeRestart("muffleWarning") [13:31:09.832] } [13:31:09.832] else if (inherits(cond, "condition")) { [13:31:09.832] if (!is.null(pattern)) { [13:31:09.832] computeRestarts <- base::computeRestarts [13:31:09.832] grepl <- base::grepl [13:31:09.832] restarts <- computeRestarts(cond) [13:31:09.832] for (restart in restarts) { [13:31:09.832] name <- restart$name [13:31:09.832] if (is.null(name)) [13:31:09.832] next [13:31:09.832] if (!grepl(pattern, name)) [13:31:09.832] next [13:31:09.832] invokeRestart(restart) [13:31:09.832] muffled <- TRUE [13:31:09.832] break [13:31:09.832] } [13:31:09.832] } [13:31:09.832] } [13:31:09.832] invisible(muffled) [13:31:09.832] } [13:31:09.832] muffleCondition(cond, pattern = "^muffle") [13:31:09.832] } [13:31:09.832] } [13:31:09.832] } [13:31:09.832] })) [13:31:09.832] }, error = function(ex) { [13:31:09.832] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.832] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.832] ...future.rng), started = ...future.startTime, [13:31:09.832] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.832] version = "1.8"), class = "FutureResult") [13:31:09.832] }, finally = { [13:31:09.832] if (!identical(...future.workdir, getwd())) [13:31:09.832] setwd(...future.workdir) [13:31:09.832] { [13:31:09.832] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.832] ...future.oldOptions$nwarnings <- NULL [13:31:09.832] } [13:31:09.832] base::options(...future.oldOptions) [13:31:09.832] if (.Platform$OS.type == "windows") { [13:31:09.832] old_names <- names(...future.oldEnvVars) [13:31:09.832] envs <- base::Sys.getenv() [13:31:09.832] names <- names(envs) [13:31:09.832] common <- intersect(names, old_names) [13:31:09.832] added <- setdiff(names, old_names) [13:31:09.832] removed <- setdiff(old_names, names) [13:31:09.832] changed <- common[...future.oldEnvVars[common] != [13:31:09.832] envs[common]] [13:31:09.832] NAMES <- toupper(changed) [13:31:09.832] args <- list() [13:31:09.832] for (kk in seq_along(NAMES)) { [13:31:09.832] name <- changed[[kk]] [13:31:09.832] NAME <- NAMES[[kk]] [13:31:09.832] if (name != NAME && is.element(NAME, old_names)) [13:31:09.832] next [13:31:09.832] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.832] } [13:31:09.832] NAMES <- toupper(added) [13:31:09.832] for (kk in seq_along(NAMES)) { [13:31:09.832] name <- added[[kk]] [13:31:09.832] NAME <- NAMES[[kk]] [13:31:09.832] if (name != NAME && is.element(NAME, old_names)) [13:31:09.832] next [13:31:09.832] args[[name]] <- "" [13:31:09.832] } [13:31:09.832] NAMES <- toupper(removed) [13:31:09.832] for (kk in seq_along(NAMES)) { [13:31:09.832] name <- removed[[kk]] [13:31:09.832] NAME <- NAMES[[kk]] [13:31:09.832] if (name != NAME && is.element(NAME, old_names)) [13:31:09.832] next [13:31:09.832] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.832] } [13:31:09.832] if (length(args) > 0) [13:31:09.832] base::do.call(base::Sys.setenv, args = args) [13:31:09.832] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.832] } [13:31:09.832] else { [13:31:09.832] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.832] } [13:31:09.832] { [13:31:09.832] if (base::length(...future.futureOptionsAdded) > [13:31:09.832] 0L) { [13:31:09.832] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.832] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.832] base::options(opts) [13:31:09.832] } [13:31:09.832] { [13:31:09.832] NULL [13:31:09.832] options(future.plan = NULL) [13:31:09.832] if (is.na(NA_character_)) [13:31:09.832] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.832] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.832] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.832] .init = FALSE) [13:31:09.832] } [13:31:09.832] } [13:31:09.832] } [13:31:09.832] }) [13:31:09.832] if (TRUE) { [13:31:09.832] base::sink(type = "output", split = FALSE) [13:31:09.832] if (TRUE) { [13:31:09.832] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.832] } [13:31:09.832] else { [13:31:09.832] ...future.result["stdout"] <- base::list(NULL) [13:31:09.832] } [13:31:09.832] base::close(...future.stdout) [13:31:09.832] ...future.stdout <- NULL [13:31:09.832] } [13:31:09.832] ...future.result$conditions <- ...future.conditions [13:31:09.832] ...future.result$finished <- base::Sys.time() [13:31:09.832] ...future.result [13:31:09.832] } [13:31:09.835] - Launch lazy future ... done [13:31:09.836] run() for 'MiraiFuture' ... done Call: lm(formula = dist ~ . + 0, data = cars) Coefficients: speed 2.909 [13:31:09.842] - Globals - lm(, data = cars) ... Call: lm(formula = dist ~ speed + speed^2, data = cars) Coefficients: (Intercept) speed -17.579 3.932 [13:31:09.843] getGlobalsAndPackages() ... [13:31:09.843] Searching for globals... [13:31:09.845] - globals found: [8] '{', 'lm', 'dist', '+', 'speed', '^', '~', 'cars' [13:31:09.845] Searching for globals ... DONE [13:31:09.845] Resolving globals: FALSE [13:31:09.846] [13:31:09.846] - packages: [2] 'stats', 'datasets' [13:31:09.847] getGlobalsAndPackages() ... DONE [13:31:09.847] run() for 'Future' ... [13:31:09.847] - state: 'created' [13:31:09.847] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.849] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.850] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.850] - Field: 'label' [13:31:09.850] - Field: 'local' [13:31:09.850] - Field: 'owner' [13:31:09.850] - Field: 'envir' [13:31:09.851] - Field: 'packages' [13:31:09.851] - Field: 'gc' [13:31:09.851] - Field: 'conditions' [13:31:09.851] - Field: 'expr' [13:31:09.851] - Field: 'uuid' [13:31:09.851] - Field: 'seed' [13:31:09.852] - Field: 'version' [13:31:09.852] - Field: 'result' [13:31:09.852] - Field: 'asynchronous' [13:31:09.852] - Field: 'calls' [13:31:09.852] - Field: 'globals' [13:31:09.852] - Field: 'stdout' [13:31:09.853] - Field: 'earlySignal' [13:31:09.853] - Field: 'lazy' [13:31:09.853] - Field: 'state' [13:31:09.853] - Field: '.cluster' [13:31:09.853] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.854] - Launch lazy future ... [13:31:09.854] Packages needed by the future expression (n = 2): 'stats', 'datasets' [13:31:09.854] Packages needed by future strategies (n = 0): [13:31:09.855] { [13:31:09.855] { [13:31:09.855] { [13:31:09.855] ...future.startTime <- base::Sys.time() [13:31:09.855] { [13:31:09.855] { [13:31:09.855] { [13:31:09.855] { [13:31:09.855] base::local({ [13:31:09.855] has_future <- base::requireNamespace("future", [13:31:09.855] quietly = TRUE) [13:31:09.855] if (has_future) { [13:31:09.855] ns <- base::getNamespace("future") [13:31:09.855] version <- ns[[".package"]][["version"]] [13:31:09.855] if (is.null(version)) [13:31:09.855] version <- utils::packageVersion("future") [13:31:09.855] } [13:31:09.855] else { [13:31:09.855] version <- NULL [13:31:09.855] } [13:31:09.855] if (!has_future || version < "1.8.0") { [13:31:09.855] info <- base::c(r_version = base::gsub("R version ", [13:31:09.855] "", base::R.version$version.string), [13:31:09.855] platform = base::sprintf("%s (%s-bit)", [13:31:09.855] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.855] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.855] "release", "version")], collapse = " "), [13:31:09.855] hostname = base::Sys.info()[["nodename"]]) [13:31:09.855] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.855] info) [13:31:09.855] info <- base::paste(info, collapse = "; ") [13:31:09.855] if (!has_future) { [13:31:09.855] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.855] info) [13:31:09.855] } [13:31:09.855] else { [13:31:09.855] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.855] info, version) [13:31:09.855] } [13:31:09.855] base::stop(msg) [13:31:09.855] } [13:31:09.855] }) [13:31:09.855] } [13:31:09.855] base::local({ [13:31:09.855] for (pkg in c("stats", "datasets")) { [13:31:09.855] base::loadNamespace(pkg) [13:31:09.855] base::library(pkg, character.only = TRUE) [13:31:09.855] } [13:31:09.855] }) [13:31:09.855] } [13:31:09.855] ...future.strategy.old <- future::plan("list") [13:31:09.855] options(future.plan = NULL) [13:31:09.855] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.855] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.855] } [13:31:09.855] ...future.workdir <- getwd() [13:31:09.855] } [13:31:09.855] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.855] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.855] } [13:31:09.855] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.855] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.855] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.855] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.855] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.855] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.855] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.855] base::names(...future.oldOptions)) [13:31:09.855] } [13:31:09.855] if (FALSE) { [13:31:09.855] } [13:31:09.855] else { [13:31:09.855] if (TRUE) { [13:31:09.855] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.855] open = "w") [13:31:09.855] } [13:31:09.855] else { [13:31:09.855] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.855] windows = "NUL", "/dev/null"), open = "w") [13:31:09.855] } [13:31:09.855] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.855] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.855] base::sink(type = "output", split = FALSE) [13:31:09.855] base::close(...future.stdout) [13:31:09.855] }, add = TRUE) [13:31:09.855] } [13:31:09.855] ...future.frame <- base::sys.nframe() [13:31:09.855] ...future.conditions <- base::list() [13:31:09.855] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.855] if (FALSE) { [13:31:09.855] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.855] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.855] } [13:31:09.855] ...future.result <- base::tryCatch({ [13:31:09.855] base::withCallingHandlers({ [13:31:09.855] ...future.value <- base::withVisible(base::local({ [13:31:09.855] lm(dist ~ speed + speed^2, data = cars) [13:31:09.855] })) [13:31:09.855] future::FutureResult(value = ...future.value$value, [13:31:09.855] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.855] ...future.rng), globalenv = if (FALSE) [13:31:09.855] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.855] ...future.globalenv.names)) [13:31:09.855] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.855] }, condition = base::local({ [13:31:09.855] c <- base::c [13:31:09.855] inherits <- base::inherits [13:31:09.855] invokeRestart <- base::invokeRestart [13:31:09.855] length <- base::length [13:31:09.855] list <- base::list [13:31:09.855] seq.int <- base::seq.int [13:31:09.855] signalCondition <- base::signalCondition [13:31:09.855] sys.calls <- base::sys.calls [13:31:09.855] `[[` <- base::`[[` [13:31:09.855] `+` <- base::`+` [13:31:09.855] `<<-` <- base::`<<-` [13:31:09.855] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.855] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.855] 3L)] [13:31:09.855] } [13:31:09.855] function(cond) { [13:31:09.855] is_error <- inherits(cond, "error") [13:31:09.855] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.855] NULL) [13:31:09.855] if (is_error) { [13:31:09.855] sessionInformation <- function() { [13:31:09.855] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.855] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.855] search = base::search(), system = base::Sys.info()) [13:31:09.855] } [13:31:09.855] ...future.conditions[[length(...future.conditions) + [13:31:09.855] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.855] cond$call), session = sessionInformation(), [13:31:09.855] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.855] signalCondition(cond) [13:31:09.855] } [13:31:09.855] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.855] signal <- FALSE && inherits(cond, character(0)) [13:31:09.855] ...future.conditions[[length(...future.conditions) + [13:31:09.855] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.855] if (FALSE && !signal) { [13:31:09.855] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.855] { [13:31:09.855] inherits <- base::inherits [13:31:09.855] invokeRestart <- base::invokeRestart [13:31:09.855] is.null <- base::is.null [13:31:09.855] muffled <- FALSE [13:31:09.855] if (inherits(cond, "message")) { [13:31:09.855] muffled <- grepl(pattern, "muffleMessage") [13:31:09.855] if (muffled) [13:31:09.855] invokeRestart("muffleMessage") [13:31:09.855] } [13:31:09.855] else if (inherits(cond, "warning")) { [13:31:09.855] muffled <- grepl(pattern, "muffleWarning") [13:31:09.855] if (muffled) [13:31:09.855] invokeRestart("muffleWarning") [13:31:09.855] } [13:31:09.855] else if (inherits(cond, "condition")) { [13:31:09.855] if (!is.null(pattern)) { [13:31:09.855] computeRestarts <- base::computeRestarts [13:31:09.855] grepl <- base::grepl [13:31:09.855] restarts <- computeRestarts(cond) [13:31:09.855] for (restart in restarts) { [13:31:09.855] name <- restart$name [13:31:09.855] if (is.null(name)) [13:31:09.855] next [13:31:09.855] if (!grepl(pattern, name)) [13:31:09.855] next [13:31:09.855] invokeRestart(restart) [13:31:09.855] muffled <- TRUE [13:31:09.855] break [13:31:09.855] } [13:31:09.855] } [13:31:09.855] } [13:31:09.855] invisible(muffled) [13:31:09.855] } [13:31:09.855] muffleCondition(cond, pattern = "^muffle") [13:31:09.855] } [13:31:09.855] } [13:31:09.855] else { [13:31:09.855] if (TRUE) { [13:31:09.855] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.855] { [13:31:09.855] inherits <- base::inherits [13:31:09.855] invokeRestart <- base::invokeRestart [13:31:09.855] is.null <- base::is.null [13:31:09.855] muffled <- FALSE [13:31:09.855] if (inherits(cond, "message")) { [13:31:09.855] muffled <- grepl(pattern, "muffleMessage") [13:31:09.855] if (muffled) [13:31:09.855] invokeRestart("muffleMessage") [13:31:09.855] } [13:31:09.855] else if (inherits(cond, "warning")) { [13:31:09.855] muffled <- grepl(pattern, "muffleWarning") [13:31:09.855] if (muffled) [13:31:09.855] invokeRestart("muffleWarning") [13:31:09.855] } [13:31:09.855] else if (inherits(cond, "condition")) { [13:31:09.855] if (!is.null(pattern)) { [13:31:09.855] computeRestarts <- base::computeRestarts [13:31:09.855] grepl <- base::grepl [13:31:09.855] restarts <- computeRestarts(cond) [13:31:09.855] for (restart in restarts) { [13:31:09.855] name <- restart$name [13:31:09.855] if (is.null(name)) [13:31:09.855] next [13:31:09.855] if (!grepl(pattern, name)) [13:31:09.855] next [13:31:09.855] invokeRestart(restart) [13:31:09.855] muffled <- TRUE [13:31:09.855] break [13:31:09.855] } [13:31:09.855] } [13:31:09.855] } [13:31:09.855] invisible(muffled) [13:31:09.855] } [13:31:09.855] muffleCondition(cond, pattern = "^muffle") [13:31:09.855] } [13:31:09.855] } [13:31:09.855] } [13:31:09.855] })) [13:31:09.855] }, error = function(ex) { [13:31:09.855] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.855] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.855] ...future.rng), started = ...future.startTime, [13:31:09.855] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.855] version = "1.8"), class = "FutureResult") [13:31:09.855] }, finally = { [13:31:09.855] if (!identical(...future.workdir, getwd())) [13:31:09.855] setwd(...future.workdir) [13:31:09.855] { [13:31:09.855] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.855] ...future.oldOptions$nwarnings <- NULL [13:31:09.855] } [13:31:09.855] base::options(...future.oldOptions) [13:31:09.855] if (.Platform$OS.type == "windows") { [13:31:09.855] old_names <- names(...future.oldEnvVars) [13:31:09.855] envs <- base::Sys.getenv() [13:31:09.855] names <- names(envs) [13:31:09.855] common <- intersect(names, old_names) [13:31:09.855] added <- setdiff(names, old_names) [13:31:09.855] removed <- setdiff(old_names, names) [13:31:09.855] changed <- common[...future.oldEnvVars[common] != [13:31:09.855] envs[common]] [13:31:09.855] NAMES <- toupper(changed) [13:31:09.855] args <- list() [13:31:09.855] for (kk in seq_along(NAMES)) { [13:31:09.855] name <- changed[[kk]] [13:31:09.855] NAME <- NAMES[[kk]] [13:31:09.855] if (name != NAME && is.element(NAME, old_names)) [13:31:09.855] next [13:31:09.855] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.855] } [13:31:09.855] NAMES <- toupper(added) [13:31:09.855] for (kk in seq_along(NAMES)) { [13:31:09.855] name <- added[[kk]] [13:31:09.855] NAME <- NAMES[[kk]] [13:31:09.855] if (name != NAME && is.element(NAME, old_names)) [13:31:09.855] next [13:31:09.855] args[[name]] <- "" [13:31:09.855] } [13:31:09.855] NAMES <- toupper(removed) [13:31:09.855] for (kk in seq_along(NAMES)) { [13:31:09.855] name <- removed[[kk]] [13:31:09.855] NAME <- NAMES[[kk]] [13:31:09.855] if (name != NAME && is.element(NAME, old_names)) [13:31:09.855] next [13:31:09.855] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.855] } [13:31:09.855] if (length(args) > 0) [13:31:09.855] base::do.call(base::Sys.setenv, args = args) [13:31:09.855] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.855] } [13:31:09.855] else { [13:31:09.855] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.855] } [13:31:09.855] { [13:31:09.855] if (base::length(...future.futureOptionsAdded) > [13:31:09.855] 0L) { [13:31:09.855] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.855] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.855] base::options(opts) [13:31:09.855] } [13:31:09.855] { [13:31:09.855] NULL [13:31:09.855] options(future.plan = NULL) [13:31:09.855] if (is.na(NA_character_)) [13:31:09.855] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.855] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.855] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.855] .init = FALSE) [13:31:09.855] } [13:31:09.855] } [13:31:09.855] } [13:31:09.855] }) [13:31:09.855] if (TRUE) { [13:31:09.855] base::sink(type = "output", split = FALSE) [13:31:09.855] if (TRUE) { [13:31:09.855] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.855] } [13:31:09.855] else { [13:31:09.855] ...future.result["stdout"] <- base::list(NULL) [13:31:09.855] } [13:31:09.855] base::close(...future.stdout) [13:31:09.855] ...future.stdout <- NULL [13:31:09.855] } [13:31:09.855] ...future.result$conditions <- ...future.conditions [13:31:09.855] ...future.result$finished <- base::Sys.time() [13:31:09.855] ...future.result [13:31:09.855] } [13:31:09.858] - Launch lazy future ... done [13:31:09.859] run() for 'MiraiFuture' ... done Call: lm(formula = dist ~ speed + speed^2, data = cars) Coefficients: (Intercept) speed -17.579 3.932 [13:31:09.887] - 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:09.889] getGlobalsAndPackages() ... [13:31:09.889] Searching for globals... [13:31:09.891] - globals found: [9] '{', 'lm', 'dist', '+', 'speed', 'I', '^', '~', 'cars' [13:31:09.892] Searching for globals ... DONE [13:31:09.892] Resolving globals: FALSE [13:31:09.892] [13:31:09.893] - packages: [2] 'stats', 'datasets' [13:31:09.893] getGlobalsAndPackages() ... DONE [13:31:09.893] run() for 'Future' ... [13:31:09.893] - state: 'created' [13:31:09.893] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.896] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.896] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.896] - Field: 'label' [13:31:09.896] - Field: 'local' [13:31:09.897] - Field: 'owner' [13:31:09.897] - Field: 'envir' [13:31:09.897] - Field: 'packages' [13:31:09.897] - Field: 'gc' [13:31:09.897] - Field: 'conditions' [13:31:09.897] - Field: 'expr' [13:31:09.898] - Field: 'uuid' [13:31:09.898] - Field: 'seed' [13:31:09.898] - Field: 'version' [13:31:09.898] - Field: 'result' [13:31:09.898] - Field: 'asynchronous' [13:31:09.898] - Field: 'calls' [13:31:09.899] - Field: 'globals' [13:31:09.899] - Field: 'stdout' [13:31:09.899] - Field: 'earlySignal' [13:31:09.899] - Field: 'lazy' [13:31:09.899] - Field: 'state' [13:31:09.899] - Field: '.cluster' [13:31:09.900] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.900] - Launch lazy future ... [13:31:09.900] Packages needed by the future expression (n = 2): 'stats', 'datasets' [13:31:09.900] Packages needed by future strategies (n = 0): [13:31:09.901] { [13:31:09.901] { [13:31:09.901] { [13:31:09.901] ...future.startTime <- base::Sys.time() [13:31:09.901] { [13:31:09.901] { [13:31:09.901] { [13:31:09.901] { [13:31:09.901] base::local({ [13:31:09.901] has_future <- base::requireNamespace("future", [13:31:09.901] quietly = TRUE) [13:31:09.901] if (has_future) { [13:31:09.901] ns <- base::getNamespace("future") [13:31:09.901] version <- ns[[".package"]][["version"]] [13:31:09.901] if (is.null(version)) [13:31:09.901] version <- utils::packageVersion("future") [13:31:09.901] } [13:31:09.901] else { [13:31:09.901] version <- NULL [13:31:09.901] } [13:31:09.901] if (!has_future || version < "1.8.0") { [13:31:09.901] info <- base::c(r_version = base::gsub("R version ", [13:31:09.901] "", base::R.version$version.string), [13:31:09.901] platform = base::sprintf("%s (%s-bit)", [13:31:09.901] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.901] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.901] "release", "version")], collapse = " "), [13:31:09.901] hostname = base::Sys.info()[["nodename"]]) [13:31:09.901] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.901] info) [13:31:09.901] info <- base::paste(info, collapse = "; ") [13:31:09.901] if (!has_future) { [13:31:09.901] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.901] info) [13:31:09.901] } [13:31:09.901] else { [13:31:09.901] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.901] info, version) [13:31:09.901] } [13:31:09.901] base::stop(msg) [13:31:09.901] } [13:31:09.901] }) [13:31:09.901] } [13:31:09.901] base::local({ [13:31:09.901] for (pkg in c("stats", "datasets")) { [13:31:09.901] base::loadNamespace(pkg) [13:31:09.901] base::library(pkg, character.only = TRUE) [13:31:09.901] } [13:31:09.901] }) [13:31:09.901] } [13:31:09.901] ...future.strategy.old <- future::plan("list") [13:31:09.901] options(future.plan = NULL) [13:31:09.901] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.901] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.901] } [13:31:09.901] ...future.workdir <- getwd() [13:31:09.901] } [13:31:09.901] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.901] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.901] } [13:31:09.901] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.901] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.901] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.901] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.901] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.901] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.901] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.901] base::names(...future.oldOptions)) [13:31:09.901] } [13:31:09.901] if (FALSE) { [13:31:09.901] } [13:31:09.901] else { [13:31:09.901] if (TRUE) { [13:31:09.901] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.901] open = "w") [13:31:09.901] } [13:31:09.901] else { [13:31:09.901] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.901] windows = "NUL", "/dev/null"), open = "w") [13:31:09.901] } [13:31:09.901] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.901] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.901] base::sink(type = "output", split = FALSE) [13:31:09.901] base::close(...future.stdout) [13:31:09.901] }, add = TRUE) [13:31:09.901] } [13:31:09.901] ...future.frame <- base::sys.nframe() [13:31:09.901] ...future.conditions <- base::list() [13:31:09.901] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.901] if (FALSE) { [13:31:09.901] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.901] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.901] } [13:31:09.901] ...future.result <- base::tryCatch({ [13:31:09.901] base::withCallingHandlers({ [13:31:09.901] ...future.value <- base::withVisible(base::local({ [13:31:09.901] lm(dist ~ speed + I(speed^2), data = cars) [13:31:09.901] })) [13:31:09.901] future::FutureResult(value = ...future.value$value, [13:31:09.901] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.901] ...future.rng), globalenv = if (FALSE) [13:31:09.901] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.901] ...future.globalenv.names)) [13:31:09.901] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.901] }, condition = base::local({ [13:31:09.901] c <- base::c [13:31:09.901] inherits <- base::inherits [13:31:09.901] invokeRestart <- base::invokeRestart [13:31:09.901] length <- base::length [13:31:09.901] list <- base::list [13:31:09.901] seq.int <- base::seq.int [13:31:09.901] signalCondition <- base::signalCondition [13:31:09.901] sys.calls <- base::sys.calls [13:31:09.901] `[[` <- base::`[[` [13:31:09.901] `+` <- base::`+` [13:31:09.901] `<<-` <- base::`<<-` [13:31:09.901] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.901] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.901] 3L)] [13:31:09.901] } [13:31:09.901] function(cond) { [13:31:09.901] is_error <- inherits(cond, "error") [13:31:09.901] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.901] NULL) [13:31:09.901] if (is_error) { [13:31:09.901] sessionInformation <- function() { [13:31:09.901] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.901] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.901] search = base::search(), system = base::Sys.info()) [13:31:09.901] } [13:31:09.901] ...future.conditions[[length(...future.conditions) + [13:31:09.901] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.901] cond$call), session = sessionInformation(), [13:31:09.901] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.901] signalCondition(cond) [13:31:09.901] } [13:31:09.901] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.901] signal <- FALSE && inherits(cond, character(0)) [13:31:09.901] ...future.conditions[[length(...future.conditions) + [13:31:09.901] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.901] if (FALSE && !signal) { [13:31:09.901] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.901] { [13:31:09.901] inherits <- base::inherits [13:31:09.901] invokeRestart <- base::invokeRestart [13:31:09.901] is.null <- base::is.null [13:31:09.901] muffled <- FALSE [13:31:09.901] if (inherits(cond, "message")) { [13:31:09.901] muffled <- grepl(pattern, "muffleMessage") [13:31:09.901] if (muffled) [13:31:09.901] invokeRestart("muffleMessage") [13:31:09.901] } [13:31:09.901] else if (inherits(cond, "warning")) { [13:31:09.901] muffled <- grepl(pattern, "muffleWarning") [13:31:09.901] if (muffled) [13:31:09.901] invokeRestart("muffleWarning") [13:31:09.901] } [13:31:09.901] else if (inherits(cond, "condition")) { [13:31:09.901] if (!is.null(pattern)) { [13:31:09.901] computeRestarts <- base::computeRestarts [13:31:09.901] grepl <- base::grepl [13:31:09.901] restarts <- computeRestarts(cond) [13:31:09.901] for (restart in restarts) { [13:31:09.901] name <- restart$name [13:31:09.901] if (is.null(name)) [13:31:09.901] next [13:31:09.901] if (!grepl(pattern, name)) [13:31:09.901] next [13:31:09.901] invokeRestart(restart) [13:31:09.901] muffled <- TRUE [13:31:09.901] break [13:31:09.901] } [13:31:09.901] } [13:31:09.901] } [13:31:09.901] invisible(muffled) [13:31:09.901] } [13:31:09.901] muffleCondition(cond, pattern = "^muffle") [13:31:09.901] } [13:31:09.901] } [13:31:09.901] else { [13:31:09.901] if (TRUE) { [13:31:09.901] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.901] { [13:31:09.901] inherits <- base::inherits [13:31:09.901] invokeRestart <- base::invokeRestart [13:31:09.901] is.null <- base::is.null [13:31:09.901] muffled <- FALSE [13:31:09.901] if (inherits(cond, "message")) { [13:31:09.901] muffled <- grepl(pattern, "muffleMessage") [13:31:09.901] if (muffled) [13:31:09.901] invokeRestart("muffleMessage") [13:31:09.901] } [13:31:09.901] else if (inherits(cond, "warning")) { [13:31:09.901] muffled <- grepl(pattern, "muffleWarning") [13:31:09.901] if (muffled) [13:31:09.901] invokeRestart("muffleWarning") [13:31:09.901] } [13:31:09.901] else if (inherits(cond, "condition")) { [13:31:09.901] if (!is.null(pattern)) { [13:31:09.901] computeRestarts <- base::computeRestarts [13:31:09.901] grepl <- base::grepl [13:31:09.901] restarts <- computeRestarts(cond) [13:31:09.901] for (restart in restarts) { [13:31:09.901] name <- restart$name [13:31:09.901] if (is.null(name)) [13:31:09.901] next [13:31:09.901] if (!grepl(pattern, name)) [13:31:09.901] next [13:31:09.901] invokeRestart(restart) [13:31:09.901] muffled <- TRUE [13:31:09.901] break [13:31:09.901] } [13:31:09.901] } [13:31:09.901] } [13:31:09.901] invisible(muffled) [13:31:09.901] } [13:31:09.901] muffleCondition(cond, pattern = "^muffle") [13:31:09.901] } [13:31:09.901] } [13:31:09.901] } [13:31:09.901] })) [13:31:09.901] }, error = function(ex) { [13:31:09.901] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.901] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.901] ...future.rng), started = ...future.startTime, [13:31:09.901] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.901] version = "1.8"), class = "FutureResult") [13:31:09.901] }, finally = { [13:31:09.901] if (!identical(...future.workdir, getwd())) [13:31:09.901] setwd(...future.workdir) [13:31:09.901] { [13:31:09.901] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.901] ...future.oldOptions$nwarnings <- NULL [13:31:09.901] } [13:31:09.901] base::options(...future.oldOptions) [13:31:09.901] if (.Platform$OS.type == "windows") { [13:31:09.901] old_names <- names(...future.oldEnvVars) [13:31:09.901] envs <- base::Sys.getenv() [13:31:09.901] names <- names(envs) [13:31:09.901] common <- intersect(names, old_names) [13:31:09.901] added <- setdiff(names, old_names) [13:31:09.901] removed <- setdiff(old_names, names) [13:31:09.901] changed <- common[...future.oldEnvVars[common] != [13:31:09.901] envs[common]] [13:31:09.901] NAMES <- toupper(changed) [13:31:09.901] args <- list() [13:31:09.901] for (kk in seq_along(NAMES)) { [13:31:09.901] name <- changed[[kk]] [13:31:09.901] NAME <- NAMES[[kk]] [13:31:09.901] if (name != NAME && is.element(NAME, old_names)) [13:31:09.901] next [13:31:09.901] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.901] } [13:31:09.901] NAMES <- toupper(added) [13:31:09.901] for (kk in seq_along(NAMES)) { [13:31:09.901] name <- added[[kk]] [13:31:09.901] NAME <- NAMES[[kk]] [13:31:09.901] if (name != NAME && is.element(NAME, old_names)) [13:31:09.901] next [13:31:09.901] args[[name]] <- "" [13:31:09.901] } [13:31:09.901] NAMES <- toupper(removed) [13:31:09.901] for (kk in seq_along(NAMES)) { [13:31:09.901] name <- removed[[kk]] [13:31:09.901] NAME <- NAMES[[kk]] [13:31:09.901] if (name != NAME && is.element(NAME, old_names)) [13:31:09.901] next [13:31:09.901] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.901] } [13:31:09.901] if (length(args) > 0) [13:31:09.901] base::do.call(base::Sys.setenv, args = args) [13:31:09.901] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.901] } [13:31:09.901] else { [13:31:09.901] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.901] } [13:31:09.901] { [13:31:09.901] if (base::length(...future.futureOptionsAdded) > [13:31:09.901] 0L) { [13:31:09.901] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.901] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.901] base::options(opts) [13:31:09.901] } [13:31:09.901] { [13:31:09.901] NULL [13:31:09.901] options(future.plan = NULL) [13:31:09.901] if (is.na(NA_character_)) [13:31:09.901] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.901] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.901] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.901] .init = FALSE) [13:31:09.901] } [13:31:09.901] } [13:31:09.901] } [13:31:09.901] }) [13:31:09.901] if (TRUE) { [13:31:09.901] base::sink(type = "output", split = FALSE) [13:31:09.901] if (TRUE) { [13:31:09.901] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.901] } [13:31:09.901] else { [13:31:09.901] ...future.result["stdout"] <- base::list(NULL) [13:31:09.901] } [13:31:09.901] base::close(...future.stdout) [13:31:09.901] ...future.stdout <- NULL [13:31:09.901] } [13:31:09.901] ...future.result$conditions <- ...future.conditions [13:31:09.901] ...future.result$finished <- base::Sys.time() [13:31:09.901] ...future.result [13:31:09.901] } [13:31:09.905] - Launch lazy future ... done [13:31:09.905] 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:09.914] - 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:09.916] getGlobalsAndPackages() ... [13:31:09.916] Searching for globals... [13:31:09.918] - globals found: [7] '{', 'lm', 'dist', 'poly', 'speed', '~', 'cars' [13:31:09.918] Searching for globals ... DONE [13:31:09.918] Resolving globals: FALSE [13:31:09.919] [13:31:09.920] - packages: [2] 'stats', 'datasets' [13:31:09.920] getGlobalsAndPackages() ... DONE [13:31:09.921] run() for 'Future' ... [13:31:09.921] - state: 'created' [13:31:09.921] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.923] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.924] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.924] - Field: 'label' [13:31:09.924] - Field: 'local' [13:31:09.924] - Field: 'owner' [13:31:09.924] - Field: 'envir' [13:31:09.924] - Field: 'packages' [13:31:09.925] - Field: 'gc' [13:31:09.925] - Field: 'conditions' [13:31:09.925] - Field: 'expr' [13:31:09.925] - Field: 'uuid' [13:31:09.925] - Field: 'seed' [13:31:09.925] - Field: 'version' [13:31:09.926] - Field: 'result' [13:31:09.926] - Field: 'asynchronous' [13:31:09.926] - Field: 'calls' [13:31:09.926] - Field: 'globals' [13:31:09.926] - Field: 'stdout' [13:31:09.927] - Field: 'earlySignal' [13:31:09.927] - Field: 'lazy' [13:31:09.927] - Field: 'state' [13:31:09.927] - Field: '.cluster' [13:31:09.927] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.927] - Launch lazy future ... [13:31:09.928] Packages needed by the future expression (n = 2): 'stats', 'datasets' [13:31:09.928] Packages needed by future strategies (n = 0): [13:31:09.928] { [13:31:09.928] { [13:31:09.928] { [13:31:09.928] ...future.startTime <- base::Sys.time() [13:31:09.928] { [13:31:09.928] { [13:31:09.928] { [13:31:09.928] { [13:31:09.928] base::local({ [13:31:09.928] has_future <- base::requireNamespace("future", [13:31:09.928] quietly = TRUE) [13:31:09.928] if (has_future) { [13:31:09.928] ns <- base::getNamespace("future") [13:31:09.928] version <- ns[[".package"]][["version"]] [13:31:09.928] if (is.null(version)) [13:31:09.928] version <- utils::packageVersion("future") [13:31:09.928] } [13:31:09.928] else { [13:31:09.928] version <- NULL [13:31:09.928] } [13:31:09.928] if (!has_future || version < "1.8.0") { [13:31:09.928] info <- base::c(r_version = base::gsub("R version ", [13:31:09.928] "", base::R.version$version.string), [13:31:09.928] platform = base::sprintf("%s (%s-bit)", [13:31:09.928] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.928] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.928] "release", "version")], collapse = " "), [13:31:09.928] hostname = base::Sys.info()[["nodename"]]) [13:31:09.928] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.928] info) [13:31:09.928] info <- base::paste(info, collapse = "; ") [13:31:09.928] if (!has_future) { [13:31:09.928] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.928] info) [13:31:09.928] } [13:31:09.928] else { [13:31:09.928] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.928] info, version) [13:31:09.928] } [13:31:09.928] base::stop(msg) [13:31:09.928] } [13:31:09.928] }) [13:31:09.928] } [13:31:09.928] base::local({ [13:31:09.928] for (pkg in c("stats", "datasets")) { [13:31:09.928] base::loadNamespace(pkg) [13:31:09.928] base::library(pkg, character.only = TRUE) [13:31:09.928] } [13:31:09.928] }) [13:31:09.928] } [13:31:09.928] ...future.strategy.old <- future::plan("list") [13:31:09.928] options(future.plan = NULL) [13:31:09.928] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.928] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.928] } [13:31:09.928] ...future.workdir <- getwd() [13:31:09.928] } [13:31:09.928] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.928] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.928] } [13:31:09.928] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.928] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.928] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.928] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.928] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.928] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.928] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.928] base::names(...future.oldOptions)) [13:31:09.928] } [13:31:09.928] if (FALSE) { [13:31:09.928] } [13:31:09.928] else { [13:31:09.928] if (TRUE) { [13:31:09.928] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.928] open = "w") [13:31:09.928] } [13:31:09.928] else { [13:31:09.928] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.928] windows = "NUL", "/dev/null"), open = "w") [13:31:09.928] } [13:31:09.928] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.928] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.928] base::sink(type = "output", split = FALSE) [13:31:09.928] base::close(...future.stdout) [13:31:09.928] }, add = TRUE) [13:31:09.928] } [13:31:09.928] ...future.frame <- base::sys.nframe() [13:31:09.928] ...future.conditions <- base::list() [13:31:09.928] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.928] if (FALSE) { [13:31:09.928] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.928] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.928] } [13:31:09.928] ...future.result <- base::tryCatch({ [13:31:09.928] base::withCallingHandlers({ [13:31:09.928] ...future.value <- base::withVisible(base::local({ [13:31:09.928] lm(dist ~ poly(speed, 2), data = cars) [13:31:09.928] })) [13:31:09.928] future::FutureResult(value = ...future.value$value, [13:31:09.928] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.928] ...future.rng), globalenv = if (FALSE) [13:31:09.928] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.928] ...future.globalenv.names)) [13:31:09.928] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.928] }, condition = base::local({ [13:31:09.928] c <- base::c [13:31:09.928] inherits <- base::inherits [13:31:09.928] invokeRestart <- base::invokeRestart [13:31:09.928] length <- base::length [13:31:09.928] list <- base::list [13:31:09.928] seq.int <- base::seq.int [13:31:09.928] signalCondition <- base::signalCondition [13:31:09.928] sys.calls <- base::sys.calls [13:31:09.928] `[[` <- base::`[[` [13:31:09.928] `+` <- base::`+` [13:31:09.928] `<<-` <- base::`<<-` [13:31:09.928] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.928] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.928] 3L)] [13:31:09.928] } [13:31:09.928] function(cond) { [13:31:09.928] is_error <- inherits(cond, "error") [13:31:09.928] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.928] NULL) [13:31:09.928] if (is_error) { [13:31:09.928] sessionInformation <- function() { [13:31:09.928] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.928] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.928] search = base::search(), system = base::Sys.info()) [13:31:09.928] } [13:31:09.928] ...future.conditions[[length(...future.conditions) + [13:31:09.928] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.928] cond$call), session = sessionInformation(), [13:31:09.928] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.928] signalCondition(cond) [13:31:09.928] } [13:31:09.928] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.928] signal <- FALSE && inherits(cond, character(0)) [13:31:09.928] ...future.conditions[[length(...future.conditions) + [13:31:09.928] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.928] if (FALSE && !signal) { [13:31:09.928] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.928] { [13:31:09.928] inherits <- base::inherits [13:31:09.928] invokeRestart <- base::invokeRestart [13:31:09.928] is.null <- base::is.null [13:31:09.928] muffled <- FALSE [13:31:09.928] if (inherits(cond, "message")) { [13:31:09.928] muffled <- grepl(pattern, "muffleMessage") [13:31:09.928] if (muffled) [13:31:09.928] invokeRestart("muffleMessage") [13:31:09.928] } [13:31:09.928] else if (inherits(cond, "warning")) { [13:31:09.928] muffled <- grepl(pattern, "muffleWarning") [13:31:09.928] if (muffled) [13:31:09.928] invokeRestart("muffleWarning") [13:31:09.928] } [13:31:09.928] else if (inherits(cond, "condition")) { [13:31:09.928] if (!is.null(pattern)) { [13:31:09.928] computeRestarts <- base::computeRestarts [13:31:09.928] grepl <- base::grepl [13:31:09.928] restarts <- computeRestarts(cond) [13:31:09.928] for (restart in restarts) { [13:31:09.928] name <- restart$name [13:31:09.928] if (is.null(name)) [13:31:09.928] next [13:31:09.928] if (!grepl(pattern, name)) [13:31:09.928] next [13:31:09.928] invokeRestart(restart) [13:31:09.928] muffled <- TRUE [13:31:09.928] break [13:31:09.928] } [13:31:09.928] } [13:31:09.928] } [13:31:09.928] invisible(muffled) [13:31:09.928] } [13:31:09.928] muffleCondition(cond, pattern = "^muffle") [13:31:09.928] } [13:31:09.928] } [13:31:09.928] else { [13:31:09.928] if (TRUE) { [13:31:09.928] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.928] { [13:31:09.928] inherits <- base::inherits [13:31:09.928] invokeRestart <- base::invokeRestart [13:31:09.928] is.null <- base::is.null [13:31:09.928] muffled <- FALSE [13:31:09.928] if (inherits(cond, "message")) { [13:31:09.928] muffled <- grepl(pattern, "muffleMessage") [13:31:09.928] if (muffled) [13:31:09.928] invokeRestart("muffleMessage") [13:31:09.928] } [13:31:09.928] else if (inherits(cond, "warning")) { [13:31:09.928] muffled <- grepl(pattern, "muffleWarning") [13:31:09.928] if (muffled) [13:31:09.928] invokeRestart("muffleWarning") [13:31:09.928] } [13:31:09.928] else if (inherits(cond, "condition")) { [13:31:09.928] if (!is.null(pattern)) { [13:31:09.928] computeRestarts <- base::computeRestarts [13:31:09.928] grepl <- base::grepl [13:31:09.928] restarts <- computeRestarts(cond) [13:31:09.928] for (restart in restarts) { [13:31:09.928] name <- restart$name [13:31:09.928] if (is.null(name)) [13:31:09.928] next [13:31:09.928] if (!grepl(pattern, name)) [13:31:09.928] next [13:31:09.928] invokeRestart(restart) [13:31:09.928] muffled <- TRUE [13:31:09.928] break [13:31:09.928] } [13:31:09.928] } [13:31:09.928] } [13:31:09.928] invisible(muffled) [13:31:09.928] } [13:31:09.928] muffleCondition(cond, pattern = "^muffle") [13:31:09.928] } [13:31:09.928] } [13:31:09.928] } [13:31:09.928] })) [13:31:09.928] }, error = function(ex) { [13:31:09.928] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.928] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.928] ...future.rng), started = ...future.startTime, [13:31:09.928] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.928] version = "1.8"), class = "FutureResult") [13:31:09.928] }, finally = { [13:31:09.928] if (!identical(...future.workdir, getwd())) [13:31:09.928] setwd(...future.workdir) [13:31:09.928] { [13:31:09.928] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.928] ...future.oldOptions$nwarnings <- NULL [13:31:09.928] } [13:31:09.928] base::options(...future.oldOptions) [13:31:09.928] if (.Platform$OS.type == "windows") { [13:31:09.928] old_names <- names(...future.oldEnvVars) [13:31:09.928] envs <- base::Sys.getenv() [13:31:09.928] names <- names(envs) [13:31:09.928] common <- intersect(names, old_names) [13:31:09.928] added <- setdiff(names, old_names) [13:31:09.928] removed <- setdiff(old_names, names) [13:31:09.928] changed <- common[...future.oldEnvVars[common] != [13:31:09.928] envs[common]] [13:31:09.928] NAMES <- toupper(changed) [13:31:09.928] args <- list() [13:31:09.928] for (kk in seq_along(NAMES)) { [13:31:09.928] name <- changed[[kk]] [13:31:09.928] NAME <- NAMES[[kk]] [13:31:09.928] if (name != NAME && is.element(NAME, old_names)) [13:31:09.928] next [13:31:09.928] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.928] } [13:31:09.928] NAMES <- toupper(added) [13:31:09.928] for (kk in seq_along(NAMES)) { [13:31:09.928] name <- added[[kk]] [13:31:09.928] NAME <- NAMES[[kk]] [13:31:09.928] if (name != NAME && is.element(NAME, old_names)) [13:31:09.928] next [13:31:09.928] args[[name]] <- "" [13:31:09.928] } [13:31:09.928] NAMES <- toupper(removed) [13:31:09.928] for (kk in seq_along(NAMES)) { [13:31:09.928] name <- removed[[kk]] [13:31:09.928] NAME <- NAMES[[kk]] [13:31:09.928] if (name != NAME && is.element(NAME, old_names)) [13:31:09.928] next [13:31:09.928] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.928] } [13:31:09.928] if (length(args) > 0) [13:31:09.928] base::do.call(base::Sys.setenv, args = args) [13:31:09.928] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.928] } [13:31:09.928] else { [13:31:09.928] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.928] } [13:31:09.928] { [13:31:09.928] if (base::length(...future.futureOptionsAdded) > [13:31:09.928] 0L) { [13:31:09.928] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.928] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.928] base::options(opts) [13:31:09.928] } [13:31:09.928] { [13:31:09.928] NULL [13:31:09.928] options(future.plan = NULL) [13:31:09.928] if (is.na(NA_character_)) [13:31:09.928] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.928] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.928] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.928] .init = FALSE) [13:31:09.928] } [13:31:09.928] } [13:31:09.928] } [13:31:09.928] }) [13:31:09.928] if (TRUE) { [13:31:09.928] base::sink(type = "output", split = FALSE) [13:31:09.928] if (TRUE) { [13:31:09.928] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.928] } [13:31:09.928] else { [13:31:09.928] ...future.result["stdout"] <- base::list(NULL) [13:31:09.928] } [13:31:09.928] base::close(...future.stdout) [13:31:09.928] ...future.stdout <- NULL [13:31:09.928] } [13:31:09.928] ...future.result$conditions <- ...future.conditions [13:31:09.928] ...future.result$finished <- base::Sys.time() [13:31:09.928] ...future.result [13:31:09.928] } [13:31:09.932] - Launch lazy future ... done [13:31:09.932] 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:09.945] getGlobalsAndPackages() ... [13:31:09.945] Searching for globals... [13:31:09.952] - globals found: [16] '{', 'outer_function', 'map', ':', '~', 'inner_function', '.x', 'if', 'inherits', '<-', '[[', '-', 'eval', 'bquote', 'lapply', '+' [13:31:09.953] Searching for globals ... DONE [13:31:09.953] Resolving globals: FALSE [13:31:09.954] The total size of the 3 globals is 7.52 KiB (7704 bytes) [13:31:09.954] 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:09.954] - globals: [3] 'outer_function', 'map', 'inner_function' [13:31:09.955] [13:31:09.955] getGlobalsAndPackages() ... DONE [13:31:09.955] run() for 'Future' ... [13:31:09.955] - state: 'created' [13:31:09.955] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.958] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.958] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.958] - Field: 'label' [13:31:09.958] - Field: 'local' [13:31:09.958] - Field: 'owner' [13:31:09.959] - Field: 'envir' [13:31:09.959] - Field: 'packages' [13:31:09.959] - Field: 'gc' [13:31:09.959] - Field: 'conditions' [13:31:09.959] - Field: 'expr' [13:31:09.959] - Field: 'uuid' [13:31:09.960] - Field: 'seed' [13:31:09.960] - Field: 'version' [13:31:09.960] - Field: 'result' [13:31:09.960] - Field: 'asynchronous' [13:31:09.960] - Field: 'calls' [13:31:09.960] - Field: 'globals' [13:31:09.961] - Field: 'stdout' [13:31:09.961] - Field: 'earlySignal' [13:31:09.961] - Field: 'lazy' [13:31:09.961] - Field: 'state' [13:31:09.961] - Field: '.cluster' [13:31:09.961] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.962] - Launch lazy future ... [13:31:09.962] Packages needed by the future expression (n = 0): [13:31:09.962] Packages needed by future strategies (n = 0): [13:31:09.963] { [13:31:09.963] { [13:31:09.963] { [13:31:09.963] ...future.startTime <- base::Sys.time() [13:31:09.963] { [13:31:09.963] { [13:31:09.963] { [13:31:09.963] base::local({ [13:31:09.963] has_future <- base::requireNamespace("future", [13:31:09.963] quietly = TRUE) [13:31:09.963] if (has_future) { [13:31:09.963] ns <- base::getNamespace("future") [13:31:09.963] version <- ns[[".package"]][["version"]] [13:31:09.963] if (is.null(version)) [13:31:09.963] version <- utils::packageVersion("future") [13:31:09.963] } [13:31:09.963] else { [13:31:09.963] version <- NULL [13:31:09.963] } [13:31:09.963] if (!has_future || version < "1.8.0") { [13:31:09.963] info <- base::c(r_version = base::gsub("R version ", [13:31:09.963] "", base::R.version$version.string), [13:31:09.963] platform = base::sprintf("%s (%s-bit)", [13:31:09.963] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.963] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.963] "release", "version")], collapse = " "), [13:31:09.963] hostname = base::Sys.info()[["nodename"]]) [13:31:09.963] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.963] info) [13:31:09.963] info <- base::paste(info, collapse = "; ") [13:31:09.963] if (!has_future) { [13:31:09.963] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.963] info) [13:31:09.963] } [13:31:09.963] else { [13:31:09.963] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.963] info, version) [13:31:09.963] } [13:31:09.963] base::stop(msg) [13:31:09.963] } [13:31:09.963] }) [13:31:09.963] } [13:31:09.963] ...future.strategy.old <- future::plan("list") [13:31:09.963] options(future.plan = NULL) [13:31:09.963] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.963] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.963] } [13:31:09.963] ...future.workdir <- getwd() [13:31:09.963] } [13:31:09.963] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.963] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.963] } [13:31:09.963] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.963] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.963] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.963] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.963] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.963] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.963] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.963] base::names(...future.oldOptions)) [13:31:09.963] } [13:31:09.963] if (FALSE) { [13:31:09.963] } [13:31:09.963] else { [13:31:09.963] if (TRUE) { [13:31:09.963] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.963] open = "w") [13:31:09.963] } [13:31:09.963] else { [13:31:09.963] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.963] windows = "NUL", "/dev/null"), open = "w") [13:31:09.963] } [13:31:09.963] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.963] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.963] base::sink(type = "output", split = FALSE) [13:31:09.963] base::close(...future.stdout) [13:31:09.963] }, add = TRUE) [13:31:09.963] } [13:31:09.963] ...future.frame <- base::sys.nframe() [13:31:09.963] ...future.conditions <- base::list() [13:31:09.963] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.963] if (FALSE) { [13:31:09.963] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.963] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.963] } [13:31:09.963] ...future.result <- base::tryCatch({ [13:31:09.963] base::withCallingHandlers({ [13:31:09.963] ...future.value <- base::withVisible(base::local({ [13:31:09.963] outer_function(1L) [13:31:09.963] })) [13:31:09.963] future::FutureResult(value = ...future.value$value, [13:31:09.963] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.963] ...future.rng), globalenv = if (FALSE) [13:31:09.963] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.963] ...future.globalenv.names)) [13:31:09.963] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.963] }, condition = base::local({ [13:31:09.963] c <- base::c [13:31:09.963] inherits <- base::inherits [13:31:09.963] invokeRestart <- base::invokeRestart [13:31:09.963] length <- base::length [13:31:09.963] list <- base::list [13:31:09.963] seq.int <- base::seq.int [13:31:09.963] signalCondition <- base::signalCondition [13:31:09.963] sys.calls <- base::sys.calls [13:31:09.963] `[[` <- base::`[[` [13:31:09.963] `+` <- base::`+` [13:31:09.963] `<<-` <- base::`<<-` [13:31:09.963] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.963] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.963] 3L)] [13:31:09.963] } [13:31:09.963] function(cond) { [13:31:09.963] is_error <- inherits(cond, "error") [13:31:09.963] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.963] NULL) [13:31:09.963] if (is_error) { [13:31:09.963] sessionInformation <- function() { [13:31:09.963] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.963] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.963] search = base::search(), system = base::Sys.info()) [13:31:09.963] } [13:31:09.963] ...future.conditions[[length(...future.conditions) + [13:31:09.963] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.963] cond$call), session = sessionInformation(), [13:31:09.963] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.963] signalCondition(cond) [13:31:09.963] } [13:31:09.963] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.963] signal <- FALSE && inherits(cond, character(0)) [13:31:09.963] ...future.conditions[[length(...future.conditions) + [13:31:09.963] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.963] if (FALSE && !signal) { [13:31:09.963] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.963] { [13:31:09.963] inherits <- base::inherits [13:31:09.963] invokeRestart <- base::invokeRestart [13:31:09.963] is.null <- base::is.null [13:31:09.963] muffled <- FALSE [13:31:09.963] if (inherits(cond, "message")) { [13:31:09.963] muffled <- grepl(pattern, "muffleMessage") [13:31:09.963] if (muffled) [13:31:09.963] invokeRestart("muffleMessage") [13:31:09.963] } [13:31:09.963] else if (inherits(cond, "warning")) { [13:31:09.963] muffled <- grepl(pattern, "muffleWarning") [13:31:09.963] if (muffled) [13:31:09.963] invokeRestart("muffleWarning") [13:31:09.963] } [13:31:09.963] else if (inherits(cond, "condition")) { [13:31:09.963] if (!is.null(pattern)) { [13:31:09.963] computeRestarts <- base::computeRestarts [13:31:09.963] grepl <- base::grepl [13:31:09.963] restarts <- computeRestarts(cond) [13:31:09.963] for (restart in restarts) { [13:31:09.963] name <- restart$name [13:31:09.963] if (is.null(name)) [13:31:09.963] next [13:31:09.963] if (!grepl(pattern, name)) [13:31:09.963] next [13:31:09.963] invokeRestart(restart) [13:31:09.963] muffled <- TRUE [13:31:09.963] break [13:31:09.963] } [13:31:09.963] } [13:31:09.963] } [13:31:09.963] invisible(muffled) [13:31:09.963] } [13:31:09.963] muffleCondition(cond, pattern = "^muffle") [13:31:09.963] } [13:31:09.963] } [13:31:09.963] else { [13:31:09.963] if (TRUE) { [13:31:09.963] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.963] { [13:31:09.963] inherits <- base::inherits [13:31:09.963] invokeRestart <- base::invokeRestart [13:31:09.963] is.null <- base::is.null [13:31:09.963] muffled <- FALSE [13:31:09.963] if (inherits(cond, "message")) { [13:31:09.963] muffled <- grepl(pattern, "muffleMessage") [13:31:09.963] if (muffled) [13:31:09.963] invokeRestart("muffleMessage") [13:31:09.963] } [13:31:09.963] else if (inherits(cond, "warning")) { [13:31:09.963] muffled <- grepl(pattern, "muffleWarning") [13:31:09.963] if (muffled) [13:31:09.963] invokeRestart("muffleWarning") [13:31:09.963] } [13:31:09.963] else if (inherits(cond, "condition")) { [13:31:09.963] if (!is.null(pattern)) { [13:31:09.963] computeRestarts <- base::computeRestarts [13:31:09.963] grepl <- base::grepl [13:31:09.963] restarts <- computeRestarts(cond) [13:31:09.963] for (restart in restarts) { [13:31:09.963] name <- restart$name [13:31:09.963] if (is.null(name)) [13:31:09.963] next [13:31:09.963] if (!grepl(pattern, name)) [13:31:09.963] next [13:31:09.963] invokeRestart(restart) [13:31:09.963] muffled <- TRUE [13:31:09.963] break [13:31:09.963] } [13:31:09.963] } [13:31:09.963] } [13:31:09.963] invisible(muffled) [13:31:09.963] } [13:31:09.963] muffleCondition(cond, pattern = "^muffle") [13:31:09.963] } [13:31:09.963] } [13:31:09.963] } [13:31:09.963] })) [13:31:09.963] }, error = function(ex) { [13:31:09.963] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.963] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.963] ...future.rng), started = ...future.startTime, [13:31:09.963] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.963] version = "1.8"), class = "FutureResult") [13:31:09.963] }, finally = { [13:31:09.963] if (!identical(...future.workdir, getwd())) [13:31:09.963] setwd(...future.workdir) [13:31:09.963] { [13:31:09.963] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.963] ...future.oldOptions$nwarnings <- NULL [13:31:09.963] } [13:31:09.963] base::options(...future.oldOptions) [13:31:09.963] if (.Platform$OS.type == "windows") { [13:31:09.963] old_names <- names(...future.oldEnvVars) [13:31:09.963] envs <- base::Sys.getenv() [13:31:09.963] names <- names(envs) [13:31:09.963] common <- intersect(names, old_names) [13:31:09.963] added <- setdiff(names, old_names) [13:31:09.963] removed <- setdiff(old_names, names) [13:31:09.963] changed <- common[...future.oldEnvVars[common] != [13:31:09.963] envs[common]] [13:31:09.963] NAMES <- toupper(changed) [13:31:09.963] args <- list() [13:31:09.963] for (kk in seq_along(NAMES)) { [13:31:09.963] name <- changed[[kk]] [13:31:09.963] NAME <- NAMES[[kk]] [13:31:09.963] if (name != NAME && is.element(NAME, old_names)) [13:31:09.963] next [13:31:09.963] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.963] } [13:31:09.963] NAMES <- toupper(added) [13:31:09.963] for (kk in seq_along(NAMES)) { [13:31:09.963] name <- added[[kk]] [13:31:09.963] NAME <- NAMES[[kk]] [13:31:09.963] if (name != NAME && is.element(NAME, old_names)) [13:31:09.963] next [13:31:09.963] args[[name]] <- "" [13:31:09.963] } [13:31:09.963] NAMES <- toupper(removed) [13:31:09.963] for (kk in seq_along(NAMES)) { [13:31:09.963] name <- removed[[kk]] [13:31:09.963] NAME <- NAMES[[kk]] [13:31:09.963] if (name != NAME && is.element(NAME, old_names)) [13:31:09.963] next [13:31:09.963] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.963] } [13:31:09.963] if (length(args) > 0) [13:31:09.963] base::do.call(base::Sys.setenv, args = args) [13:31:09.963] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.963] } [13:31:09.963] else { [13:31:09.963] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.963] } [13:31:09.963] { [13:31:09.963] if (base::length(...future.futureOptionsAdded) > [13:31:09.963] 0L) { [13:31:09.963] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.963] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.963] base::options(opts) [13:31:09.963] } [13:31:09.963] { [13:31:09.963] NULL [13:31:09.963] options(future.plan = NULL) [13:31:09.963] if (is.na(NA_character_)) [13:31:09.963] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.963] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.963] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.963] .init = FALSE) [13:31:09.963] } [13:31:09.963] } [13:31:09.963] } [13:31:09.963] }) [13:31:09.963] if (TRUE) { [13:31:09.963] base::sink(type = "output", split = FALSE) [13:31:09.963] if (TRUE) { [13:31:09.963] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.963] } [13:31:09.963] else { [13:31:09.963] ...future.result["stdout"] <- base::list(NULL) [13:31:09.963] } [13:31:09.963] base::close(...future.stdout) [13:31:09.963] ...future.stdout <- NULL [13:31:09.963] } [13:31:09.963] ...future.result$conditions <- ...future.conditions [13:31:09.963] ...future.result$finished <- base::Sys.time() [13:31:09.963] ...future.result [13:31:09.963] } [13:31:09.966] - Launch lazy future ... done [13:31:09.966] run() for 'MiraiFuture' ... done List of 2 $ : num [1:2] 2 3 $ : num [1:2] 2 3 [13:31:09.975] getGlobalsAndPackages() ... [13:31:09.975] Searching for globals... [13:31:09.982] - globals found: [16] '{', 'outer_function', 'map', ':', '~', 'inner_function', '.x', 'if', 'inherits', '<-', '[[', '-', 'eval', 'bquote', 'lapply', '+' [13:31:09.982] Searching for globals ... DONE [13:31:09.982] Resolving globals: FALSE [13:31:09.983] The total size of the 3 globals is 7.52 KiB (7704 bytes) [13:31:09.984] 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:09.984] - globals: [3] 'outer_function', 'map', 'inner_function' [13:31:09.984] [13:31:09.984] getGlobalsAndPackages() ... DONE [13:31:09.984] run() for 'Future' ... [13:31:09.985] - state: 'created' [13:31:09.985] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:31:09.987] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:31:09.987] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:31:09.988] - Field: 'label' [13:31:09.988] - Field: 'local' [13:31:09.988] - Field: 'owner' [13:31:09.988] - Field: 'envir' [13:31:09.988] - Field: 'packages' [13:31:09.988] - Field: 'gc' [13:31:09.989] - Field: 'conditions' [13:31:09.989] - Field: 'expr' [13:31:09.989] - Field: 'uuid' [13:31:09.989] - Field: 'seed' [13:31:09.989] - Field: 'version' [13:31:09.989] - Field: 'result' [13:31:09.990] - Field: 'asynchronous' [13:31:09.990] - Field: 'calls' [13:31:09.990] - Field: 'globals' [13:31:09.990] - Field: 'stdout' [13:31:09.990] - Field: 'earlySignal' [13:31:09.990] - Field: 'lazy' [13:31:09.991] - Field: 'state' [13:31:09.991] - Field: '.cluster' [13:31:09.991] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:31:09.991] - Launch lazy future ... [13:31:09.991] Packages needed by the future expression (n = 0): [13:31:09.991] Packages needed by future strategies (n = 0): [13:31:09.992] { [13:31:09.992] { [13:31:09.992] { [13:31:09.992] ...future.startTime <- base::Sys.time() [13:31:09.992] { [13:31:09.992] { [13:31:09.992] { [13:31:09.992] base::local({ [13:31:09.992] has_future <- base::requireNamespace("future", [13:31:09.992] quietly = TRUE) [13:31:09.992] if (has_future) { [13:31:09.992] ns <- base::getNamespace("future") [13:31:09.992] version <- ns[[".package"]][["version"]] [13:31:09.992] if (is.null(version)) [13:31:09.992] version <- utils::packageVersion("future") [13:31:09.992] } [13:31:09.992] else { [13:31:09.992] version <- NULL [13:31:09.992] } [13:31:09.992] if (!has_future || version < "1.8.0") { [13:31:09.992] info <- base::c(r_version = base::gsub("R version ", [13:31:09.992] "", base::R.version$version.string), [13:31:09.992] platform = base::sprintf("%s (%s-bit)", [13:31:09.992] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:31:09.992] os = base::paste(base::Sys.info()[base::c("sysname", [13:31:09.992] "release", "version")], collapse = " "), [13:31:09.992] hostname = base::Sys.info()[["nodename"]]) [13:31:09.992] info <- base::sprintf("%s: %s", base::names(info), [13:31:09.992] info) [13:31:09.992] info <- base::paste(info, collapse = "; ") [13:31:09.992] if (!has_future) { [13:31:09.992] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:31:09.992] info) [13:31:09.992] } [13:31:09.992] else { [13:31:09.992] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:31:09.992] info, version) [13:31:09.992] } [13:31:09.992] base::stop(msg) [13:31:09.992] } [13:31:09.992] }) [13:31:09.992] } [13:31:09.992] ...future.strategy.old <- future::plan("list") [13:31:09.992] options(future.plan = NULL) [13:31:09.992] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.992] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:31:09.992] } [13:31:09.992] ...future.workdir <- getwd() [13:31:09.992] } [13:31:09.992] ...future.oldOptions <- base::as.list(base::.Options) [13:31:09.992] ...future.oldEnvVars <- base::Sys.getenv() [13:31:09.992] } [13:31:09.992] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:31:09.992] future.globals.maxSize = NULL, future.globals.method = NULL, [13:31:09.992] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:31:09.992] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:31:09.992] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:31:09.992] future.stdout.windows.reencode = NULL, width = 80L) [13:31:09.992] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:31:09.992] base::names(...future.oldOptions)) [13:31:09.992] } [13:31:09.992] if (FALSE) { [13:31:09.992] } [13:31:09.992] else { [13:31:09.992] if (TRUE) { [13:31:09.992] ...future.stdout <- base::rawConnection(base::raw(0L), [13:31:09.992] open = "w") [13:31:09.992] } [13:31:09.992] else { [13:31:09.992] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:31:09.992] windows = "NUL", "/dev/null"), open = "w") [13:31:09.992] } [13:31:09.992] base::sink(...future.stdout, type = "output", split = FALSE) [13:31:09.992] base::on.exit(if (!base::is.null(...future.stdout)) { [13:31:09.992] base::sink(type = "output", split = FALSE) [13:31:09.992] base::close(...future.stdout) [13:31:09.992] }, add = TRUE) [13:31:09.992] } [13:31:09.992] ...future.frame <- base::sys.nframe() [13:31:09.992] ...future.conditions <- base::list() [13:31:09.992] ...future.rng <- base::globalenv()$.Random.seed [13:31:09.992] if (FALSE) { [13:31:09.992] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:31:09.992] "...future.value", "...future.globalenv.names", ".Random.seed") [13:31:09.992] } [13:31:09.992] ...future.result <- base::tryCatch({ [13:31:09.992] base::withCallingHandlers({ [13:31:09.992] ...future.value <- base::withVisible(base::local({ [13:31:09.992] outer_function(1L) [13:31:09.992] })) [13:31:09.992] future::FutureResult(value = ...future.value$value, [13:31:09.992] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.992] ...future.rng), globalenv = if (FALSE) [13:31:09.992] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:31:09.992] ...future.globalenv.names)) [13:31:09.992] else NULL, started = ...future.startTime, version = "1.8") [13:31:09.992] }, condition = base::local({ [13:31:09.992] c <- base::c [13:31:09.992] inherits <- base::inherits [13:31:09.992] invokeRestart <- base::invokeRestart [13:31:09.992] length <- base::length [13:31:09.992] list <- base::list [13:31:09.992] seq.int <- base::seq.int [13:31:09.992] signalCondition <- base::signalCondition [13:31:09.992] sys.calls <- base::sys.calls [13:31:09.992] `[[` <- base::`[[` [13:31:09.992] `+` <- base::`+` [13:31:09.992] `<<-` <- base::`<<-` [13:31:09.992] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:31:09.992] calls[seq.int(from = from + 12L, to = length(calls) - [13:31:09.992] 3L)] [13:31:09.992] } [13:31:09.992] function(cond) { [13:31:09.992] is_error <- inherits(cond, "error") [13:31:09.992] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:31:09.992] NULL) [13:31:09.992] if (is_error) { [13:31:09.992] sessionInformation <- function() { [13:31:09.992] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:31:09.992] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:31:09.992] search = base::search(), system = base::Sys.info()) [13:31:09.992] } [13:31:09.992] ...future.conditions[[length(...future.conditions) + [13:31:09.992] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:31:09.992] cond$call), session = sessionInformation(), [13:31:09.992] timestamp = base::Sys.time(), signaled = 0L) [13:31:09.992] signalCondition(cond) [13:31:09.992] } [13:31:09.992] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:31:09.992] signal <- FALSE && inherits(cond, character(0)) [13:31:09.992] ...future.conditions[[length(...future.conditions) + [13:31:09.992] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:31:09.992] if (FALSE && !signal) { [13:31:09.992] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.992] { [13:31:09.992] inherits <- base::inherits [13:31:09.992] invokeRestart <- base::invokeRestart [13:31:09.992] is.null <- base::is.null [13:31:09.992] muffled <- FALSE [13:31:09.992] if (inherits(cond, "message")) { [13:31:09.992] muffled <- grepl(pattern, "muffleMessage") [13:31:09.992] if (muffled) [13:31:09.992] invokeRestart("muffleMessage") [13:31:09.992] } [13:31:09.992] else if (inherits(cond, "warning")) { [13:31:09.992] muffled <- grepl(pattern, "muffleWarning") [13:31:09.992] if (muffled) [13:31:09.992] invokeRestart("muffleWarning") [13:31:09.992] } [13:31:09.992] else if (inherits(cond, "condition")) { [13:31:09.992] if (!is.null(pattern)) { [13:31:09.992] computeRestarts <- base::computeRestarts [13:31:09.992] grepl <- base::grepl [13:31:09.992] restarts <- computeRestarts(cond) [13:31:09.992] for (restart in restarts) { [13:31:09.992] name <- restart$name [13:31:09.992] if (is.null(name)) [13:31:09.992] next [13:31:09.992] if (!grepl(pattern, name)) [13:31:09.992] next [13:31:09.992] invokeRestart(restart) [13:31:09.992] muffled <- TRUE [13:31:09.992] break [13:31:09.992] } [13:31:09.992] } [13:31:09.992] } [13:31:09.992] invisible(muffled) [13:31:09.992] } [13:31:09.992] muffleCondition(cond, pattern = "^muffle") [13:31:09.992] } [13:31:09.992] } [13:31:09.992] else { [13:31:09.992] if (TRUE) { [13:31:09.992] muffleCondition <- function (cond, pattern = "^muffle") [13:31:09.992] { [13:31:09.992] inherits <- base::inherits [13:31:09.992] invokeRestart <- base::invokeRestart [13:31:09.992] is.null <- base::is.null [13:31:09.992] muffled <- FALSE [13:31:09.992] if (inherits(cond, "message")) { [13:31:09.992] muffled <- grepl(pattern, "muffleMessage") [13:31:09.992] if (muffled) [13:31:09.992] invokeRestart("muffleMessage") [13:31:09.992] } [13:31:09.992] else if (inherits(cond, "warning")) { [13:31:09.992] muffled <- grepl(pattern, "muffleWarning") [13:31:09.992] if (muffled) [13:31:09.992] invokeRestart("muffleWarning") [13:31:09.992] } [13:31:09.992] else if (inherits(cond, "condition")) { [13:31:09.992] if (!is.null(pattern)) { [13:31:09.992] computeRestarts <- base::computeRestarts [13:31:09.992] grepl <- base::grepl [13:31:09.992] restarts <- computeRestarts(cond) [13:31:09.992] for (restart in restarts) { [13:31:09.992] name <- restart$name [13:31:09.992] if (is.null(name)) [13:31:09.992] next [13:31:09.992] if (!grepl(pattern, name)) [13:31:09.992] next [13:31:09.992] invokeRestart(restart) [13:31:09.992] muffled <- TRUE [13:31:09.992] break [13:31:09.992] } [13:31:09.992] } [13:31:09.992] } [13:31:09.992] invisible(muffled) [13:31:09.992] } [13:31:09.992] muffleCondition(cond, pattern = "^muffle") [13:31:09.992] } [13:31:09.992] } [13:31:09.992] } [13:31:09.992] })) [13:31:09.992] }, error = function(ex) { [13:31:09.992] base::structure(base::list(value = NULL, visible = NULL, [13:31:09.992] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:31:09.992] ...future.rng), started = ...future.startTime, [13:31:09.992] finished = Sys.time(), session_uuid = NA_character_, [13:31:09.992] version = "1.8"), class = "FutureResult") [13:31:09.992] }, finally = { [13:31:09.992] if (!identical(...future.workdir, getwd())) [13:31:09.992] setwd(...future.workdir) [13:31:09.992] { [13:31:09.992] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:31:09.992] ...future.oldOptions$nwarnings <- NULL [13:31:09.992] } [13:31:09.992] base::options(...future.oldOptions) [13:31:09.992] if (.Platform$OS.type == "windows") { [13:31:09.992] old_names <- names(...future.oldEnvVars) [13:31:09.992] envs <- base::Sys.getenv() [13:31:09.992] names <- names(envs) [13:31:09.992] common <- intersect(names, old_names) [13:31:09.992] added <- setdiff(names, old_names) [13:31:09.992] removed <- setdiff(old_names, names) [13:31:09.992] changed <- common[...future.oldEnvVars[common] != [13:31:09.992] envs[common]] [13:31:09.992] NAMES <- toupper(changed) [13:31:09.992] args <- list() [13:31:09.992] for (kk in seq_along(NAMES)) { [13:31:09.992] name <- changed[[kk]] [13:31:09.992] NAME <- NAMES[[kk]] [13:31:09.992] if (name != NAME && is.element(NAME, old_names)) [13:31:09.992] next [13:31:09.992] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.992] } [13:31:09.992] NAMES <- toupper(added) [13:31:09.992] for (kk in seq_along(NAMES)) { [13:31:09.992] name <- added[[kk]] [13:31:09.992] NAME <- NAMES[[kk]] [13:31:09.992] if (name != NAME && is.element(NAME, old_names)) [13:31:09.992] next [13:31:09.992] args[[name]] <- "" [13:31:09.992] } [13:31:09.992] NAMES <- toupper(removed) [13:31:09.992] for (kk in seq_along(NAMES)) { [13:31:09.992] name <- removed[[kk]] [13:31:09.992] NAME <- NAMES[[kk]] [13:31:09.992] if (name != NAME && is.element(NAME, old_names)) [13:31:09.992] next [13:31:09.992] args[[name]] <- ...future.oldEnvVars[[name]] [13:31:09.992] } [13:31:09.992] if (length(args) > 0) [13:31:09.992] base::do.call(base::Sys.setenv, args = args) [13:31:09.992] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:31:09.992] } [13:31:09.992] else { [13:31:09.992] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:31:09.992] } [13:31:09.992] { [13:31:09.992] if (base::length(...future.futureOptionsAdded) > [13:31:09.992] 0L) { [13:31:09.992] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:31:09.992] base::names(opts) <- ...future.futureOptionsAdded [13:31:09.992] base::options(opts) [13:31:09.992] } [13:31:09.992] { [13:31:09.992] NULL [13:31:09.992] options(future.plan = NULL) [13:31:09.992] if (is.na(NA_character_)) [13:31:09.992] Sys.unsetenv("R_FUTURE_PLAN") [13:31:09.992] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:31:09.992] future::plan(...future.strategy.old, .cleanup = FALSE, [13:31:09.992] .init = FALSE) [13:31:09.992] } [13:31:09.992] } [13:31:09.992] } [13:31:09.992] }) [13:31:09.992] if (TRUE) { [13:31:09.992] base::sink(type = "output", split = FALSE) [13:31:09.992] if (TRUE) { [13:31:09.992] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:31:09.992] } [13:31:09.992] else { [13:31:09.992] ...future.result["stdout"] <- base::list(NULL) [13:31:09.992] } [13:31:09.992] base::close(...future.stdout) [13:31:09.992] ...future.stdout <- NULL [13:31:09.992] } [13:31:09.992] ...future.result$conditions <- ...future.conditions [13:31:09.992] ...future.result$finished <- base::Sys.time() [13:31:09.992] ...future.result [13:31:09.992] } [13:31:09.996] - Launch lazy future ... done [13:31:09.996] 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.62 0.04 1.15