R version 4.4.0 beta (2024-04-15 r86425 ucrt) -- "Puppy Cup" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > source("incl/start.R") Loading required package: future [13:11:03.863] plan(): Setting new future strategy stack: [13:11:03.864] List of future strategies: [13:11:03.864] 1. mirai_multisession: [13:11:03.864] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:11:03.864] - tweaked: FALSE [13:11:03.864] - call: future::plan(future.mirai::mirai_multisession) [13:11:03.876] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:11:03.876] < mirai | $data > [13:11:03.881] getGlobalsAndPackages() ... [13:11:03.881] Not searching for globals [13:11:03.882] - globals: [0] [13:11:03.882] getGlobalsAndPackages() ... DONE [13:11:03.882] getGlobalsAndPackages() ... [13:11:03.882] [13:11:03.883] - globals: [0] [13:11:03.883] getGlobalsAndPackages() ... DONE [13:11:04.160] Packages needed by the future expression (n = 0): [13:11:04.160] Packages needed by future strategies (n = 0): [13:11:04.161] { [13:11:04.161] { [13:11:04.161] { [13:11:04.161] ...future.startTime <- base::Sys.time() [13:11:04.161] { [13:11:04.161] { [13:11:04.161] { [13:11:04.161] base::local({ [13:11:04.161] has_future <- base::requireNamespace("future", [13:11:04.161] quietly = TRUE) [13:11:04.161] if (has_future) { [13:11:04.161] ns <- base::getNamespace("future") [13:11:04.161] version <- ns[[".package"]][["version"]] [13:11:04.161] if (is.null(version)) [13:11:04.161] version <- utils::packageVersion("future") [13:11:04.161] } [13:11:04.161] else { [13:11:04.161] version <- NULL [13:11:04.161] } [13:11:04.161] if (!has_future || version < "1.8.0") { [13:11:04.161] info <- base::c(r_version = base::gsub("R version ", [13:11:04.161] "", base::R.version$version.string), [13:11:04.161] platform = base::sprintf("%s (%s-bit)", [13:11:04.161] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:04.161] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:04.161] "release", "version")], collapse = " "), [13:11:04.161] hostname = base::Sys.info()[["nodename"]]) [13:11:04.161] info <- base::sprintf("%s: %s", base::names(info), [13:11:04.161] info) [13:11:04.161] info <- base::paste(info, collapse = "; ") [13:11:04.161] if (!has_future) { [13:11:04.161] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:04.161] info) [13:11:04.161] } [13:11:04.161] else { [13:11:04.161] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:04.161] info, version) [13:11:04.161] } [13:11:04.161] base::stop(msg) [13:11:04.161] } [13:11:04.161] }) [13:11:04.161] } [13:11:04.161] ...future.strategy.old <- future::plan("list") [13:11:04.161] options(future.plan = NULL) [13:11:04.161] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.161] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:04.161] } [13:11:04.161] ...future.workdir <- getwd() [13:11:04.161] } [13:11:04.161] ...future.oldOptions <- base::as.list(base::.Options) [13:11:04.161] ...future.oldEnvVars <- base::Sys.getenv() [13:11:04.161] } [13:11:04.161] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:04.161] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:04.161] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:04.161] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:04.161] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:04.161] future.stdout.windows.reencode = NULL, width = 80L) [13:11:04.161] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:04.161] base::names(...future.oldOptions)) [13:11:04.161] } [13:11:04.161] if (FALSE) { [13:11:04.161] } [13:11:04.161] else { [13:11:04.161] if (TRUE) { [13:11:04.161] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:04.161] open = "w") [13:11:04.161] } [13:11:04.161] else { [13:11:04.161] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:04.161] windows = "NUL", "/dev/null"), open = "w") [13:11:04.161] } [13:11:04.161] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:04.161] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:04.161] base::sink(type = "output", split = FALSE) [13:11:04.161] base::close(...future.stdout) [13:11:04.161] }, add = TRUE) [13:11:04.161] } [13:11:04.161] ...future.frame <- base::sys.nframe() [13:11:04.161] ...future.conditions <- base::list() [13:11:04.161] ...future.rng <- base::globalenv()$.Random.seed [13:11:04.161] if (FALSE) { [13:11:04.161] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:04.161] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:04.161] } [13:11:04.161] ...future.result <- base::tryCatch({ [13:11:04.161] base::withCallingHandlers({ [13:11:04.161] ...future.value <- base::withVisible(base::local(NA)) [13:11:04.161] future::FutureResult(value = ...future.value$value, [13:11:04.161] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.161] ...future.rng), globalenv = if (FALSE) [13:11:04.161] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:04.161] ...future.globalenv.names)) [13:11:04.161] else NULL, started = ...future.startTime, version = "1.8") [13:11:04.161] }, condition = base::local({ [13:11:04.161] c <- base::c [13:11:04.161] inherits <- base::inherits [13:11:04.161] invokeRestart <- base::invokeRestart [13:11:04.161] length <- base::length [13:11:04.161] list <- base::list [13:11:04.161] seq.int <- base::seq.int [13:11:04.161] signalCondition <- base::signalCondition [13:11:04.161] sys.calls <- base::sys.calls [13:11:04.161] `[[` <- base::`[[` [13:11:04.161] `+` <- base::`+` [13:11:04.161] `<<-` <- base::`<<-` [13:11:04.161] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:04.161] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:04.161] 3L)] [13:11:04.161] } [13:11:04.161] function(cond) { [13:11:04.161] is_error <- inherits(cond, "error") [13:11:04.161] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:04.161] NULL) [13:11:04.161] if (is_error) { [13:11:04.161] sessionInformation <- function() { [13:11:04.161] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:04.161] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:04.161] search = base::search(), system = base::Sys.info()) [13:11:04.161] } [13:11:04.161] ...future.conditions[[length(...future.conditions) + [13:11:04.161] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:04.161] cond$call), session = sessionInformation(), [13:11:04.161] timestamp = base::Sys.time(), signaled = 0L) [13:11:04.161] signalCondition(cond) [13:11:04.161] } [13:11:04.161] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:04.161] signal <- FALSE && inherits(cond, character(0)) [13:11:04.161] ...future.conditions[[length(...future.conditions) + [13:11:04.161] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:04.161] if (FALSE && !signal) { [13:11:04.161] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.161] { [13:11:04.161] inherits <- base::inherits [13:11:04.161] invokeRestart <- base::invokeRestart [13:11:04.161] is.null <- base::is.null [13:11:04.161] muffled <- FALSE [13:11:04.161] if (inherits(cond, "message")) { [13:11:04.161] muffled <- grepl(pattern, "muffleMessage") [13:11:04.161] if (muffled) [13:11:04.161] invokeRestart("muffleMessage") [13:11:04.161] } [13:11:04.161] else if (inherits(cond, "warning")) { [13:11:04.161] muffled <- grepl(pattern, "muffleWarning") [13:11:04.161] if (muffled) [13:11:04.161] invokeRestart("muffleWarning") [13:11:04.161] } [13:11:04.161] else if (inherits(cond, "condition")) { [13:11:04.161] if (!is.null(pattern)) { [13:11:04.161] computeRestarts <- base::computeRestarts [13:11:04.161] grepl <- base::grepl [13:11:04.161] restarts <- computeRestarts(cond) [13:11:04.161] for (restart in restarts) { [13:11:04.161] name <- restart$name [13:11:04.161] if (is.null(name)) [13:11:04.161] next [13:11:04.161] if (!grepl(pattern, name)) [13:11:04.161] next [13:11:04.161] invokeRestart(restart) [13:11:04.161] muffled <- TRUE [13:11:04.161] break [13:11:04.161] } [13:11:04.161] } [13:11:04.161] } [13:11:04.161] invisible(muffled) [13:11:04.161] } [13:11:04.161] muffleCondition(cond, pattern = "^muffle") [13:11:04.161] } [13:11:04.161] } [13:11:04.161] else { [13:11:04.161] if (TRUE) { [13:11:04.161] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.161] { [13:11:04.161] inherits <- base::inherits [13:11:04.161] invokeRestart <- base::invokeRestart [13:11:04.161] is.null <- base::is.null [13:11:04.161] muffled <- FALSE [13:11:04.161] if (inherits(cond, "message")) { [13:11:04.161] muffled <- grepl(pattern, "muffleMessage") [13:11:04.161] if (muffled) [13:11:04.161] invokeRestart("muffleMessage") [13:11:04.161] } [13:11:04.161] else if (inherits(cond, "warning")) { [13:11:04.161] muffled <- grepl(pattern, "muffleWarning") [13:11:04.161] if (muffled) [13:11:04.161] invokeRestart("muffleWarning") [13:11:04.161] } [13:11:04.161] else if (inherits(cond, "condition")) { [13:11:04.161] if (!is.null(pattern)) { [13:11:04.161] computeRestarts <- base::computeRestarts [13:11:04.161] grepl <- base::grepl [13:11:04.161] restarts <- computeRestarts(cond) [13:11:04.161] for (restart in restarts) { [13:11:04.161] name <- restart$name [13:11:04.161] if (is.null(name)) [13:11:04.161] next [13:11:04.161] if (!grepl(pattern, name)) [13:11:04.161] next [13:11:04.161] invokeRestart(restart) [13:11:04.161] muffled <- TRUE [13:11:04.161] break [13:11:04.161] } [13:11:04.161] } [13:11:04.161] } [13:11:04.161] invisible(muffled) [13:11:04.161] } [13:11:04.161] muffleCondition(cond, pattern = "^muffle") [13:11:04.161] } [13:11:04.161] } [13:11:04.161] } [13:11:04.161] })) [13:11:04.161] }, error = function(ex) { [13:11:04.161] base::structure(base::list(value = NULL, visible = NULL, [13:11:04.161] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.161] ...future.rng), started = ...future.startTime, [13:11:04.161] finished = Sys.time(), session_uuid = NA_character_, [13:11:04.161] version = "1.8"), class = "FutureResult") [13:11:04.161] }, finally = { [13:11:04.161] if (!identical(...future.workdir, getwd())) [13:11:04.161] setwd(...future.workdir) [13:11:04.161] { [13:11:04.161] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:04.161] ...future.oldOptions$nwarnings <- NULL [13:11:04.161] } [13:11:04.161] base::options(...future.oldOptions) [13:11:04.161] if (.Platform$OS.type == "windows") { [13:11:04.161] old_names <- names(...future.oldEnvVars) [13:11:04.161] envs <- base::Sys.getenv() [13:11:04.161] names <- names(envs) [13:11:04.161] common <- intersect(names, old_names) [13:11:04.161] added <- setdiff(names, old_names) [13:11:04.161] removed <- setdiff(old_names, names) [13:11:04.161] changed <- common[...future.oldEnvVars[common] != [13:11:04.161] envs[common]] [13:11:04.161] NAMES <- toupper(changed) [13:11:04.161] args <- list() [13:11:04.161] for (kk in seq_along(NAMES)) { [13:11:04.161] name <- changed[[kk]] [13:11:04.161] NAME <- NAMES[[kk]] [13:11:04.161] if (name != NAME && is.element(NAME, old_names)) [13:11:04.161] next [13:11:04.161] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.161] } [13:11:04.161] NAMES <- toupper(added) [13:11:04.161] for (kk in seq_along(NAMES)) { [13:11:04.161] name <- added[[kk]] [13:11:04.161] NAME <- NAMES[[kk]] [13:11:04.161] if (name != NAME && is.element(NAME, old_names)) [13:11:04.161] next [13:11:04.161] args[[name]] <- "" [13:11:04.161] } [13:11:04.161] NAMES <- toupper(removed) [13:11:04.161] for (kk in seq_along(NAMES)) { [13:11:04.161] name <- removed[[kk]] [13:11:04.161] NAME <- NAMES[[kk]] [13:11:04.161] if (name != NAME && is.element(NAME, old_names)) [13:11:04.161] next [13:11:04.161] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.161] } [13:11:04.161] if (length(args) > 0) [13:11:04.161] base::do.call(base::Sys.setenv, args = args) [13:11:04.161] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:04.161] } [13:11:04.161] else { [13:11:04.161] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:04.161] } [13:11:04.161] { [13:11:04.161] if (base::length(...future.futureOptionsAdded) > [13:11:04.161] 0L) { [13:11:04.161] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:04.161] base::names(opts) <- ...future.futureOptionsAdded [13:11:04.161] base::options(opts) [13:11:04.161] } [13:11:04.161] { [13:11:04.161] NULL [13:11:04.161] options(future.plan = NULL) [13:11:04.161] if (is.na(NA_character_)) [13:11:04.161] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.161] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:04.161] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:04.161] .init = FALSE) [13:11:04.161] } [13:11:04.161] } [13:11:04.161] } [13:11:04.161] }) [13:11:04.161] if (TRUE) { [13:11:04.161] base::sink(type = "output", split = FALSE) [13:11:04.161] if (TRUE) { [13:11:04.161] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:04.161] } [13:11:04.161] else { [13:11:04.161] ...future.result["stdout"] <- base::list(NULL) [13:11:04.161] } [13:11:04.161] base::close(...future.stdout) [13:11:04.161] ...future.stdout <- NULL [13:11:04.161] } [13:11:04.161] ...future.result$conditions <- ...future.conditions [13:11:04.161] ...future.result$finished <- base::Sys.time() [13:11:04.161] ...future.result [13:11:04.161] } [13:11:04.261] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:11:04.262] plan(): nbrOfWorkers() = 2 > > library("datasets") ## cars data set > library("stats") ## lm(), poly(), xtabs() > > plan(mirai_multisession) [13:11:04.263] plan(): Setting new future strategy stack: [13:11:04.263] List of future strategies: [13:11:04.263] 1. mirai_multisession: [13:11:04.263] - args: function (expr, substitute = TRUE, envir = parent.frame(), ..., workers = availableCores()) [13:11:04.263] - tweaked: FALSE [13:11:04.263] - call: plan(mirai_multisession) [13:11:04.276] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... [13:11:04.277] < mirai | $data > [13:11:04.279] getGlobalsAndPackages() ... [13:11:04.279] Not searching for globals [13:11:04.279] - globals: [0] [13:11:04.279] getGlobalsAndPackages() ... DONE [13:11:04.280] getGlobalsAndPackages() ... [13:11:04.280] [13:11:04.280] - globals: [0] [13:11:04.280] getGlobalsAndPackages() ... DONE [13:11:04.281] Packages needed by the future expression (n = 0): [13:11:04.281] Packages needed by future strategies (n = 0): [13:11:04.281] { [13:11:04.281] { [13:11:04.281] { [13:11:04.281] ...future.startTime <- base::Sys.time() [13:11:04.281] { [13:11:04.281] { [13:11:04.281] { [13:11:04.281] base::local({ [13:11:04.281] has_future <- base::requireNamespace("future", [13:11:04.281] quietly = TRUE) [13:11:04.281] if (has_future) { [13:11:04.281] ns <- base::getNamespace("future") [13:11:04.281] version <- ns[[".package"]][["version"]] [13:11:04.281] if (is.null(version)) [13:11:04.281] version <- utils::packageVersion("future") [13:11:04.281] } [13:11:04.281] else { [13:11:04.281] version <- NULL [13:11:04.281] } [13:11:04.281] if (!has_future || version < "1.8.0") { [13:11:04.281] info <- base::c(r_version = base::gsub("R version ", [13:11:04.281] "", base::R.version$version.string), [13:11:04.281] platform = base::sprintf("%s (%s-bit)", [13:11:04.281] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:04.281] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:04.281] "release", "version")], collapse = " "), [13:11:04.281] hostname = base::Sys.info()[["nodename"]]) [13:11:04.281] info <- base::sprintf("%s: %s", base::names(info), [13:11:04.281] info) [13:11:04.281] info <- base::paste(info, collapse = "; ") [13:11:04.281] if (!has_future) { [13:11:04.281] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:04.281] info) [13:11:04.281] } [13:11:04.281] else { [13:11:04.281] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:04.281] info, version) [13:11:04.281] } [13:11:04.281] base::stop(msg) [13:11:04.281] } [13:11:04.281] }) [13:11:04.281] } [13:11:04.281] ...future.strategy.old <- future::plan("list") [13:11:04.281] options(future.plan = NULL) [13:11:04.281] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.281] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:04.281] } [13:11:04.281] ...future.workdir <- getwd() [13:11:04.281] } [13:11:04.281] ...future.oldOptions <- base::as.list(base::.Options) [13:11:04.281] ...future.oldEnvVars <- base::Sys.getenv() [13:11:04.281] } [13:11:04.281] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:04.281] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:04.281] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:04.281] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:04.281] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:04.281] future.stdout.windows.reencode = NULL, width = 80L) [13:11:04.281] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:04.281] base::names(...future.oldOptions)) [13:11:04.281] } [13:11:04.281] if (FALSE) { [13:11:04.281] } [13:11:04.281] else { [13:11:04.281] if (TRUE) { [13:11:04.281] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:04.281] open = "w") [13:11:04.281] } [13:11:04.281] else { [13:11:04.281] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:04.281] windows = "NUL", "/dev/null"), open = "w") [13:11:04.281] } [13:11:04.281] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:04.281] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:04.281] base::sink(type = "output", split = FALSE) [13:11:04.281] base::close(...future.stdout) [13:11:04.281] }, add = TRUE) [13:11:04.281] } [13:11:04.281] ...future.frame <- base::sys.nframe() [13:11:04.281] ...future.conditions <- base::list() [13:11:04.281] ...future.rng <- base::globalenv()$.Random.seed [13:11:04.281] if (FALSE) { [13:11:04.281] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:04.281] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:04.281] } [13:11:04.281] ...future.result <- base::tryCatch({ [13:11:04.281] base::withCallingHandlers({ [13:11:04.281] ...future.value <- base::withVisible(base::local(NA)) [13:11:04.281] future::FutureResult(value = ...future.value$value, [13:11:04.281] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.281] ...future.rng), globalenv = if (FALSE) [13:11:04.281] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:04.281] ...future.globalenv.names)) [13:11:04.281] else NULL, started = ...future.startTime, version = "1.8") [13:11:04.281] }, condition = base::local({ [13:11:04.281] c <- base::c [13:11:04.281] inherits <- base::inherits [13:11:04.281] invokeRestart <- base::invokeRestart [13:11:04.281] length <- base::length [13:11:04.281] list <- base::list [13:11:04.281] seq.int <- base::seq.int [13:11:04.281] signalCondition <- base::signalCondition [13:11:04.281] sys.calls <- base::sys.calls [13:11:04.281] `[[` <- base::`[[` [13:11:04.281] `+` <- base::`+` [13:11:04.281] `<<-` <- base::`<<-` [13:11:04.281] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:04.281] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:04.281] 3L)] [13:11:04.281] } [13:11:04.281] function(cond) { [13:11:04.281] is_error <- inherits(cond, "error") [13:11:04.281] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:04.281] NULL) [13:11:04.281] if (is_error) { [13:11:04.281] sessionInformation <- function() { [13:11:04.281] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:04.281] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:04.281] search = base::search(), system = base::Sys.info()) [13:11:04.281] } [13:11:04.281] ...future.conditions[[length(...future.conditions) + [13:11:04.281] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:04.281] cond$call), session = sessionInformation(), [13:11:04.281] timestamp = base::Sys.time(), signaled = 0L) [13:11:04.281] signalCondition(cond) [13:11:04.281] } [13:11:04.281] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:04.281] signal <- FALSE && inherits(cond, character(0)) [13:11:04.281] ...future.conditions[[length(...future.conditions) + [13:11:04.281] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:04.281] if (FALSE && !signal) { [13:11:04.281] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.281] { [13:11:04.281] inherits <- base::inherits [13:11:04.281] invokeRestart <- base::invokeRestart [13:11:04.281] is.null <- base::is.null [13:11:04.281] muffled <- FALSE [13:11:04.281] if (inherits(cond, "message")) { [13:11:04.281] muffled <- grepl(pattern, "muffleMessage") [13:11:04.281] if (muffled) [13:11:04.281] invokeRestart("muffleMessage") [13:11:04.281] } [13:11:04.281] else if (inherits(cond, "warning")) { [13:11:04.281] muffled <- grepl(pattern, "muffleWarning") [13:11:04.281] if (muffled) [13:11:04.281] invokeRestart("muffleWarning") [13:11:04.281] } [13:11:04.281] else if (inherits(cond, "condition")) { [13:11:04.281] if (!is.null(pattern)) { [13:11:04.281] computeRestarts <- base::computeRestarts [13:11:04.281] grepl <- base::grepl [13:11:04.281] restarts <- computeRestarts(cond) [13:11:04.281] for (restart in restarts) { [13:11:04.281] name <- restart$name [13:11:04.281] if (is.null(name)) [13:11:04.281] next [13:11:04.281] if (!grepl(pattern, name)) [13:11:04.281] next [13:11:04.281] invokeRestart(restart) [13:11:04.281] muffled <- TRUE [13:11:04.281] break [13:11:04.281] } [13:11:04.281] } [13:11:04.281] } [13:11:04.281] invisible(muffled) [13:11:04.281] } [13:11:04.281] muffleCondition(cond, pattern = "^muffle") [13:11:04.281] } [13:11:04.281] } [13:11:04.281] else { [13:11:04.281] if (TRUE) { [13:11:04.281] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.281] { [13:11:04.281] inherits <- base::inherits [13:11:04.281] invokeRestart <- base::invokeRestart [13:11:04.281] is.null <- base::is.null [13:11:04.281] muffled <- FALSE [13:11:04.281] if (inherits(cond, "message")) { [13:11:04.281] muffled <- grepl(pattern, "muffleMessage") [13:11:04.281] if (muffled) [13:11:04.281] invokeRestart("muffleMessage") [13:11:04.281] } [13:11:04.281] else if (inherits(cond, "warning")) { [13:11:04.281] muffled <- grepl(pattern, "muffleWarning") [13:11:04.281] if (muffled) [13:11:04.281] invokeRestart("muffleWarning") [13:11:04.281] } [13:11:04.281] else if (inherits(cond, "condition")) { [13:11:04.281] if (!is.null(pattern)) { [13:11:04.281] computeRestarts <- base::computeRestarts [13:11:04.281] grepl <- base::grepl [13:11:04.281] restarts <- computeRestarts(cond) [13:11:04.281] for (restart in restarts) { [13:11:04.281] name <- restart$name [13:11:04.281] if (is.null(name)) [13:11:04.281] next [13:11:04.281] if (!grepl(pattern, name)) [13:11:04.281] next [13:11:04.281] invokeRestart(restart) [13:11:04.281] muffled <- TRUE [13:11:04.281] break [13:11:04.281] } [13:11:04.281] } [13:11:04.281] } [13:11:04.281] invisible(muffled) [13:11:04.281] } [13:11:04.281] muffleCondition(cond, pattern = "^muffle") [13:11:04.281] } [13:11:04.281] } [13:11:04.281] } [13:11:04.281] })) [13:11:04.281] }, error = function(ex) { [13:11:04.281] base::structure(base::list(value = NULL, visible = NULL, [13:11:04.281] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.281] ...future.rng), started = ...future.startTime, [13:11:04.281] finished = Sys.time(), session_uuid = NA_character_, [13:11:04.281] version = "1.8"), class = "FutureResult") [13:11:04.281] }, finally = { [13:11:04.281] if (!identical(...future.workdir, getwd())) [13:11:04.281] setwd(...future.workdir) [13:11:04.281] { [13:11:04.281] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:04.281] ...future.oldOptions$nwarnings <- NULL [13:11:04.281] } [13:11:04.281] base::options(...future.oldOptions) [13:11:04.281] if (.Platform$OS.type == "windows") { [13:11:04.281] old_names <- names(...future.oldEnvVars) [13:11:04.281] envs <- base::Sys.getenv() [13:11:04.281] names <- names(envs) [13:11:04.281] common <- intersect(names, old_names) [13:11:04.281] added <- setdiff(names, old_names) [13:11:04.281] removed <- setdiff(old_names, names) [13:11:04.281] changed <- common[...future.oldEnvVars[common] != [13:11:04.281] envs[common]] [13:11:04.281] NAMES <- toupper(changed) [13:11:04.281] args <- list() [13:11:04.281] for (kk in seq_along(NAMES)) { [13:11:04.281] name <- changed[[kk]] [13:11:04.281] NAME <- NAMES[[kk]] [13:11:04.281] if (name != NAME && is.element(NAME, old_names)) [13:11:04.281] next [13:11:04.281] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.281] } [13:11:04.281] NAMES <- toupper(added) [13:11:04.281] for (kk in seq_along(NAMES)) { [13:11:04.281] name <- added[[kk]] [13:11:04.281] NAME <- NAMES[[kk]] [13:11:04.281] if (name != NAME && is.element(NAME, old_names)) [13:11:04.281] next [13:11:04.281] args[[name]] <- "" [13:11:04.281] } [13:11:04.281] NAMES <- toupper(removed) [13:11:04.281] for (kk in seq_along(NAMES)) { [13:11:04.281] name <- removed[[kk]] [13:11:04.281] NAME <- NAMES[[kk]] [13:11:04.281] if (name != NAME && is.element(NAME, old_names)) [13:11:04.281] next [13:11:04.281] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.281] } [13:11:04.281] if (length(args) > 0) [13:11:04.281] base::do.call(base::Sys.setenv, args = args) [13:11:04.281] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:04.281] } [13:11:04.281] else { [13:11:04.281] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:04.281] } [13:11:04.281] { [13:11:04.281] if (base::length(...future.futureOptionsAdded) > [13:11:04.281] 0L) { [13:11:04.281] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:04.281] base::names(opts) <- ...future.futureOptionsAdded [13:11:04.281] base::options(opts) [13:11:04.281] } [13:11:04.281] { [13:11:04.281] NULL [13:11:04.281] options(future.plan = NULL) [13:11:04.281] if (is.na(NA_character_)) [13:11:04.281] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.281] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:04.281] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:04.281] .init = FALSE) [13:11:04.281] } [13:11:04.281] } [13:11:04.281] } [13:11:04.281] }) [13:11:04.281] if (TRUE) { [13:11:04.281] base::sink(type = "output", split = FALSE) [13:11:04.281] if (TRUE) { [13:11:04.281] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:04.281] } [13:11:04.281] else { [13:11:04.281] ...future.result["stdout"] <- base::list(NULL) [13:11:04.281] } [13:11:04.281] base::close(...future.stdout) [13:11:04.281] ...future.stdout <- NULL [13:11:04.281] } [13:11:04.281] ...future.result$conditions <- ...future.conditions [13:11:04.281] ...future.result$finished <- base::Sys.time() [13:11:04.281] ...future.result [13:11:04.281] } [13:11:04.382] plan(): plan_init() of 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' ... DONE [13:11:04.382] 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:11:04.387] getGlobalsAndPackages() ... [13:11:04.388] Searching for globals... [13:11:04.398] - globals found: [6] '{', 'lm', 'weight', '-', 'group', '~' [13:11:04.398] Searching for globals ... DONE [13:11:04.399] Resolving globals: FALSE [13:11:04.400] The total size of the 2 globals is 896 bytes (896 bytes) [13:11:04.401] 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:11:04.401] - globals: [2] 'weight', 'group' [13:11:04.401] - packages: [1] 'stats' [13:11:04.401] getGlobalsAndPackages() ... DONE [13:11:04.402] run() for 'Future' ... [13:11:04.402] - state: 'created' [13:11:04.402] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:04.405] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:04.405] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:04.405] - Field: 'label' [13:11:04.405] - Field: 'local' [13:11:04.405] - Field: 'owner' [13:11:04.406] - Field: 'envir' [13:11:04.406] - Field: 'packages' [13:11:04.406] - Field: 'gc' [13:11:04.406] - Field: 'conditions' [13:11:04.406] - Field: 'expr' [13:11:04.407] - Field: 'uuid' [13:11:04.407] - Field: 'seed' [13:11:04.407] - Field: 'version' [13:11:04.407] - Field: 'result' [13:11:04.407] - Field: 'asynchronous' [13:11:04.407] - Field: 'calls' [13:11:04.408] - Field: 'globals' [13:11:04.408] - Field: 'stdout' [13:11:04.408] - Field: 'earlySignal' [13:11:04.408] - Field: 'lazy' [13:11:04.408] - Field: 'state' [13:11:04.408] - Field: '.cluster' [13:11:04.409] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:04.409] - Launch lazy future ... [13:11:04.409] Packages needed by the future expression (n = 1): 'stats' [13:11:04.409] Packages needed by future strategies (n = 0): [13:11:04.410] { [13:11:04.410] { [13:11:04.410] { [13:11:04.410] ...future.startTime <- base::Sys.time() [13:11:04.410] { [13:11:04.410] { [13:11:04.410] { [13:11:04.410] { [13:11:04.410] base::local({ [13:11:04.410] has_future <- base::requireNamespace("future", [13:11:04.410] quietly = TRUE) [13:11:04.410] if (has_future) { [13:11:04.410] ns <- base::getNamespace("future") [13:11:04.410] version <- ns[[".package"]][["version"]] [13:11:04.410] if (is.null(version)) [13:11:04.410] version <- utils::packageVersion("future") [13:11:04.410] } [13:11:04.410] else { [13:11:04.410] version <- NULL [13:11:04.410] } [13:11:04.410] if (!has_future || version < "1.8.0") { [13:11:04.410] info <- base::c(r_version = base::gsub("R version ", [13:11:04.410] "", base::R.version$version.string), [13:11:04.410] platform = base::sprintf("%s (%s-bit)", [13:11:04.410] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:04.410] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:04.410] "release", "version")], collapse = " "), [13:11:04.410] hostname = base::Sys.info()[["nodename"]]) [13:11:04.410] info <- base::sprintf("%s: %s", base::names(info), [13:11:04.410] info) [13:11:04.410] info <- base::paste(info, collapse = "; ") [13:11:04.410] if (!has_future) { [13:11:04.410] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:04.410] info) [13:11:04.410] } [13:11:04.410] else { [13:11:04.410] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:04.410] info, version) [13:11:04.410] } [13:11:04.410] base::stop(msg) [13:11:04.410] } [13:11:04.410] }) [13:11:04.410] } [13:11:04.410] base::local({ [13:11:04.410] for (pkg in "stats") { [13:11:04.410] base::loadNamespace(pkg) [13:11:04.410] base::library(pkg, character.only = TRUE) [13:11:04.410] } [13:11:04.410] }) [13:11:04.410] } [13:11:04.410] ...future.strategy.old <- future::plan("list") [13:11:04.410] options(future.plan = NULL) [13:11:04.410] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.410] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:04.410] } [13:11:04.410] ...future.workdir <- getwd() [13:11:04.410] } [13:11:04.410] ...future.oldOptions <- base::as.list(base::.Options) [13:11:04.410] ...future.oldEnvVars <- base::Sys.getenv() [13:11:04.410] } [13:11:04.410] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:04.410] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:04.410] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:04.410] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:04.410] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:04.410] future.stdout.windows.reencode = NULL, width = 80L) [13:11:04.410] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:04.410] base::names(...future.oldOptions)) [13:11:04.410] } [13:11:04.410] if (FALSE) { [13:11:04.410] } [13:11:04.410] else { [13:11:04.410] if (TRUE) { [13:11:04.410] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:04.410] open = "w") [13:11:04.410] } [13:11:04.410] else { [13:11:04.410] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:04.410] windows = "NUL", "/dev/null"), open = "w") [13:11:04.410] } [13:11:04.410] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:04.410] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:04.410] base::sink(type = "output", split = FALSE) [13:11:04.410] base::close(...future.stdout) [13:11:04.410] }, add = TRUE) [13:11:04.410] } [13:11:04.410] ...future.frame <- base::sys.nframe() [13:11:04.410] ...future.conditions <- base::list() [13:11:04.410] ...future.rng <- base::globalenv()$.Random.seed [13:11:04.410] if (FALSE) { [13:11:04.410] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:04.410] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:04.410] } [13:11:04.410] ...future.result <- base::tryCatch({ [13:11:04.410] base::withCallingHandlers({ [13:11:04.410] ...future.value <- base::withVisible(base::local({ [13:11:04.410] lm(weight ~ group - 1) [13:11:04.410] })) [13:11:04.410] future::FutureResult(value = ...future.value$value, [13:11:04.410] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.410] ...future.rng), globalenv = if (FALSE) [13:11:04.410] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:04.410] ...future.globalenv.names)) [13:11:04.410] else NULL, started = ...future.startTime, version = "1.8") [13:11:04.410] }, condition = base::local({ [13:11:04.410] c <- base::c [13:11:04.410] inherits <- base::inherits [13:11:04.410] invokeRestart <- base::invokeRestart [13:11:04.410] length <- base::length [13:11:04.410] list <- base::list [13:11:04.410] seq.int <- base::seq.int [13:11:04.410] signalCondition <- base::signalCondition [13:11:04.410] sys.calls <- base::sys.calls [13:11:04.410] `[[` <- base::`[[` [13:11:04.410] `+` <- base::`+` [13:11:04.410] `<<-` <- base::`<<-` [13:11:04.410] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:04.410] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:04.410] 3L)] [13:11:04.410] } [13:11:04.410] function(cond) { [13:11:04.410] is_error <- inherits(cond, "error") [13:11:04.410] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:04.410] NULL) [13:11:04.410] if (is_error) { [13:11:04.410] sessionInformation <- function() { [13:11:04.410] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:04.410] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:04.410] search = base::search(), system = base::Sys.info()) [13:11:04.410] } [13:11:04.410] ...future.conditions[[length(...future.conditions) + [13:11:04.410] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:04.410] cond$call), session = sessionInformation(), [13:11:04.410] timestamp = base::Sys.time(), signaled = 0L) [13:11:04.410] signalCondition(cond) [13:11:04.410] } [13:11:04.410] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:04.410] signal <- FALSE && inherits(cond, character(0)) [13:11:04.410] ...future.conditions[[length(...future.conditions) + [13:11:04.410] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:04.410] if (FALSE && !signal) { [13:11:04.410] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.410] { [13:11:04.410] inherits <- base::inherits [13:11:04.410] invokeRestart <- base::invokeRestart [13:11:04.410] is.null <- base::is.null [13:11:04.410] muffled <- FALSE [13:11:04.410] if (inherits(cond, "message")) { [13:11:04.410] muffled <- grepl(pattern, "muffleMessage") [13:11:04.410] if (muffled) [13:11:04.410] invokeRestart("muffleMessage") [13:11:04.410] } [13:11:04.410] else if (inherits(cond, "warning")) { [13:11:04.410] muffled <- grepl(pattern, "muffleWarning") [13:11:04.410] if (muffled) [13:11:04.410] invokeRestart("muffleWarning") [13:11:04.410] } [13:11:04.410] else if (inherits(cond, "condition")) { [13:11:04.410] if (!is.null(pattern)) { [13:11:04.410] computeRestarts <- base::computeRestarts [13:11:04.410] grepl <- base::grepl [13:11:04.410] restarts <- computeRestarts(cond) [13:11:04.410] for (restart in restarts) { [13:11:04.410] name <- restart$name [13:11:04.410] if (is.null(name)) [13:11:04.410] next [13:11:04.410] if (!grepl(pattern, name)) [13:11:04.410] next [13:11:04.410] invokeRestart(restart) [13:11:04.410] muffled <- TRUE [13:11:04.410] break [13:11:04.410] } [13:11:04.410] } [13:11:04.410] } [13:11:04.410] invisible(muffled) [13:11:04.410] } [13:11:04.410] muffleCondition(cond, pattern = "^muffle") [13:11:04.410] } [13:11:04.410] } [13:11:04.410] else { [13:11:04.410] if (TRUE) { [13:11:04.410] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.410] { [13:11:04.410] inherits <- base::inherits [13:11:04.410] invokeRestart <- base::invokeRestart [13:11:04.410] is.null <- base::is.null [13:11:04.410] muffled <- FALSE [13:11:04.410] if (inherits(cond, "message")) { [13:11:04.410] muffled <- grepl(pattern, "muffleMessage") [13:11:04.410] if (muffled) [13:11:04.410] invokeRestart("muffleMessage") [13:11:04.410] } [13:11:04.410] else if (inherits(cond, "warning")) { [13:11:04.410] muffled <- grepl(pattern, "muffleWarning") [13:11:04.410] if (muffled) [13:11:04.410] invokeRestart("muffleWarning") [13:11:04.410] } [13:11:04.410] else if (inherits(cond, "condition")) { [13:11:04.410] if (!is.null(pattern)) { [13:11:04.410] computeRestarts <- base::computeRestarts [13:11:04.410] grepl <- base::grepl [13:11:04.410] restarts <- computeRestarts(cond) [13:11:04.410] for (restart in restarts) { [13:11:04.410] name <- restart$name [13:11:04.410] if (is.null(name)) [13:11:04.410] next [13:11:04.410] if (!grepl(pattern, name)) [13:11:04.410] next [13:11:04.410] invokeRestart(restart) [13:11:04.410] muffled <- TRUE [13:11:04.410] break [13:11:04.410] } [13:11:04.410] } [13:11:04.410] } [13:11:04.410] invisible(muffled) [13:11:04.410] } [13:11:04.410] muffleCondition(cond, pattern = "^muffle") [13:11:04.410] } [13:11:04.410] } [13:11:04.410] } [13:11:04.410] })) [13:11:04.410] }, error = function(ex) { [13:11:04.410] base::structure(base::list(value = NULL, visible = NULL, [13:11:04.410] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.410] ...future.rng), started = ...future.startTime, [13:11:04.410] finished = Sys.time(), session_uuid = NA_character_, [13:11:04.410] version = "1.8"), class = "FutureResult") [13:11:04.410] }, finally = { [13:11:04.410] if (!identical(...future.workdir, getwd())) [13:11:04.410] setwd(...future.workdir) [13:11:04.410] { [13:11:04.410] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:04.410] ...future.oldOptions$nwarnings <- NULL [13:11:04.410] } [13:11:04.410] base::options(...future.oldOptions) [13:11:04.410] if (.Platform$OS.type == "windows") { [13:11:04.410] old_names <- names(...future.oldEnvVars) [13:11:04.410] envs <- base::Sys.getenv() [13:11:04.410] names <- names(envs) [13:11:04.410] common <- intersect(names, old_names) [13:11:04.410] added <- setdiff(names, old_names) [13:11:04.410] removed <- setdiff(old_names, names) [13:11:04.410] changed <- common[...future.oldEnvVars[common] != [13:11:04.410] envs[common]] [13:11:04.410] NAMES <- toupper(changed) [13:11:04.410] args <- list() [13:11:04.410] for (kk in seq_along(NAMES)) { [13:11:04.410] name <- changed[[kk]] [13:11:04.410] NAME <- NAMES[[kk]] [13:11:04.410] if (name != NAME && is.element(NAME, old_names)) [13:11:04.410] next [13:11:04.410] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.410] } [13:11:04.410] NAMES <- toupper(added) [13:11:04.410] for (kk in seq_along(NAMES)) { [13:11:04.410] name <- added[[kk]] [13:11:04.410] NAME <- NAMES[[kk]] [13:11:04.410] if (name != NAME && is.element(NAME, old_names)) [13:11:04.410] next [13:11:04.410] args[[name]] <- "" [13:11:04.410] } [13:11:04.410] NAMES <- toupper(removed) [13:11:04.410] for (kk in seq_along(NAMES)) { [13:11:04.410] name <- removed[[kk]] [13:11:04.410] NAME <- NAMES[[kk]] [13:11:04.410] if (name != NAME && is.element(NAME, old_names)) [13:11:04.410] next [13:11:04.410] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.410] } [13:11:04.410] if (length(args) > 0) [13:11:04.410] base::do.call(base::Sys.setenv, args = args) [13:11:04.410] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:04.410] } [13:11:04.410] else { [13:11:04.410] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:04.410] } [13:11:04.410] { [13:11:04.410] if (base::length(...future.futureOptionsAdded) > [13:11:04.410] 0L) { [13:11:04.410] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:04.410] base::names(opts) <- ...future.futureOptionsAdded [13:11:04.410] base::options(opts) [13:11:04.410] } [13:11:04.410] { [13:11:04.410] NULL [13:11:04.410] options(future.plan = NULL) [13:11:04.410] if (is.na(NA_character_)) [13:11:04.410] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.410] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:04.410] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:04.410] .init = FALSE) [13:11:04.410] } [13:11:04.410] } [13:11:04.410] } [13:11:04.410] }) [13:11:04.410] if (TRUE) { [13:11:04.410] base::sink(type = "output", split = FALSE) [13:11:04.410] if (TRUE) { [13:11:04.410] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:04.410] } [13:11:04.410] else { [13:11:04.410] ...future.result["stdout"] <- base::list(NULL) [13:11:04.410] } [13:11:04.410] base::close(...future.stdout) [13:11:04.410] ...future.stdout <- NULL [13:11:04.410] } [13:11:04.410] ...future.result$conditions <- ...future.conditions [13:11:04.410] ...future.result$finished <- base::Sys.time() [13:11:04.410] ...future.result [13:11:04.410] } [13:11:04.414] - Launch lazy future ... done [13:11:04.414] 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:11:04.425] getGlobalsAndPackages() ... [13:11:04.425] Searching for globals... [13:11:04.427] - globals found: [6] '{', 'lm', 'weight', '-', 'group', '~' [13:11:04.427] Searching for globals ... DONE [13:11:04.427] Resolving globals: FALSE [13:11:04.428] The total size of the 2 globals is 896 bytes (896 bytes) [13:11:04.428] 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:11:04.428] - globals: [2] 'weight', 'group' [13:11:04.429] - packages: [1] 'stats' [13:11:04.429] getGlobalsAndPackages() ... DONE [13:11:04.429] run() for 'Future' ... [13:11:04.429] - state: 'created' [13:11:04.430] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:04.432] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:04.432] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:04.432] - Field: 'label' [13:11:04.433] - Field: 'local' [13:11:04.433] - Field: 'owner' [13:11:04.433] - Field: 'envir' [13:11:04.435] - Field: 'packages' [13:11:04.435] - Field: 'gc' [13:11:04.436] - Field: 'conditions' [13:11:04.436] - Field: 'expr' [13:11:04.436] - Field: 'uuid' [13:11:04.436] - Field: 'seed' [13:11:04.436] - Field: 'version' [13:11:04.437] - Field: 'result' [13:11:04.437] - Field: 'asynchronous' [13:11:04.437] - Field: 'calls' [13:11:04.437] - Field: 'globals' [13:11:04.437] - Field: 'stdout' [13:11:04.437] - Field: 'earlySignal' [13:11:04.438] - Field: 'lazy' [13:11:04.438] - Field: 'state' [13:11:04.438] - Field: '.cluster' [13:11:04.438] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:04.438] - Launch lazy future ... [13:11:04.438] Packages needed by the future expression (n = 1): 'stats' [13:11:04.439] Packages needed by future strategies (n = 0): [13:11:04.439] { [13:11:04.439] { [13:11:04.439] { [13:11:04.439] ...future.startTime <- base::Sys.time() [13:11:04.439] { [13:11:04.439] { [13:11:04.439] { [13:11:04.439] { [13:11:04.439] base::local({ [13:11:04.439] has_future <- base::requireNamespace("future", [13:11:04.439] quietly = TRUE) [13:11:04.439] if (has_future) { [13:11:04.439] ns <- base::getNamespace("future") [13:11:04.439] version <- ns[[".package"]][["version"]] [13:11:04.439] if (is.null(version)) [13:11:04.439] version <- utils::packageVersion("future") [13:11:04.439] } [13:11:04.439] else { [13:11:04.439] version <- NULL [13:11:04.439] } [13:11:04.439] if (!has_future || version < "1.8.0") { [13:11:04.439] info <- base::c(r_version = base::gsub("R version ", [13:11:04.439] "", base::R.version$version.string), [13:11:04.439] platform = base::sprintf("%s (%s-bit)", [13:11:04.439] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:04.439] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:04.439] "release", "version")], collapse = " "), [13:11:04.439] hostname = base::Sys.info()[["nodename"]]) [13:11:04.439] info <- base::sprintf("%s: %s", base::names(info), [13:11:04.439] info) [13:11:04.439] info <- base::paste(info, collapse = "; ") [13:11:04.439] if (!has_future) { [13:11:04.439] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:04.439] info) [13:11:04.439] } [13:11:04.439] else { [13:11:04.439] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:04.439] info, version) [13:11:04.439] } [13:11:04.439] base::stop(msg) [13:11:04.439] } [13:11:04.439] }) [13:11:04.439] } [13:11:04.439] base::local({ [13:11:04.439] for (pkg in "stats") { [13:11:04.439] base::loadNamespace(pkg) [13:11:04.439] base::library(pkg, character.only = TRUE) [13:11:04.439] } [13:11:04.439] }) [13:11:04.439] } [13:11:04.439] ...future.strategy.old <- future::plan("list") [13:11:04.439] options(future.plan = NULL) [13:11:04.439] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.439] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:04.439] } [13:11:04.439] ...future.workdir <- getwd() [13:11:04.439] } [13:11:04.439] ...future.oldOptions <- base::as.list(base::.Options) [13:11:04.439] ...future.oldEnvVars <- base::Sys.getenv() [13:11:04.439] } [13:11:04.439] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:04.439] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:04.439] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:04.439] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:04.439] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:04.439] future.stdout.windows.reencode = NULL, width = 80L) [13:11:04.439] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:04.439] base::names(...future.oldOptions)) [13:11:04.439] } [13:11:04.439] if (FALSE) { [13:11:04.439] } [13:11:04.439] else { [13:11:04.439] if (TRUE) { [13:11:04.439] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:04.439] open = "w") [13:11:04.439] } [13:11:04.439] else { [13:11:04.439] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:04.439] windows = "NUL", "/dev/null"), open = "w") [13:11:04.439] } [13:11:04.439] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:04.439] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:04.439] base::sink(type = "output", split = FALSE) [13:11:04.439] base::close(...future.stdout) [13:11:04.439] }, add = TRUE) [13:11:04.439] } [13:11:04.439] ...future.frame <- base::sys.nframe() [13:11:04.439] ...future.conditions <- base::list() [13:11:04.439] ...future.rng <- base::globalenv()$.Random.seed [13:11:04.439] if (FALSE) { [13:11:04.439] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:04.439] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:04.439] } [13:11:04.439] ...future.result <- base::tryCatch({ [13:11:04.439] base::withCallingHandlers({ [13:11:04.439] ...future.value <- base::withVisible(base::local({ [13:11:04.439] lm(weight ~ group - 1) [13:11:04.439] })) [13:11:04.439] future::FutureResult(value = ...future.value$value, [13:11:04.439] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.439] ...future.rng), globalenv = if (FALSE) [13:11:04.439] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:04.439] ...future.globalenv.names)) [13:11:04.439] else NULL, started = ...future.startTime, version = "1.8") [13:11:04.439] }, condition = base::local({ [13:11:04.439] c <- base::c [13:11:04.439] inherits <- base::inherits [13:11:04.439] invokeRestart <- base::invokeRestart [13:11:04.439] length <- base::length [13:11:04.439] list <- base::list [13:11:04.439] seq.int <- base::seq.int [13:11:04.439] signalCondition <- base::signalCondition [13:11:04.439] sys.calls <- base::sys.calls [13:11:04.439] `[[` <- base::`[[` [13:11:04.439] `+` <- base::`+` [13:11:04.439] `<<-` <- base::`<<-` [13:11:04.439] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:04.439] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:04.439] 3L)] [13:11:04.439] } [13:11:04.439] function(cond) { [13:11:04.439] is_error <- inherits(cond, "error") [13:11:04.439] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:04.439] NULL) [13:11:04.439] if (is_error) { [13:11:04.439] sessionInformation <- function() { [13:11:04.439] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:04.439] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:04.439] search = base::search(), system = base::Sys.info()) [13:11:04.439] } [13:11:04.439] ...future.conditions[[length(...future.conditions) + [13:11:04.439] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:04.439] cond$call), session = sessionInformation(), [13:11:04.439] timestamp = base::Sys.time(), signaled = 0L) [13:11:04.439] signalCondition(cond) [13:11:04.439] } [13:11:04.439] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:04.439] signal <- FALSE && inherits(cond, character(0)) [13:11:04.439] ...future.conditions[[length(...future.conditions) + [13:11:04.439] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:04.439] if (FALSE && !signal) { [13:11:04.439] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.439] { [13:11:04.439] inherits <- base::inherits [13:11:04.439] invokeRestart <- base::invokeRestart [13:11:04.439] is.null <- base::is.null [13:11:04.439] muffled <- FALSE [13:11:04.439] if (inherits(cond, "message")) { [13:11:04.439] muffled <- grepl(pattern, "muffleMessage") [13:11:04.439] if (muffled) [13:11:04.439] invokeRestart("muffleMessage") [13:11:04.439] } [13:11:04.439] else if (inherits(cond, "warning")) { [13:11:04.439] muffled <- grepl(pattern, "muffleWarning") [13:11:04.439] if (muffled) [13:11:04.439] invokeRestart("muffleWarning") [13:11:04.439] } [13:11:04.439] else if (inherits(cond, "condition")) { [13:11:04.439] if (!is.null(pattern)) { [13:11:04.439] computeRestarts <- base::computeRestarts [13:11:04.439] grepl <- base::grepl [13:11:04.439] restarts <- computeRestarts(cond) [13:11:04.439] for (restart in restarts) { [13:11:04.439] name <- restart$name [13:11:04.439] if (is.null(name)) [13:11:04.439] next [13:11:04.439] if (!grepl(pattern, name)) [13:11:04.439] next [13:11:04.439] invokeRestart(restart) [13:11:04.439] muffled <- TRUE [13:11:04.439] break [13:11:04.439] } [13:11:04.439] } [13:11:04.439] } [13:11:04.439] invisible(muffled) [13:11:04.439] } [13:11:04.439] muffleCondition(cond, pattern = "^muffle") [13:11:04.439] } [13:11:04.439] } [13:11:04.439] else { [13:11:04.439] if (TRUE) { [13:11:04.439] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.439] { [13:11:04.439] inherits <- base::inherits [13:11:04.439] invokeRestart <- base::invokeRestart [13:11:04.439] is.null <- base::is.null [13:11:04.439] muffled <- FALSE [13:11:04.439] if (inherits(cond, "message")) { [13:11:04.439] muffled <- grepl(pattern, "muffleMessage") [13:11:04.439] if (muffled) [13:11:04.439] invokeRestart("muffleMessage") [13:11:04.439] } [13:11:04.439] else if (inherits(cond, "warning")) { [13:11:04.439] muffled <- grepl(pattern, "muffleWarning") [13:11:04.439] if (muffled) [13:11:04.439] invokeRestart("muffleWarning") [13:11:04.439] } [13:11:04.439] else if (inherits(cond, "condition")) { [13:11:04.439] if (!is.null(pattern)) { [13:11:04.439] computeRestarts <- base::computeRestarts [13:11:04.439] grepl <- base::grepl [13:11:04.439] restarts <- computeRestarts(cond) [13:11:04.439] for (restart in restarts) { [13:11:04.439] name <- restart$name [13:11:04.439] if (is.null(name)) [13:11:04.439] next [13:11:04.439] if (!grepl(pattern, name)) [13:11:04.439] next [13:11:04.439] invokeRestart(restart) [13:11:04.439] muffled <- TRUE [13:11:04.439] break [13:11:04.439] } [13:11:04.439] } [13:11:04.439] } [13:11:04.439] invisible(muffled) [13:11:04.439] } [13:11:04.439] muffleCondition(cond, pattern = "^muffle") [13:11:04.439] } [13:11:04.439] } [13:11:04.439] } [13:11:04.439] })) [13:11:04.439] }, error = function(ex) { [13:11:04.439] base::structure(base::list(value = NULL, visible = NULL, [13:11:04.439] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.439] ...future.rng), started = ...future.startTime, [13:11:04.439] finished = Sys.time(), session_uuid = NA_character_, [13:11:04.439] version = "1.8"), class = "FutureResult") [13:11:04.439] }, finally = { [13:11:04.439] if (!identical(...future.workdir, getwd())) [13:11:04.439] setwd(...future.workdir) [13:11:04.439] { [13:11:04.439] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:04.439] ...future.oldOptions$nwarnings <- NULL [13:11:04.439] } [13:11:04.439] base::options(...future.oldOptions) [13:11:04.439] if (.Platform$OS.type == "windows") { [13:11:04.439] old_names <- names(...future.oldEnvVars) [13:11:04.439] envs <- base::Sys.getenv() [13:11:04.439] names <- names(envs) [13:11:04.439] common <- intersect(names, old_names) [13:11:04.439] added <- setdiff(names, old_names) [13:11:04.439] removed <- setdiff(old_names, names) [13:11:04.439] changed <- common[...future.oldEnvVars[common] != [13:11:04.439] envs[common]] [13:11:04.439] NAMES <- toupper(changed) [13:11:04.439] args <- list() [13:11:04.439] for (kk in seq_along(NAMES)) { [13:11:04.439] name <- changed[[kk]] [13:11:04.439] NAME <- NAMES[[kk]] [13:11:04.439] if (name != NAME && is.element(NAME, old_names)) [13:11:04.439] next [13:11:04.439] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.439] } [13:11:04.439] NAMES <- toupper(added) [13:11:04.439] for (kk in seq_along(NAMES)) { [13:11:04.439] name <- added[[kk]] [13:11:04.439] NAME <- NAMES[[kk]] [13:11:04.439] if (name != NAME && is.element(NAME, old_names)) [13:11:04.439] next [13:11:04.439] args[[name]] <- "" [13:11:04.439] } [13:11:04.439] NAMES <- toupper(removed) [13:11:04.439] for (kk in seq_along(NAMES)) { [13:11:04.439] name <- removed[[kk]] [13:11:04.439] NAME <- NAMES[[kk]] [13:11:04.439] if (name != NAME && is.element(NAME, old_names)) [13:11:04.439] next [13:11:04.439] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.439] } [13:11:04.439] if (length(args) > 0) [13:11:04.439] base::do.call(base::Sys.setenv, args = args) [13:11:04.439] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:04.439] } [13:11:04.439] else { [13:11:04.439] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:04.439] } [13:11:04.439] { [13:11:04.439] if (base::length(...future.futureOptionsAdded) > [13:11:04.439] 0L) { [13:11:04.439] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:04.439] base::names(opts) <- ...future.futureOptionsAdded [13:11:04.439] base::options(opts) [13:11:04.439] } [13:11:04.439] { [13:11:04.439] NULL [13:11:04.439] options(future.plan = NULL) [13:11:04.439] if (is.na(NA_character_)) [13:11:04.439] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.439] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:04.439] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:04.439] .init = FALSE) [13:11:04.439] } [13:11:04.439] } [13:11:04.439] } [13:11:04.439] }) [13:11:04.439] if (TRUE) { [13:11:04.439] base::sink(type = "output", split = FALSE) [13:11:04.439] if (TRUE) { [13:11:04.439] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:04.439] } [13:11:04.439] else { [13:11:04.439] ...future.result["stdout"] <- base::list(NULL) [13:11:04.439] } [13:11:04.439] base::close(...future.stdout) [13:11:04.439] ...future.stdout <- NULL [13:11:04.439] } [13:11:04.439] ...future.result$conditions <- ...future.conditions [13:11:04.439] ...future.result$finished <- base::Sys.time() [13:11:04.439] ...future.result [13:11:04.439] } [13:11:04.443] - Launch lazy future ... done [13:11:04.444] 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:11:04.453] getGlobalsAndPackages() ... [13:11:04.453] Searching for globals... [13:11:04.455] - globals found: [4] '{', 'xtabs', 'x', '~' [13:11:04.455] Searching for globals ... DONE [13:11:04.455] Resolving globals: FALSE [13:11:04.456] The total size of the 1 globals is 96 bytes (96 bytes) [13:11:04.456] 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:11:04.456] - globals: [1] 'x' [13:11:04.456] - packages: [1] 'stats' [13:11:04.457] getGlobalsAndPackages() ... DONE [13:11:04.457] run() for 'Future' ... [13:11:04.457] - state: 'created' [13:11:04.457] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:04.460] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:04.460] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:04.460] - Field: 'label' [13:11:04.460] - Field: 'local' [13:11:04.461] - Field: 'owner' [13:11:04.461] - Field: 'envir' [13:11:04.461] - Field: 'packages' [13:11:04.461] - Field: 'gc' [13:11:04.461] - Field: 'conditions' [13:11:04.461] - Field: 'expr' [13:11:04.462] - Field: 'uuid' [13:11:04.462] - Field: 'seed' [13:11:04.462] - Field: 'version' [13:11:04.462] - Field: 'result' [13:11:04.462] - Field: 'asynchronous' [13:11:04.463] - Field: 'calls' [13:11:04.463] - Field: 'globals' [13:11:04.463] - Field: 'stdout' [13:11:04.463] - Field: 'earlySignal' [13:11:04.463] - Field: 'lazy' [13:11:04.463] - Field: 'state' [13:11:04.464] - Field: '.cluster' [13:11:04.464] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:04.464] - Launch lazy future ... [13:11:04.464] Packages needed by the future expression (n = 1): 'stats' [13:11:04.464] Packages needed by future strategies (n = 0): [13:11:04.465] { [13:11:04.465] { [13:11:04.465] { [13:11:04.465] ...future.startTime <- base::Sys.time() [13:11:04.465] { [13:11:04.465] { [13:11:04.465] { [13:11:04.465] { [13:11:04.465] base::local({ [13:11:04.465] has_future <- base::requireNamespace("future", [13:11:04.465] quietly = TRUE) [13:11:04.465] if (has_future) { [13:11:04.465] ns <- base::getNamespace("future") [13:11:04.465] version <- ns[[".package"]][["version"]] [13:11:04.465] if (is.null(version)) [13:11:04.465] version <- utils::packageVersion("future") [13:11:04.465] } [13:11:04.465] else { [13:11:04.465] version <- NULL [13:11:04.465] } [13:11:04.465] if (!has_future || version < "1.8.0") { [13:11:04.465] info <- base::c(r_version = base::gsub("R version ", [13:11:04.465] "", base::R.version$version.string), [13:11:04.465] platform = base::sprintf("%s (%s-bit)", [13:11:04.465] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:04.465] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:04.465] "release", "version")], collapse = " "), [13:11:04.465] hostname = base::Sys.info()[["nodename"]]) [13:11:04.465] info <- base::sprintf("%s: %s", base::names(info), [13:11:04.465] info) [13:11:04.465] info <- base::paste(info, collapse = "; ") [13:11:04.465] if (!has_future) { [13:11:04.465] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:04.465] info) [13:11:04.465] } [13:11:04.465] else { [13:11:04.465] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:04.465] info, version) [13:11:04.465] } [13:11:04.465] base::stop(msg) [13:11:04.465] } [13:11:04.465] }) [13:11:04.465] } [13:11:04.465] base::local({ [13:11:04.465] for (pkg in "stats") { [13:11:04.465] base::loadNamespace(pkg) [13:11:04.465] base::library(pkg, character.only = TRUE) [13:11:04.465] } [13:11:04.465] }) [13:11:04.465] } [13:11:04.465] ...future.strategy.old <- future::plan("list") [13:11:04.465] options(future.plan = NULL) [13:11:04.465] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.465] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:04.465] } [13:11:04.465] ...future.workdir <- getwd() [13:11:04.465] } [13:11:04.465] ...future.oldOptions <- base::as.list(base::.Options) [13:11:04.465] ...future.oldEnvVars <- base::Sys.getenv() [13:11:04.465] } [13:11:04.465] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:04.465] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:04.465] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:04.465] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:04.465] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:04.465] future.stdout.windows.reencode = NULL, width = 80L) [13:11:04.465] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:04.465] base::names(...future.oldOptions)) [13:11:04.465] } [13:11:04.465] if (FALSE) { [13:11:04.465] } [13:11:04.465] else { [13:11:04.465] if (TRUE) { [13:11:04.465] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:04.465] open = "w") [13:11:04.465] } [13:11:04.465] else { [13:11:04.465] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:04.465] windows = "NUL", "/dev/null"), open = "w") [13:11:04.465] } [13:11:04.465] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:04.465] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:04.465] base::sink(type = "output", split = FALSE) [13:11:04.465] base::close(...future.stdout) [13:11:04.465] }, add = TRUE) [13:11:04.465] } [13:11:04.465] ...future.frame <- base::sys.nframe() [13:11:04.465] ...future.conditions <- base::list() [13:11:04.465] ...future.rng <- base::globalenv()$.Random.seed [13:11:04.465] if (FALSE) { [13:11:04.465] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:04.465] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:04.465] } [13:11:04.465] ...future.result <- base::tryCatch({ [13:11:04.465] base::withCallingHandlers({ [13:11:04.465] ...future.value <- base::withVisible(base::local({ [13:11:04.465] xtabs(~x) [13:11:04.465] })) [13:11:04.465] future::FutureResult(value = ...future.value$value, [13:11:04.465] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.465] ...future.rng), globalenv = if (FALSE) [13:11:04.465] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:04.465] ...future.globalenv.names)) [13:11:04.465] else NULL, started = ...future.startTime, version = "1.8") [13:11:04.465] }, condition = base::local({ [13:11:04.465] c <- base::c [13:11:04.465] inherits <- base::inherits [13:11:04.465] invokeRestart <- base::invokeRestart [13:11:04.465] length <- base::length [13:11:04.465] list <- base::list [13:11:04.465] seq.int <- base::seq.int [13:11:04.465] signalCondition <- base::signalCondition [13:11:04.465] sys.calls <- base::sys.calls [13:11:04.465] `[[` <- base::`[[` [13:11:04.465] `+` <- base::`+` [13:11:04.465] `<<-` <- base::`<<-` [13:11:04.465] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:04.465] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:04.465] 3L)] [13:11:04.465] } [13:11:04.465] function(cond) { [13:11:04.465] is_error <- inherits(cond, "error") [13:11:04.465] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:04.465] NULL) [13:11:04.465] if (is_error) { [13:11:04.465] sessionInformation <- function() { [13:11:04.465] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:04.465] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:04.465] search = base::search(), system = base::Sys.info()) [13:11:04.465] } [13:11:04.465] ...future.conditions[[length(...future.conditions) + [13:11:04.465] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:04.465] cond$call), session = sessionInformation(), [13:11:04.465] timestamp = base::Sys.time(), signaled = 0L) [13:11:04.465] signalCondition(cond) [13:11:04.465] } [13:11:04.465] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:04.465] signal <- FALSE && inherits(cond, character(0)) [13:11:04.465] ...future.conditions[[length(...future.conditions) + [13:11:04.465] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:04.465] if (FALSE && !signal) { [13:11:04.465] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.465] { [13:11:04.465] inherits <- base::inherits [13:11:04.465] invokeRestart <- base::invokeRestart [13:11:04.465] is.null <- base::is.null [13:11:04.465] muffled <- FALSE [13:11:04.465] if (inherits(cond, "message")) { [13:11:04.465] muffled <- grepl(pattern, "muffleMessage") [13:11:04.465] if (muffled) [13:11:04.465] invokeRestart("muffleMessage") [13:11:04.465] } [13:11:04.465] else if (inherits(cond, "warning")) { [13:11:04.465] muffled <- grepl(pattern, "muffleWarning") [13:11:04.465] if (muffled) [13:11:04.465] invokeRestart("muffleWarning") [13:11:04.465] } [13:11:04.465] else if (inherits(cond, "condition")) { [13:11:04.465] if (!is.null(pattern)) { [13:11:04.465] computeRestarts <- base::computeRestarts [13:11:04.465] grepl <- base::grepl [13:11:04.465] restarts <- computeRestarts(cond) [13:11:04.465] for (restart in restarts) { [13:11:04.465] name <- restart$name [13:11:04.465] if (is.null(name)) [13:11:04.465] next [13:11:04.465] if (!grepl(pattern, name)) [13:11:04.465] next [13:11:04.465] invokeRestart(restart) [13:11:04.465] muffled <- TRUE [13:11:04.465] break [13:11:04.465] } [13:11:04.465] } [13:11:04.465] } [13:11:04.465] invisible(muffled) [13:11:04.465] } [13:11:04.465] muffleCondition(cond, pattern = "^muffle") [13:11:04.465] } [13:11:04.465] } [13:11:04.465] else { [13:11:04.465] if (TRUE) { [13:11:04.465] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.465] { [13:11:04.465] inherits <- base::inherits [13:11:04.465] invokeRestart <- base::invokeRestart [13:11:04.465] is.null <- base::is.null [13:11:04.465] muffled <- FALSE [13:11:04.465] if (inherits(cond, "message")) { [13:11:04.465] muffled <- grepl(pattern, "muffleMessage") [13:11:04.465] if (muffled) [13:11:04.465] invokeRestart("muffleMessage") [13:11:04.465] } [13:11:04.465] else if (inherits(cond, "warning")) { [13:11:04.465] muffled <- grepl(pattern, "muffleWarning") [13:11:04.465] if (muffled) [13:11:04.465] invokeRestart("muffleWarning") [13:11:04.465] } [13:11:04.465] else if (inherits(cond, "condition")) { [13:11:04.465] if (!is.null(pattern)) { [13:11:04.465] computeRestarts <- base::computeRestarts [13:11:04.465] grepl <- base::grepl [13:11:04.465] restarts <- computeRestarts(cond) [13:11:04.465] for (restart in restarts) { [13:11:04.465] name <- restart$name [13:11:04.465] if (is.null(name)) [13:11:04.465] next [13:11:04.465] if (!grepl(pattern, name)) [13:11:04.465] next [13:11:04.465] invokeRestart(restart) [13:11:04.465] muffled <- TRUE [13:11:04.465] break [13:11:04.465] } [13:11:04.465] } [13:11:04.465] } [13:11:04.465] invisible(muffled) [13:11:04.465] } [13:11:04.465] muffleCondition(cond, pattern = "^muffle") [13:11:04.465] } [13:11:04.465] } [13:11:04.465] } [13:11:04.465] })) [13:11:04.465] }, error = function(ex) { [13:11:04.465] base::structure(base::list(value = NULL, visible = NULL, [13:11:04.465] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.465] ...future.rng), started = ...future.startTime, [13:11:04.465] finished = Sys.time(), session_uuid = NA_character_, [13:11:04.465] version = "1.8"), class = "FutureResult") [13:11:04.465] }, finally = { [13:11:04.465] if (!identical(...future.workdir, getwd())) [13:11:04.465] setwd(...future.workdir) [13:11:04.465] { [13:11:04.465] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:04.465] ...future.oldOptions$nwarnings <- NULL [13:11:04.465] } [13:11:04.465] base::options(...future.oldOptions) [13:11:04.465] if (.Platform$OS.type == "windows") { [13:11:04.465] old_names <- names(...future.oldEnvVars) [13:11:04.465] envs <- base::Sys.getenv() [13:11:04.465] names <- names(envs) [13:11:04.465] common <- intersect(names, old_names) [13:11:04.465] added <- setdiff(names, old_names) [13:11:04.465] removed <- setdiff(old_names, names) [13:11:04.465] changed <- common[...future.oldEnvVars[common] != [13:11:04.465] envs[common]] [13:11:04.465] NAMES <- toupper(changed) [13:11:04.465] args <- list() [13:11:04.465] for (kk in seq_along(NAMES)) { [13:11:04.465] name <- changed[[kk]] [13:11:04.465] NAME <- NAMES[[kk]] [13:11:04.465] if (name != NAME && is.element(NAME, old_names)) [13:11:04.465] next [13:11:04.465] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.465] } [13:11:04.465] NAMES <- toupper(added) [13:11:04.465] for (kk in seq_along(NAMES)) { [13:11:04.465] name <- added[[kk]] [13:11:04.465] NAME <- NAMES[[kk]] [13:11:04.465] if (name != NAME && is.element(NAME, old_names)) [13:11:04.465] next [13:11:04.465] args[[name]] <- "" [13:11:04.465] } [13:11:04.465] NAMES <- toupper(removed) [13:11:04.465] for (kk in seq_along(NAMES)) { [13:11:04.465] name <- removed[[kk]] [13:11:04.465] NAME <- NAMES[[kk]] [13:11:04.465] if (name != NAME && is.element(NAME, old_names)) [13:11:04.465] next [13:11:04.465] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.465] } [13:11:04.465] if (length(args) > 0) [13:11:04.465] base::do.call(base::Sys.setenv, args = args) [13:11:04.465] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:04.465] } [13:11:04.465] else { [13:11:04.465] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:04.465] } [13:11:04.465] { [13:11:04.465] if (base::length(...future.futureOptionsAdded) > [13:11:04.465] 0L) { [13:11:04.465] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:04.465] base::names(opts) <- ...future.futureOptionsAdded [13:11:04.465] base::options(opts) [13:11:04.465] } [13:11:04.465] { [13:11:04.465] NULL [13:11:04.465] options(future.plan = NULL) [13:11:04.465] if (is.na(NA_character_)) [13:11:04.465] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.465] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:04.465] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:04.465] .init = FALSE) [13:11:04.465] } [13:11:04.465] } [13:11:04.465] } [13:11:04.465] }) [13:11:04.465] if (TRUE) { [13:11:04.465] base::sink(type = "output", split = FALSE) [13:11:04.465] if (TRUE) { [13:11:04.465] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:04.465] } [13:11:04.465] else { [13:11:04.465] ...future.result["stdout"] <- base::list(NULL) [13:11:04.465] } [13:11:04.465] base::close(...future.stdout) [13:11:04.465] ...future.stdout <- NULL [13:11:04.465] } [13:11:04.465] ...future.result$conditions <- ...future.conditions [13:11:04.465] ...future.result$finished <- base::Sys.time() [13:11:04.465] ...future.result [13:11:04.465] } [13:11:04.469] - Launch lazy future ... done [13:11:04.469] 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:11:04.473] getGlobalsAndPackages() ... [13:11:04.473] Searching for globals... [13:11:04.474] - globals found: [4] '{', 'xtabs', 'x', '~' [13:11:04.474] Searching for globals ... DONE [13:11:04.475] Resolving globals: FALSE [13:11:04.475] The total size of the 1 globals is 96 bytes (96 bytes) [13:11:04.476] 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:11:04.476] - globals: [1] 'x' [13:11:04.476] - packages: [1] 'stats' [13:11:04.476] getGlobalsAndPackages() ... DONE [13:11:04.477] run() for 'Future' ... [13:11:04.477] - state: 'created' [13:11:04.478] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:04.481] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:04.481] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:04.481] - Field: 'label' [13:11:04.481] - Field: 'local' [13:11:04.482] - Field: 'owner' [13:11:04.482] - Field: 'envir' [13:11:04.482] - Field: 'packages' [13:11:04.482] - Field: 'gc' [13:11:04.482] - Field: 'conditions' [13:11:04.482] - Field: 'expr' [13:11:04.483] - Field: 'uuid' [13:11:04.483] - Field: 'seed' [13:11:04.483] - Field: 'version' [13:11:04.483] - Field: 'result' [13:11:04.483] - Field: 'asynchronous' [13:11:04.483] - Field: 'calls' [13:11:04.484] - Field: 'globals' [13:11:04.484] - Field: 'stdout' [13:11:04.484] - Field: 'earlySignal' [13:11:04.484] - Field: 'lazy' [13:11:04.484] - Field: 'state' [13:11:04.484] - Field: '.cluster' [13:11:04.485] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:04.485] - Launch lazy future ... [13:11:04.485] Packages needed by the future expression (n = 1): 'stats' [13:11:04.485] Packages needed by future strategies (n = 0): [13:11:04.486] { [13:11:04.486] { [13:11:04.486] { [13:11:04.486] ...future.startTime <- base::Sys.time() [13:11:04.486] { [13:11:04.486] { [13:11:04.486] { [13:11:04.486] { [13:11:04.486] base::local({ [13:11:04.486] has_future <- base::requireNamespace("future", [13:11:04.486] quietly = TRUE) [13:11:04.486] if (has_future) { [13:11:04.486] ns <- base::getNamespace("future") [13:11:04.486] version <- ns[[".package"]][["version"]] [13:11:04.486] if (is.null(version)) [13:11:04.486] version <- utils::packageVersion("future") [13:11:04.486] } [13:11:04.486] else { [13:11:04.486] version <- NULL [13:11:04.486] } [13:11:04.486] if (!has_future || version < "1.8.0") { [13:11:04.486] info <- base::c(r_version = base::gsub("R version ", [13:11:04.486] "", base::R.version$version.string), [13:11:04.486] platform = base::sprintf("%s (%s-bit)", [13:11:04.486] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:04.486] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:04.486] "release", "version")], collapse = " "), [13:11:04.486] hostname = base::Sys.info()[["nodename"]]) [13:11:04.486] info <- base::sprintf("%s: %s", base::names(info), [13:11:04.486] info) [13:11:04.486] info <- base::paste(info, collapse = "; ") [13:11:04.486] if (!has_future) { [13:11:04.486] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:04.486] info) [13:11:04.486] } [13:11:04.486] else { [13:11:04.486] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:04.486] info, version) [13:11:04.486] } [13:11:04.486] base::stop(msg) [13:11:04.486] } [13:11:04.486] }) [13:11:04.486] } [13:11:04.486] base::local({ [13:11:04.486] for (pkg in "stats") { [13:11:04.486] base::loadNamespace(pkg) [13:11:04.486] base::library(pkg, character.only = TRUE) [13:11:04.486] } [13:11:04.486] }) [13:11:04.486] } [13:11:04.486] ...future.strategy.old <- future::plan("list") [13:11:04.486] options(future.plan = NULL) [13:11:04.486] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.486] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:04.486] } [13:11:04.486] ...future.workdir <- getwd() [13:11:04.486] } [13:11:04.486] ...future.oldOptions <- base::as.list(base::.Options) [13:11:04.486] ...future.oldEnvVars <- base::Sys.getenv() [13:11:04.486] } [13:11:04.486] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:04.486] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:04.486] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:04.486] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:04.486] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:04.486] future.stdout.windows.reencode = NULL, width = 80L) [13:11:04.486] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:04.486] base::names(...future.oldOptions)) [13:11:04.486] } [13:11:04.486] if (FALSE) { [13:11:04.486] } [13:11:04.486] else { [13:11:04.486] if (TRUE) { [13:11:04.486] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:04.486] open = "w") [13:11:04.486] } [13:11:04.486] else { [13:11:04.486] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:04.486] windows = "NUL", "/dev/null"), open = "w") [13:11:04.486] } [13:11:04.486] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:04.486] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:04.486] base::sink(type = "output", split = FALSE) [13:11:04.486] base::close(...future.stdout) [13:11:04.486] }, add = TRUE) [13:11:04.486] } [13:11:04.486] ...future.frame <- base::sys.nframe() [13:11:04.486] ...future.conditions <- base::list() [13:11:04.486] ...future.rng <- base::globalenv()$.Random.seed [13:11:04.486] if (FALSE) { [13:11:04.486] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:04.486] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:04.486] } [13:11:04.486] ...future.result <- base::tryCatch({ [13:11:04.486] base::withCallingHandlers({ [13:11:04.486] ...future.value <- base::withVisible(base::local({ [13:11:04.486] xtabs(~x) [13:11:04.486] })) [13:11:04.486] future::FutureResult(value = ...future.value$value, [13:11:04.486] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.486] ...future.rng), globalenv = if (FALSE) [13:11:04.486] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:04.486] ...future.globalenv.names)) [13:11:04.486] else NULL, started = ...future.startTime, version = "1.8") [13:11:04.486] }, condition = base::local({ [13:11:04.486] c <- base::c [13:11:04.486] inherits <- base::inherits [13:11:04.486] invokeRestart <- base::invokeRestart [13:11:04.486] length <- base::length [13:11:04.486] list <- base::list [13:11:04.486] seq.int <- base::seq.int [13:11:04.486] signalCondition <- base::signalCondition [13:11:04.486] sys.calls <- base::sys.calls [13:11:04.486] `[[` <- base::`[[` [13:11:04.486] `+` <- base::`+` [13:11:04.486] `<<-` <- base::`<<-` [13:11:04.486] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:04.486] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:04.486] 3L)] [13:11:04.486] } [13:11:04.486] function(cond) { [13:11:04.486] is_error <- inherits(cond, "error") [13:11:04.486] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:04.486] NULL) [13:11:04.486] if (is_error) { [13:11:04.486] sessionInformation <- function() { [13:11:04.486] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:04.486] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:04.486] search = base::search(), system = base::Sys.info()) [13:11:04.486] } [13:11:04.486] ...future.conditions[[length(...future.conditions) + [13:11:04.486] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:04.486] cond$call), session = sessionInformation(), [13:11:04.486] timestamp = base::Sys.time(), signaled = 0L) [13:11:04.486] signalCondition(cond) [13:11:04.486] } [13:11:04.486] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:04.486] signal <- FALSE && inherits(cond, character(0)) [13:11:04.486] ...future.conditions[[length(...future.conditions) + [13:11:04.486] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:04.486] if (FALSE && !signal) { [13:11:04.486] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.486] { [13:11:04.486] inherits <- base::inherits [13:11:04.486] invokeRestart <- base::invokeRestart [13:11:04.486] is.null <- base::is.null [13:11:04.486] muffled <- FALSE [13:11:04.486] if (inherits(cond, "message")) { [13:11:04.486] muffled <- grepl(pattern, "muffleMessage") [13:11:04.486] if (muffled) [13:11:04.486] invokeRestart("muffleMessage") [13:11:04.486] } [13:11:04.486] else if (inherits(cond, "warning")) { [13:11:04.486] muffled <- grepl(pattern, "muffleWarning") [13:11:04.486] if (muffled) [13:11:04.486] invokeRestart("muffleWarning") [13:11:04.486] } [13:11:04.486] else if (inherits(cond, "condition")) { [13:11:04.486] if (!is.null(pattern)) { [13:11:04.486] computeRestarts <- base::computeRestarts [13:11:04.486] grepl <- base::grepl [13:11:04.486] restarts <- computeRestarts(cond) [13:11:04.486] for (restart in restarts) { [13:11:04.486] name <- restart$name [13:11:04.486] if (is.null(name)) [13:11:04.486] next [13:11:04.486] if (!grepl(pattern, name)) [13:11:04.486] next [13:11:04.486] invokeRestart(restart) [13:11:04.486] muffled <- TRUE [13:11:04.486] break [13:11:04.486] } [13:11:04.486] } [13:11:04.486] } [13:11:04.486] invisible(muffled) [13:11:04.486] } [13:11:04.486] muffleCondition(cond, pattern = "^muffle") [13:11:04.486] } [13:11:04.486] } [13:11:04.486] else { [13:11:04.486] if (TRUE) { [13:11:04.486] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.486] { [13:11:04.486] inherits <- base::inherits [13:11:04.486] invokeRestart <- base::invokeRestart [13:11:04.486] is.null <- base::is.null [13:11:04.486] muffled <- FALSE [13:11:04.486] if (inherits(cond, "message")) { [13:11:04.486] muffled <- grepl(pattern, "muffleMessage") [13:11:04.486] if (muffled) [13:11:04.486] invokeRestart("muffleMessage") [13:11:04.486] } [13:11:04.486] else if (inherits(cond, "warning")) { [13:11:04.486] muffled <- grepl(pattern, "muffleWarning") [13:11:04.486] if (muffled) [13:11:04.486] invokeRestart("muffleWarning") [13:11:04.486] } [13:11:04.486] else if (inherits(cond, "condition")) { [13:11:04.486] if (!is.null(pattern)) { [13:11:04.486] computeRestarts <- base::computeRestarts [13:11:04.486] grepl <- base::grepl [13:11:04.486] restarts <- computeRestarts(cond) [13:11:04.486] for (restart in restarts) { [13:11:04.486] name <- restart$name [13:11:04.486] if (is.null(name)) [13:11:04.486] next [13:11:04.486] if (!grepl(pattern, name)) [13:11:04.486] next [13:11:04.486] invokeRestart(restart) [13:11:04.486] muffled <- TRUE [13:11:04.486] break [13:11:04.486] } [13:11:04.486] } [13:11:04.486] } [13:11:04.486] invisible(muffled) [13:11:04.486] } [13:11:04.486] muffleCondition(cond, pattern = "^muffle") [13:11:04.486] } [13:11:04.486] } [13:11:04.486] } [13:11:04.486] })) [13:11:04.486] }, error = function(ex) { [13:11:04.486] base::structure(base::list(value = NULL, visible = NULL, [13:11:04.486] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.486] ...future.rng), started = ...future.startTime, [13:11:04.486] finished = Sys.time(), session_uuid = NA_character_, [13:11:04.486] version = "1.8"), class = "FutureResult") [13:11:04.486] }, finally = { [13:11:04.486] if (!identical(...future.workdir, getwd())) [13:11:04.486] setwd(...future.workdir) [13:11:04.486] { [13:11:04.486] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:04.486] ...future.oldOptions$nwarnings <- NULL [13:11:04.486] } [13:11:04.486] base::options(...future.oldOptions) [13:11:04.486] if (.Platform$OS.type == "windows") { [13:11:04.486] old_names <- names(...future.oldEnvVars) [13:11:04.486] envs <- base::Sys.getenv() [13:11:04.486] names <- names(envs) [13:11:04.486] common <- intersect(names, old_names) [13:11:04.486] added <- setdiff(names, old_names) [13:11:04.486] removed <- setdiff(old_names, names) [13:11:04.486] changed <- common[...future.oldEnvVars[common] != [13:11:04.486] envs[common]] [13:11:04.486] NAMES <- toupper(changed) [13:11:04.486] args <- list() [13:11:04.486] for (kk in seq_along(NAMES)) { [13:11:04.486] name <- changed[[kk]] [13:11:04.486] NAME <- NAMES[[kk]] [13:11:04.486] if (name != NAME && is.element(NAME, old_names)) [13:11:04.486] next [13:11:04.486] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.486] } [13:11:04.486] NAMES <- toupper(added) [13:11:04.486] for (kk in seq_along(NAMES)) { [13:11:04.486] name <- added[[kk]] [13:11:04.486] NAME <- NAMES[[kk]] [13:11:04.486] if (name != NAME && is.element(NAME, old_names)) [13:11:04.486] next [13:11:04.486] args[[name]] <- "" [13:11:04.486] } [13:11:04.486] NAMES <- toupper(removed) [13:11:04.486] for (kk in seq_along(NAMES)) { [13:11:04.486] name <- removed[[kk]] [13:11:04.486] NAME <- NAMES[[kk]] [13:11:04.486] if (name != NAME && is.element(NAME, old_names)) [13:11:04.486] next [13:11:04.486] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.486] } [13:11:04.486] if (length(args) > 0) [13:11:04.486] base::do.call(base::Sys.setenv, args = args) [13:11:04.486] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:04.486] } [13:11:04.486] else { [13:11:04.486] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:04.486] } [13:11:04.486] { [13:11:04.486] if (base::length(...future.futureOptionsAdded) > [13:11:04.486] 0L) { [13:11:04.486] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:04.486] base::names(opts) <- ...future.futureOptionsAdded [13:11:04.486] base::options(opts) [13:11:04.486] } [13:11:04.486] { [13:11:04.486] NULL [13:11:04.486] options(future.plan = NULL) [13:11:04.486] if (is.na(NA_character_)) [13:11:04.486] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.486] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:04.486] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:04.486] .init = FALSE) [13:11:04.486] } [13:11:04.486] } [13:11:04.486] } [13:11:04.486] }) [13:11:04.486] if (TRUE) { [13:11:04.486] base::sink(type = "output", split = FALSE) [13:11:04.486] if (TRUE) { [13:11:04.486] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:04.486] } [13:11:04.486] else { [13:11:04.486] ...future.result["stdout"] <- base::list(NULL) [13:11:04.486] } [13:11:04.486] base::close(...future.stdout) [13:11:04.486] ...future.stdout <- NULL [13:11:04.486] } [13:11:04.486] ...future.result$conditions <- ...future.conditions [13:11:04.486] ...future.result$finished <- base::Sys.time() [13:11:04.486] ...future.result [13:11:04.486] } [13:11:04.490] - Launch lazy future ... done [13:11:04.490] 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:11:04.501] - Globals - lm(, data = cars) ... Call: lm(formula = dist ~ . - 1, data = cars) Coefficients: speed 2.909 [13:11:04.502] getGlobalsAndPackages() ... [13:11:04.502] Searching for globals... [13:11:04.504] - globals found: [7] '{', 'lm', 'dist', '-', '.', '~', 'cars' [13:11:04.504] Searching for globals ... DONE [13:11:04.505] Resolving globals: FALSE [13:11:04.505] [13:11:04.505] - packages: [2] 'stats', 'datasets' [13:11:04.506] getGlobalsAndPackages() ... DONE [13:11:04.506] run() for 'Future' ... [13:11:04.506] - state: 'created' [13:11:04.506] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:04.511] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:04.511] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:04.511] - Field: 'label' [13:11:04.512] - Field: 'local' [13:11:04.512] - Field: 'owner' [13:11:04.512] - Field: 'envir' [13:11:04.512] - Field: 'packages' [13:11:04.513] - Field: 'gc' [13:11:04.513] - Field: 'conditions' [13:11:04.513] - Field: 'expr' [13:11:04.513] - Field: 'uuid' [13:11:04.514] - Field: 'seed' [13:11:04.514] - Field: 'version' [13:11:04.514] - Field: 'result' [13:11:04.514] - Field: 'asynchronous' [13:11:04.515] - Field: 'calls' [13:11:04.515] - Field: 'globals' [13:11:04.515] - Field: 'stdout' [13:11:04.515] - Field: 'earlySignal' [13:11:04.515] - Field: 'lazy' [13:11:04.516] - Field: 'state' [13:11:04.516] - Field: '.cluster' [13:11:04.516] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:04.516] - Launch lazy future ... [13:11:04.517] Packages needed by the future expression (n = 2): 'stats', 'datasets' [13:11:04.517] Packages needed by future strategies (n = 0): [13:11:04.517] { [13:11:04.517] { [13:11:04.517] { [13:11:04.517] ...future.startTime <- base::Sys.time() [13:11:04.517] { [13:11:04.517] { [13:11:04.517] { [13:11:04.517] { [13:11:04.517] base::local({ [13:11:04.517] has_future <- base::requireNamespace("future", [13:11:04.517] quietly = TRUE) [13:11:04.517] if (has_future) { [13:11:04.517] ns <- base::getNamespace("future") [13:11:04.517] version <- ns[[".package"]][["version"]] [13:11:04.517] if (is.null(version)) [13:11:04.517] version <- utils::packageVersion("future") [13:11:04.517] } [13:11:04.517] else { [13:11:04.517] version <- NULL [13:11:04.517] } [13:11:04.517] if (!has_future || version < "1.8.0") { [13:11:04.517] info <- base::c(r_version = base::gsub("R version ", [13:11:04.517] "", base::R.version$version.string), [13:11:04.517] platform = base::sprintf("%s (%s-bit)", [13:11:04.517] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:04.517] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:04.517] "release", "version")], collapse = " "), [13:11:04.517] hostname = base::Sys.info()[["nodename"]]) [13:11:04.517] info <- base::sprintf("%s: %s", base::names(info), [13:11:04.517] info) [13:11:04.517] info <- base::paste(info, collapse = "; ") [13:11:04.517] if (!has_future) { [13:11:04.517] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:04.517] info) [13:11:04.517] } [13:11:04.517] else { [13:11:04.517] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:04.517] info, version) [13:11:04.517] } [13:11:04.517] base::stop(msg) [13:11:04.517] } [13:11:04.517] }) [13:11:04.517] } [13:11:04.517] base::local({ [13:11:04.517] for (pkg in c("stats", "datasets")) { [13:11:04.517] base::loadNamespace(pkg) [13:11:04.517] base::library(pkg, character.only = TRUE) [13:11:04.517] } [13:11:04.517] }) [13:11:04.517] } [13:11:04.517] ...future.strategy.old <- future::plan("list") [13:11:04.517] options(future.plan = NULL) [13:11:04.517] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.517] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:04.517] } [13:11:04.517] ...future.workdir <- getwd() [13:11:04.517] } [13:11:04.517] ...future.oldOptions <- base::as.list(base::.Options) [13:11:04.517] ...future.oldEnvVars <- base::Sys.getenv() [13:11:04.517] } [13:11:04.517] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:04.517] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:04.517] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:04.517] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:04.517] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:04.517] future.stdout.windows.reencode = NULL, width = 80L) [13:11:04.517] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:04.517] base::names(...future.oldOptions)) [13:11:04.517] } [13:11:04.517] if (FALSE) { [13:11:04.517] } [13:11:04.517] else { [13:11:04.517] if (TRUE) { [13:11:04.517] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:04.517] open = "w") [13:11:04.517] } [13:11:04.517] else { [13:11:04.517] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:04.517] windows = "NUL", "/dev/null"), open = "w") [13:11:04.517] } [13:11:04.517] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:04.517] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:04.517] base::sink(type = "output", split = FALSE) [13:11:04.517] base::close(...future.stdout) [13:11:04.517] }, add = TRUE) [13:11:04.517] } [13:11:04.517] ...future.frame <- base::sys.nframe() [13:11:04.517] ...future.conditions <- base::list() [13:11:04.517] ...future.rng <- base::globalenv()$.Random.seed [13:11:04.517] if (FALSE) { [13:11:04.517] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:04.517] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:04.517] } [13:11:04.517] ...future.result <- base::tryCatch({ [13:11:04.517] base::withCallingHandlers({ [13:11:04.517] ...future.value <- base::withVisible(base::local({ [13:11:04.517] lm(dist ~ . - 1, data = cars) [13:11:04.517] })) [13:11:04.517] future::FutureResult(value = ...future.value$value, [13:11:04.517] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.517] ...future.rng), globalenv = if (FALSE) [13:11:04.517] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:04.517] ...future.globalenv.names)) [13:11:04.517] else NULL, started = ...future.startTime, version = "1.8") [13:11:04.517] }, condition = base::local({ [13:11:04.517] c <- base::c [13:11:04.517] inherits <- base::inherits [13:11:04.517] invokeRestart <- base::invokeRestart [13:11:04.517] length <- base::length [13:11:04.517] list <- base::list [13:11:04.517] seq.int <- base::seq.int [13:11:04.517] signalCondition <- base::signalCondition [13:11:04.517] sys.calls <- base::sys.calls [13:11:04.517] `[[` <- base::`[[` [13:11:04.517] `+` <- base::`+` [13:11:04.517] `<<-` <- base::`<<-` [13:11:04.517] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:04.517] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:04.517] 3L)] [13:11:04.517] } [13:11:04.517] function(cond) { [13:11:04.517] is_error <- inherits(cond, "error") [13:11:04.517] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:04.517] NULL) [13:11:04.517] if (is_error) { [13:11:04.517] sessionInformation <- function() { [13:11:04.517] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:04.517] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:04.517] search = base::search(), system = base::Sys.info()) [13:11:04.517] } [13:11:04.517] ...future.conditions[[length(...future.conditions) + [13:11:04.517] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:04.517] cond$call), session = sessionInformation(), [13:11:04.517] timestamp = base::Sys.time(), signaled = 0L) [13:11:04.517] signalCondition(cond) [13:11:04.517] } [13:11:04.517] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:04.517] signal <- FALSE && inherits(cond, character(0)) [13:11:04.517] ...future.conditions[[length(...future.conditions) + [13:11:04.517] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:04.517] if (FALSE && !signal) { [13:11:04.517] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.517] { [13:11:04.517] inherits <- base::inherits [13:11:04.517] invokeRestart <- base::invokeRestart [13:11:04.517] is.null <- base::is.null [13:11:04.517] muffled <- FALSE [13:11:04.517] if (inherits(cond, "message")) { [13:11:04.517] muffled <- grepl(pattern, "muffleMessage") [13:11:04.517] if (muffled) [13:11:04.517] invokeRestart("muffleMessage") [13:11:04.517] } [13:11:04.517] else if (inherits(cond, "warning")) { [13:11:04.517] muffled <- grepl(pattern, "muffleWarning") [13:11:04.517] if (muffled) [13:11:04.517] invokeRestart("muffleWarning") [13:11:04.517] } [13:11:04.517] else if (inherits(cond, "condition")) { [13:11:04.517] if (!is.null(pattern)) { [13:11:04.517] computeRestarts <- base::computeRestarts [13:11:04.517] grepl <- base::grepl [13:11:04.517] restarts <- computeRestarts(cond) [13:11:04.517] for (restart in restarts) { [13:11:04.517] name <- restart$name [13:11:04.517] if (is.null(name)) [13:11:04.517] next [13:11:04.517] if (!grepl(pattern, name)) [13:11:04.517] next [13:11:04.517] invokeRestart(restart) [13:11:04.517] muffled <- TRUE [13:11:04.517] break [13:11:04.517] } [13:11:04.517] } [13:11:04.517] } [13:11:04.517] invisible(muffled) [13:11:04.517] } [13:11:04.517] muffleCondition(cond, pattern = "^muffle") [13:11:04.517] } [13:11:04.517] } [13:11:04.517] else { [13:11:04.517] if (TRUE) { [13:11:04.517] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.517] { [13:11:04.517] inherits <- base::inherits [13:11:04.517] invokeRestart <- base::invokeRestart [13:11:04.517] is.null <- base::is.null [13:11:04.517] muffled <- FALSE [13:11:04.517] if (inherits(cond, "message")) { [13:11:04.517] muffled <- grepl(pattern, "muffleMessage") [13:11:04.517] if (muffled) [13:11:04.517] invokeRestart("muffleMessage") [13:11:04.517] } [13:11:04.517] else if (inherits(cond, "warning")) { [13:11:04.517] muffled <- grepl(pattern, "muffleWarning") [13:11:04.517] if (muffled) [13:11:04.517] invokeRestart("muffleWarning") [13:11:04.517] } [13:11:04.517] else if (inherits(cond, "condition")) { [13:11:04.517] if (!is.null(pattern)) { [13:11:04.517] computeRestarts <- base::computeRestarts [13:11:04.517] grepl <- base::grepl [13:11:04.517] restarts <- computeRestarts(cond) [13:11:04.517] for (restart in restarts) { [13:11:04.517] name <- restart$name [13:11:04.517] if (is.null(name)) [13:11:04.517] next [13:11:04.517] if (!grepl(pattern, name)) [13:11:04.517] next [13:11:04.517] invokeRestart(restart) [13:11:04.517] muffled <- TRUE [13:11:04.517] break [13:11:04.517] } [13:11:04.517] } [13:11:04.517] } [13:11:04.517] invisible(muffled) [13:11:04.517] } [13:11:04.517] muffleCondition(cond, pattern = "^muffle") [13:11:04.517] } [13:11:04.517] } [13:11:04.517] } [13:11:04.517] })) [13:11:04.517] }, error = function(ex) { [13:11:04.517] base::structure(base::list(value = NULL, visible = NULL, [13:11:04.517] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.517] ...future.rng), started = ...future.startTime, [13:11:04.517] finished = Sys.time(), session_uuid = NA_character_, [13:11:04.517] version = "1.8"), class = "FutureResult") [13:11:04.517] }, finally = { [13:11:04.517] if (!identical(...future.workdir, getwd())) [13:11:04.517] setwd(...future.workdir) [13:11:04.517] { [13:11:04.517] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:04.517] ...future.oldOptions$nwarnings <- NULL [13:11:04.517] } [13:11:04.517] base::options(...future.oldOptions) [13:11:04.517] if (.Platform$OS.type == "windows") { [13:11:04.517] old_names <- names(...future.oldEnvVars) [13:11:04.517] envs <- base::Sys.getenv() [13:11:04.517] names <- names(envs) [13:11:04.517] common <- intersect(names, old_names) [13:11:04.517] added <- setdiff(names, old_names) [13:11:04.517] removed <- setdiff(old_names, names) [13:11:04.517] changed <- common[...future.oldEnvVars[common] != [13:11:04.517] envs[common]] [13:11:04.517] NAMES <- toupper(changed) [13:11:04.517] args <- list() [13:11:04.517] for (kk in seq_along(NAMES)) { [13:11:04.517] name <- changed[[kk]] [13:11:04.517] NAME <- NAMES[[kk]] [13:11:04.517] if (name != NAME && is.element(NAME, old_names)) [13:11:04.517] next [13:11:04.517] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.517] } [13:11:04.517] NAMES <- toupper(added) [13:11:04.517] for (kk in seq_along(NAMES)) { [13:11:04.517] name <- added[[kk]] [13:11:04.517] NAME <- NAMES[[kk]] [13:11:04.517] if (name != NAME && is.element(NAME, old_names)) [13:11:04.517] next [13:11:04.517] args[[name]] <- "" [13:11:04.517] } [13:11:04.517] NAMES <- toupper(removed) [13:11:04.517] for (kk in seq_along(NAMES)) { [13:11:04.517] name <- removed[[kk]] [13:11:04.517] NAME <- NAMES[[kk]] [13:11:04.517] if (name != NAME && is.element(NAME, old_names)) [13:11:04.517] next [13:11:04.517] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.517] } [13:11:04.517] if (length(args) > 0) [13:11:04.517] base::do.call(base::Sys.setenv, args = args) [13:11:04.517] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:04.517] } [13:11:04.517] else { [13:11:04.517] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:04.517] } [13:11:04.517] { [13:11:04.517] if (base::length(...future.futureOptionsAdded) > [13:11:04.517] 0L) { [13:11:04.517] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:04.517] base::names(opts) <- ...future.futureOptionsAdded [13:11:04.517] base::options(opts) [13:11:04.517] } [13:11:04.517] { [13:11:04.517] NULL [13:11:04.517] options(future.plan = NULL) [13:11:04.517] if (is.na(NA_character_)) [13:11:04.517] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.517] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:04.517] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:04.517] .init = FALSE) [13:11:04.517] } [13:11:04.517] } [13:11:04.517] } [13:11:04.517] }) [13:11:04.517] if (TRUE) { [13:11:04.517] base::sink(type = "output", split = FALSE) [13:11:04.517] if (TRUE) { [13:11:04.517] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:04.517] } [13:11:04.517] else { [13:11:04.517] ...future.result["stdout"] <- base::list(NULL) [13:11:04.517] } [13:11:04.517] base::close(...future.stdout) [13:11:04.517] ...future.stdout <- NULL [13:11:04.517] } [13:11:04.517] ...future.result$conditions <- ...future.conditions [13:11:04.517] ...future.result$finished <- base::Sys.time() [13:11:04.517] ...future.result [13:11:04.517] } [13:11:04.522] - Launch lazy future ... done [13:11:04.522] run() for 'MiraiFuture' ... done Call: lm(formula = dist ~ . - 1, data = cars) Coefficients: speed 2.909 [13:11:04.528] - Globals - lm(, data = cars) ... Call: lm(formula = dist ~ . + 0, data = cars) Coefficients: speed 2.909 [13:11:04.529] getGlobalsAndPackages() ... [13:11:04.530] Searching for globals... [13:11:04.531] - globals found: [7] '{', 'lm', 'dist', '+', '.', '~', 'cars' [13:11:04.532] Searching for globals ... DONE [13:11:04.532] Resolving globals: FALSE [13:11:04.532] [13:11:04.533] - packages: [2] 'stats', 'datasets' [13:11:04.533] getGlobalsAndPackages() ... DONE [13:11:04.533] run() for 'Future' ... [13:11:04.533] - state: 'created' [13:11:04.534] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:04.536] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:04.536] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:04.536] - Field: 'label' [13:11:04.536] - Field: 'local' [13:11:04.536] - Field: 'owner' [13:11:04.537] - Field: 'envir' [13:11:04.537] - Field: 'packages' [13:11:04.537] - Field: 'gc' [13:11:04.537] - Field: 'conditions' [13:11:04.537] - Field: 'expr' [13:11:04.538] - Field: 'uuid' [13:11:04.538] - Field: 'seed' [13:11:04.538] - Field: 'version' [13:11:04.538] - Field: 'result' [13:11:04.538] - Field: 'asynchronous' [13:11:04.538] - Field: 'calls' [13:11:04.539] - Field: 'globals' [13:11:04.539] - Field: 'stdout' [13:11:04.539] - Field: 'earlySignal' [13:11:04.539] - Field: 'lazy' [13:11:04.539] - Field: 'state' [13:11:04.539] - Field: '.cluster' [13:11:04.540] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:04.540] - Launch lazy future ... [13:11:04.540] Packages needed by the future expression (n = 2): 'stats', 'datasets' [13:11:04.540] Packages needed by future strategies (n = 0): [13:11:04.541] { [13:11:04.541] { [13:11:04.541] { [13:11:04.541] ...future.startTime <- base::Sys.time() [13:11:04.541] { [13:11:04.541] { [13:11:04.541] { [13:11:04.541] { [13:11:04.541] base::local({ [13:11:04.541] has_future <- base::requireNamespace("future", [13:11:04.541] quietly = TRUE) [13:11:04.541] if (has_future) { [13:11:04.541] ns <- base::getNamespace("future") [13:11:04.541] version <- ns[[".package"]][["version"]] [13:11:04.541] if (is.null(version)) [13:11:04.541] version <- utils::packageVersion("future") [13:11:04.541] } [13:11:04.541] else { [13:11:04.541] version <- NULL [13:11:04.541] } [13:11:04.541] if (!has_future || version < "1.8.0") { [13:11:04.541] info <- base::c(r_version = base::gsub("R version ", [13:11:04.541] "", base::R.version$version.string), [13:11:04.541] platform = base::sprintf("%s (%s-bit)", [13:11:04.541] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:04.541] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:04.541] "release", "version")], collapse = " "), [13:11:04.541] hostname = base::Sys.info()[["nodename"]]) [13:11:04.541] info <- base::sprintf("%s: %s", base::names(info), [13:11:04.541] info) [13:11:04.541] info <- base::paste(info, collapse = "; ") [13:11:04.541] if (!has_future) { [13:11:04.541] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:04.541] info) [13:11:04.541] } [13:11:04.541] else { [13:11:04.541] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:04.541] info, version) [13:11:04.541] } [13:11:04.541] base::stop(msg) [13:11:04.541] } [13:11:04.541] }) [13:11:04.541] } [13:11:04.541] base::local({ [13:11:04.541] for (pkg in c("stats", "datasets")) { [13:11:04.541] base::loadNamespace(pkg) [13:11:04.541] base::library(pkg, character.only = TRUE) [13:11:04.541] } [13:11:04.541] }) [13:11:04.541] } [13:11:04.541] ...future.strategy.old <- future::plan("list") [13:11:04.541] options(future.plan = NULL) [13:11:04.541] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.541] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:04.541] } [13:11:04.541] ...future.workdir <- getwd() [13:11:04.541] } [13:11:04.541] ...future.oldOptions <- base::as.list(base::.Options) [13:11:04.541] ...future.oldEnvVars <- base::Sys.getenv() [13:11:04.541] } [13:11:04.541] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:04.541] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:04.541] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:04.541] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:04.541] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:04.541] future.stdout.windows.reencode = NULL, width = 80L) [13:11:04.541] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:04.541] base::names(...future.oldOptions)) [13:11:04.541] } [13:11:04.541] if (FALSE) { [13:11:04.541] } [13:11:04.541] else { [13:11:04.541] if (TRUE) { [13:11:04.541] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:04.541] open = "w") [13:11:04.541] } [13:11:04.541] else { [13:11:04.541] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:04.541] windows = "NUL", "/dev/null"), open = "w") [13:11:04.541] } [13:11:04.541] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:04.541] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:04.541] base::sink(type = "output", split = FALSE) [13:11:04.541] base::close(...future.stdout) [13:11:04.541] }, add = TRUE) [13:11:04.541] } [13:11:04.541] ...future.frame <- base::sys.nframe() [13:11:04.541] ...future.conditions <- base::list() [13:11:04.541] ...future.rng <- base::globalenv()$.Random.seed [13:11:04.541] if (FALSE) { [13:11:04.541] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:04.541] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:04.541] } [13:11:04.541] ...future.result <- base::tryCatch({ [13:11:04.541] base::withCallingHandlers({ [13:11:04.541] ...future.value <- base::withVisible(base::local({ [13:11:04.541] lm(dist ~ . + 0, data = cars) [13:11:04.541] })) [13:11:04.541] future::FutureResult(value = ...future.value$value, [13:11:04.541] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.541] ...future.rng), globalenv = if (FALSE) [13:11:04.541] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:04.541] ...future.globalenv.names)) [13:11:04.541] else NULL, started = ...future.startTime, version = "1.8") [13:11:04.541] }, condition = base::local({ [13:11:04.541] c <- base::c [13:11:04.541] inherits <- base::inherits [13:11:04.541] invokeRestart <- base::invokeRestart [13:11:04.541] length <- base::length [13:11:04.541] list <- base::list [13:11:04.541] seq.int <- base::seq.int [13:11:04.541] signalCondition <- base::signalCondition [13:11:04.541] sys.calls <- base::sys.calls [13:11:04.541] `[[` <- base::`[[` [13:11:04.541] `+` <- base::`+` [13:11:04.541] `<<-` <- base::`<<-` [13:11:04.541] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:04.541] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:04.541] 3L)] [13:11:04.541] } [13:11:04.541] function(cond) { [13:11:04.541] is_error <- inherits(cond, "error") [13:11:04.541] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:04.541] NULL) [13:11:04.541] if (is_error) { [13:11:04.541] sessionInformation <- function() { [13:11:04.541] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:04.541] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:04.541] search = base::search(), system = base::Sys.info()) [13:11:04.541] } [13:11:04.541] ...future.conditions[[length(...future.conditions) + [13:11:04.541] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:04.541] cond$call), session = sessionInformation(), [13:11:04.541] timestamp = base::Sys.time(), signaled = 0L) [13:11:04.541] signalCondition(cond) [13:11:04.541] } [13:11:04.541] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:04.541] signal <- FALSE && inherits(cond, character(0)) [13:11:04.541] ...future.conditions[[length(...future.conditions) + [13:11:04.541] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:04.541] if (FALSE && !signal) { [13:11:04.541] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.541] { [13:11:04.541] inherits <- base::inherits [13:11:04.541] invokeRestart <- base::invokeRestart [13:11:04.541] is.null <- base::is.null [13:11:04.541] muffled <- FALSE [13:11:04.541] if (inherits(cond, "message")) { [13:11:04.541] muffled <- grepl(pattern, "muffleMessage") [13:11:04.541] if (muffled) [13:11:04.541] invokeRestart("muffleMessage") [13:11:04.541] } [13:11:04.541] else if (inherits(cond, "warning")) { [13:11:04.541] muffled <- grepl(pattern, "muffleWarning") [13:11:04.541] if (muffled) [13:11:04.541] invokeRestart("muffleWarning") [13:11:04.541] } [13:11:04.541] else if (inherits(cond, "condition")) { [13:11:04.541] if (!is.null(pattern)) { [13:11:04.541] computeRestarts <- base::computeRestarts [13:11:04.541] grepl <- base::grepl [13:11:04.541] restarts <- computeRestarts(cond) [13:11:04.541] for (restart in restarts) { [13:11:04.541] name <- restart$name [13:11:04.541] if (is.null(name)) [13:11:04.541] next [13:11:04.541] if (!grepl(pattern, name)) [13:11:04.541] next [13:11:04.541] invokeRestart(restart) [13:11:04.541] muffled <- TRUE [13:11:04.541] break [13:11:04.541] } [13:11:04.541] } [13:11:04.541] } [13:11:04.541] invisible(muffled) [13:11:04.541] } [13:11:04.541] muffleCondition(cond, pattern = "^muffle") [13:11:04.541] } [13:11:04.541] } [13:11:04.541] else { [13:11:04.541] if (TRUE) { [13:11:04.541] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.541] { [13:11:04.541] inherits <- base::inherits [13:11:04.541] invokeRestart <- base::invokeRestart [13:11:04.541] is.null <- base::is.null [13:11:04.541] muffled <- FALSE [13:11:04.541] if (inherits(cond, "message")) { [13:11:04.541] muffled <- grepl(pattern, "muffleMessage") [13:11:04.541] if (muffled) [13:11:04.541] invokeRestart("muffleMessage") [13:11:04.541] } [13:11:04.541] else if (inherits(cond, "warning")) { [13:11:04.541] muffled <- grepl(pattern, "muffleWarning") [13:11:04.541] if (muffled) [13:11:04.541] invokeRestart("muffleWarning") [13:11:04.541] } [13:11:04.541] else if (inherits(cond, "condition")) { [13:11:04.541] if (!is.null(pattern)) { [13:11:04.541] computeRestarts <- base::computeRestarts [13:11:04.541] grepl <- base::grepl [13:11:04.541] restarts <- computeRestarts(cond) [13:11:04.541] for (restart in restarts) { [13:11:04.541] name <- restart$name [13:11:04.541] if (is.null(name)) [13:11:04.541] next [13:11:04.541] if (!grepl(pattern, name)) [13:11:04.541] next [13:11:04.541] invokeRestart(restart) [13:11:04.541] muffled <- TRUE [13:11:04.541] break [13:11:04.541] } [13:11:04.541] } [13:11:04.541] } [13:11:04.541] invisible(muffled) [13:11:04.541] } [13:11:04.541] muffleCondition(cond, pattern = "^muffle") [13:11:04.541] } [13:11:04.541] } [13:11:04.541] } [13:11:04.541] })) [13:11:04.541] }, error = function(ex) { [13:11:04.541] base::structure(base::list(value = NULL, visible = NULL, [13:11:04.541] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.541] ...future.rng), started = ...future.startTime, [13:11:04.541] finished = Sys.time(), session_uuid = NA_character_, [13:11:04.541] version = "1.8"), class = "FutureResult") [13:11:04.541] }, finally = { [13:11:04.541] if (!identical(...future.workdir, getwd())) [13:11:04.541] setwd(...future.workdir) [13:11:04.541] { [13:11:04.541] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:04.541] ...future.oldOptions$nwarnings <- NULL [13:11:04.541] } [13:11:04.541] base::options(...future.oldOptions) [13:11:04.541] if (.Platform$OS.type == "windows") { [13:11:04.541] old_names <- names(...future.oldEnvVars) [13:11:04.541] envs <- base::Sys.getenv() [13:11:04.541] names <- names(envs) [13:11:04.541] common <- intersect(names, old_names) [13:11:04.541] added <- setdiff(names, old_names) [13:11:04.541] removed <- setdiff(old_names, names) [13:11:04.541] changed <- common[...future.oldEnvVars[common] != [13:11:04.541] envs[common]] [13:11:04.541] NAMES <- toupper(changed) [13:11:04.541] args <- list() [13:11:04.541] for (kk in seq_along(NAMES)) { [13:11:04.541] name <- changed[[kk]] [13:11:04.541] NAME <- NAMES[[kk]] [13:11:04.541] if (name != NAME && is.element(NAME, old_names)) [13:11:04.541] next [13:11:04.541] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.541] } [13:11:04.541] NAMES <- toupper(added) [13:11:04.541] for (kk in seq_along(NAMES)) { [13:11:04.541] name <- added[[kk]] [13:11:04.541] NAME <- NAMES[[kk]] [13:11:04.541] if (name != NAME && is.element(NAME, old_names)) [13:11:04.541] next [13:11:04.541] args[[name]] <- "" [13:11:04.541] } [13:11:04.541] NAMES <- toupper(removed) [13:11:04.541] for (kk in seq_along(NAMES)) { [13:11:04.541] name <- removed[[kk]] [13:11:04.541] NAME <- NAMES[[kk]] [13:11:04.541] if (name != NAME && is.element(NAME, old_names)) [13:11:04.541] next [13:11:04.541] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.541] } [13:11:04.541] if (length(args) > 0) [13:11:04.541] base::do.call(base::Sys.setenv, args = args) [13:11:04.541] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:04.541] } [13:11:04.541] else { [13:11:04.541] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:04.541] } [13:11:04.541] { [13:11:04.541] if (base::length(...future.futureOptionsAdded) > [13:11:04.541] 0L) { [13:11:04.541] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:04.541] base::names(opts) <- ...future.futureOptionsAdded [13:11:04.541] base::options(opts) [13:11:04.541] } [13:11:04.541] { [13:11:04.541] NULL [13:11:04.541] options(future.plan = NULL) [13:11:04.541] if (is.na(NA_character_)) [13:11:04.541] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.541] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:04.541] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:04.541] .init = FALSE) [13:11:04.541] } [13:11:04.541] } [13:11:04.541] } [13:11:04.541] }) [13:11:04.541] if (TRUE) { [13:11:04.541] base::sink(type = "output", split = FALSE) [13:11:04.541] if (TRUE) { [13:11:04.541] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:04.541] } [13:11:04.541] else { [13:11:04.541] ...future.result["stdout"] <- base::list(NULL) [13:11:04.541] } [13:11:04.541] base::close(...future.stdout) [13:11:04.541] ...future.stdout <- NULL [13:11:04.541] } [13:11:04.541] ...future.result$conditions <- ...future.conditions [13:11:04.541] ...future.result$finished <- base::Sys.time() [13:11:04.541] ...future.result [13:11:04.541] } [13:11:04.545] - Launch lazy future ... done [13:11:04.545] run() for 'MiraiFuture' ... done Call: lm(formula = dist ~ . + 0, data = cars) Coefficients: speed 2.909 [13:11:04.552] - Globals - lm(, data = cars) ... Call: lm(formula = dist ~ speed + speed^2, data = cars) Coefficients: (Intercept) speed -17.579 3.932 [13:11:04.553] getGlobalsAndPackages() ... [13:11:04.554] Searching for globals... [13:11:04.556] - globals found: [8] '{', 'lm', 'dist', '+', 'speed', '^', '~', 'cars' [13:11:04.556] Searching for globals ... DONE [13:11:04.556] Resolving globals: FALSE [13:11:04.557] [13:11:04.557] - packages: [2] 'stats', 'datasets' [13:11:04.557] getGlobalsAndPackages() ... DONE [13:11:04.557] run() for 'Future' ... [13:11:04.558] - state: 'created' [13:11:04.558] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:04.560] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:04.560] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:04.560] - Field: 'label' [13:11:04.561] - Field: 'local' [13:11:04.561] - Field: 'owner' [13:11:04.561] - Field: 'envir' [13:11:04.561] - Field: 'packages' [13:11:04.561] - Field: 'gc' [13:11:04.561] - Field: 'conditions' [13:11:04.562] - Field: 'expr' [13:11:04.562] - Field: 'uuid' [13:11:04.562] - Field: 'seed' [13:11:04.562] - Field: 'version' [13:11:04.562] - Field: 'result' [13:11:04.562] - Field: 'asynchronous' [13:11:04.563] - Field: 'calls' [13:11:04.563] - Field: 'globals' [13:11:04.563] - Field: 'stdout' [13:11:04.563] - Field: 'earlySignal' [13:11:04.563] - Field: 'lazy' [13:11:04.563] - Field: 'state' [13:11:04.564] - Field: '.cluster' [13:11:04.564] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:04.564] - Launch lazy future ... [13:11:04.564] Packages needed by the future expression (n = 2): 'stats', 'datasets' [13:11:04.564] Packages needed by future strategies (n = 0): [13:11:04.565] { [13:11:04.565] { [13:11:04.565] { [13:11:04.565] ...future.startTime <- base::Sys.time() [13:11:04.565] { [13:11:04.565] { [13:11:04.565] { [13:11:04.565] { [13:11:04.565] base::local({ [13:11:04.565] has_future <- base::requireNamespace("future", [13:11:04.565] quietly = TRUE) [13:11:04.565] if (has_future) { [13:11:04.565] ns <- base::getNamespace("future") [13:11:04.565] version <- ns[[".package"]][["version"]] [13:11:04.565] if (is.null(version)) [13:11:04.565] version <- utils::packageVersion("future") [13:11:04.565] } [13:11:04.565] else { [13:11:04.565] version <- NULL [13:11:04.565] } [13:11:04.565] if (!has_future || version < "1.8.0") { [13:11:04.565] info <- base::c(r_version = base::gsub("R version ", [13:11:04.565] "", base::R.version$version.string), [13:11:04.565] platform = base::sprintf("%s (%s-bit)", [13:11:04.565] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:04.565] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:04.565] "release", "version")], collapse = " "), [13:11:04.565] hostname = base::Sys.info()[["nodename"]]) [13:11:04.565] info <- base::sprintf("%s: %s", base::names(info), [13:11:04.565] info) [13:11:04.565] info <- base::paste(info, collapse = "; ") [13:11:04.565] if (!has_future) { [13:11:04.565] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:04.565] info) [13:11:04.565] } [13:11:04.565] else { [13:11:04.565] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:04.565] info, version) [13:11:04.565] } [13:11:04.565] base::stop(msg) [13:11:04.565] } [13:11:04.565] }) [13:11:04.565] } [13:11:04.565] base::local({ [13:11:04.565] for (pkg in c("stats", "datasets")) { [13:11:04.565] base::loadNamespace(pkg) [13:11:04.565] base::library(pkg, character.only = TRUE) [13:11:04.565] } [13:11:04.565] }) [13:11:04.565] } [13:11:04.565] ...future.strategy.old <- future::plan("list") [13:11:04.565] options(future.plan = NULL) [13:11:04.565] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.565] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:04.565] } [13:11:04.565] ...future.workdir <- getwd() [13:11:04.565] } [13:11:04.565] ...future.oldOptions <- base::as.list(base::.Options) [13:11:04.565] ...future.oldEnvVars <- base::Sys.getenv() [13:11:04.565] } [13:11:04.565] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:04.565] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:04.565] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:04.565] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:04.565] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:04.565] future.stdout.windows.reencode = NULL, width = 80L) [13:11:04.565] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:04.565] base::names(...future.oldOptions)) [13:11:04.565] } [13:11:04.565] if (FALSE) { [13:11:04.565] } [13:11:04.565] else { [13:11:04.565] if (TRUE) { [13:11:04.565] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:04.565] open = "w") [13:11:04.565] } [13:11:04.565] else { [13:11:04.565] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:04.565] windows = "NUL", "/dev/null"), open = "w") [13:11:04.565] } [13:11:04.565] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:04.565] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:04.565] base::sink(type = "output", split = FALSE) [13:11:04.565] base::close(...future.stdout) [13:11:04.565] }, add = TRUE) [13:11:04.565] } [13:11:04.565] ...future.frame <- base::sys.nframe() [13:11:04.565] ...future.conditions <- base::list() [13:11:04.565] ...future.rng <- base::globalenv()$.Random.seed [13:11:04.565] if (FALSE) { [13:11:04.565] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:04.565] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:04.565] } [13:11:04.565] ...future.result <- base::tryCatch({ [13:11:04.565] base::withCallingHandlers({ [13:11:04.565] ...future.value <- base::withVisible(base::local({ [13:11:04.565] lm(dist ~ speed + speed^2, data = cars) [13:11:04.565] })) [13:11:04.565] future::FutureResult(value = ...future.value$value, [13:11:04.565] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.565] ...future.rng), globalenv = if (FALSE) [13:11:04.565] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:04.565] ...future.globalenv.names)) [13:11:04.565] else NULL, started = ...future.startTime, version = "1.8") [13:11:04.565] }, condition = base::local({ [13:11:04.565] c <- base::c [13:11:04.565] inherits <- base::inherits [13:11:04.565] invokeRestart <- base::invokeRestart [13:11:04.565] length <- base::length [13:11:04.565] list <- base::list [13:11:04.565] seq.int <- base::seq.int [13:11:04.565] signalCondition <- base::signalCondition [13:11:04.565] sys.calls <- base::sys.calls [13:11:04.565] `[[` <- base::`[[` [13:11:04.565] `+` <- base::`+` [13:11:04.565] `<<-` <- base::`<<-` [13:11:04.565] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:04.565] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:04.565] 3L)] [13:11:04.565] } [13:11:04.565] function(cond) { [13:11:04.565] is_error <- inherits(cond, "error") [13:11:04.565] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:04.565] NULL) [13:11:04.565] if (is_error) { [13:11:04.565] sessionInformation <- function() { [13:11:04.565] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:04.565] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:04.565] search = base::search(), system = base::Sys.info()) [13:11:04.565] } [13:11:04.565] ...future.conditions[[length(...future.conditions) + [13:11:04.565] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:04.565] cond$call), session = sessionInformation(), [13:11:04.565] timestamp = base::Sys.time(), signaled = 0L) [13:11:04.565] signalCondition(cond) [13:11:04.565] } [13:11:04.565] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:04.565] signal <- FALSE && inherits(cond, character(0)) [13:11:04.565] ...future.conditions[[length(...future.conditions) + [13:11:04.565] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:04.565] if (FALSE && !signal) { [13:11:04.565] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.565] { [13:11:04.565] inherits <- base::inherits [13:11:04.565] invokeRestart <- base::invokeRestart [13:11:04.565] is.null <- base::is.null [13:11:04.565] muffled <- FALSE [13:11:04.565] if (inherits(cond, "message")) { [13:11:04.565] muffled <- grepl(pattern, "muffleMessage") [13:11:04.565] if (muffled) [13:11:04.565] invokeRestart("muffleMessage") [13:11:04.565] } [13:11:04.565] else if (inherits(cond, "warning")) { [13:11:04.565] muffled <- grepl(pattern, "muffleWarning") [13:11:04.565] if (muffled) [13:11:04.565] invokeRestart("muffleWarning") [13:11:04.565] } [13:11:04.565] else if (inherits(cond, "condition")) { [13:11:04.565] if (!is.null(pattern)) { [13:11:04.565] computeRestarts <- base::computeRestarts [13:11:04.565] grepl <- base::grepl [13:11:04.565] restarts <- computeRestarts(cond) [13:11:04.565] for (restart in restarts) { [13:11:04.565] name <- restart$name [13:11:04.565] if (is.null(name)) [13:11:04.565] next [13:11:04.565] if (!grepl(pattern, name)) [13:11:04.565] next [13:11:04.565] invokeRestart(restart) [13:11:04.565] muffled <- TRUE [13:11:04.565] break [13:11:04.565] } [13:11:04.565] } [13:11:04.565] } [13:11:04.565] invisible(muffled) [13:11:04.565] } [13:11:04.565] muffleCondition(cond, pattern = "^muffle") [13:11:04.565] } [13:11:04.565] } [13:11:04.565] else { [13:11:04.565] if (TRUE) { [13:11:04.565] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.565] { [13:11:04.565] inherits <- base::inherits [13:11:04.565] invokeRestart <- base::invokeRestart [13:11:04.565] is.null <- base::is.null [13:11:04.565] muffled <- FALSE [13:11:04.565] if (inherits(cond, "message")) { [13:11:04.565] muffled <- grepl(pattern, "muffleMessage") [13:11:04.565] if (muffled) [13:11:04.565] invokeRestart("muffleMessage") [13:11:04.565] } [13:11:04.565] else if (inherits(cond, "warning")) { [13:11:04.565] muffled <- grepl(pattern, "muffleWarning") [13:11:04.565] if (muffled) [13:11:04.565] invokeRestart("muffleWarning") [13:11:04.565] } [13:11:04.565] else if (inherits(cond, "condition")) { [13:11:04.565] if (!is.null(pattern)) { [13:11:04.565] computeRestarts <- base::computeRestarts [13:11:04.565] grepl <- base::grepl [13:11:04.565] restarts <- computeRestarts(cond) [13:11:04.565] for (restart in restarts) { [13:11:04.565] name <- restart$name [13:11:04.565] if (is.null(name)) [13:11:04.565] next [13:11:04.565] if (!grepl(pattern, name)) [13:11:04.565] next [13:11:04.565] invokeRestart(restart) [13:11:04.565] muffled <- TRUE [13:11:04.565] break [13:11:04.565] } [13:11:04.565] } [13:11:04.565] } [13:11:04.565] invisible(muffled) [13:11:04.565] } [13:11:04.565] muffleCondition(cond, pattern = "^muffle") [13:11:04.565] } [13:11:04.565] } [13:11:04.565] } [13:11:04.565] })) [13:11:04.565] }, error = function(ex) { [13:11:04.565] base::structure(base::list(value = NULL, visible = NULL, [13:11:04.565] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.565] ...future.rng), started = ...future.startTime, [13:11:04.565] finished = Sys.time(), session_uuid = NA_character_, [13:11:04.565] version = "1.8"), class = "FutureResult") [13:11:04.565] }, finally = { [13:11:04.565] if (!identical(...future.workdir, getwd())) [13:11:04.565] setwd(...future.workdir) [13:11:04.565] { [13:11:04.565] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:04.565] ...future.oldOptions$nwarnings <- NULL [13:11:04.565] } [13:11:04.565] base::options(...future.oldOptions) [13:11:04.565] if (.Platform$OS.type == "windows") { [13:11:04.565] old_names <- names(...future.oldEnvVars) [13:11:04.565] envs <- base::Sys.getenv() [13:11:04.565] names <- names(envs) [13:11:04.565] common <- intersect(names, old_names) [13:11:04.565] added <- setdiff(names, old_names) [13:11:04.565] removed <- setdiff(old_names, names) [13:11:04.565] changed <- common[...future.oldEnvVars[common] != [13:11:04.565] envs[common]] [13:11:04.565] NAMES <- toupper(changed) [13:11:04.565] args <- list() [13:11:04.565] for (kk in seq_along(NAMES)) { [13:11:04.565] name <- changed[[kk]] [13:11:04.565] NAME <- NAMES[[kk]] [13:11:04.565] if (name != NAME && is.element(NAME, old_names)) [13:11:04.565] next [13:11:04.565] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.565] } [13:11:04.565] NAMES <- toupper(added) [13:11:04.565] for (kk in seq_along(NAMES)) { [13:11:04.565] name <- added[[kk]] [13:11:04.565] NAME <- NAMES[[kk]] [13:11:04.565] if (name != NAME && is.element(NAME, old_names)) [13:11:04.565] next [13:11:04.565] args[[name]] <- "" [13:11:04.565] } [13:11:04.565] NAMES <- toupper(removed) [13:11:04.565] for (kk in seq_along(NAMES)) { [13:11:04.565] name <- removed[[kk]] [13:11:04.565] NAME <- NAMES[[kk]] [13:11:04.565] if (name != NAME && is.element(NAME, old_names)) [13:11:04.565] next [13:11:04.565] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.565] } [13:11:04.565] if (length(args) > 0) [13:11:04.565] base::do.call(base::Sys.setenv, args = args) [13:11:04.565] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:04.565] } [13:11:04.565] else { [13:11:04.565] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:04.565] } [13:11:04.565] { [13:11:04.565] if (base::length(...future.futureOptionsAdded) > [13:11:04.565] 0L) { [13:11:04.565] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:04.565] base::names(opts) <- ...future.futureOptionsAdded [13:11:04.565] base::options(opts) [13:11:04.565] } [13:11:04.565] { [13:11:04.565] NULL [13:11:04.565] options(future.plan = NULL) [13:11:04.565] if (is.na(NA_character_)) [13:11:04.565] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.565] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:04.565] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:04.565] .init = FALSE) [13:11:04.565] } [13:11:04.565] } [13:11:04.565] } [13:11:04.565] }) [13:11:04.565] if (TRUE) { [13:11:04.565] base::sink(type = "output", split = FALSE) [13:11:04.565] if (TRUE) { [13:11:04.565] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:04.565] } [13:11:04.565] else { [13:11:04.565] ...future.result["stdout"] <- base::list(NULL) [13:11:04.565] } [13:11:04.565] base::close(...future.stdout) [13:11:04.565] ...future.stdout <- NULL [13:11:04.565] } [13:11:04.565] ...future.result$conditions <- ...future.conditions [13:11:04.565] ...future.result$finished <- base::Sys.time() [13:11:04.565] ...future.result [13:11:04.565] } [13:11:04.569] - Launch lazy future ... done [13:11:04.569] run() for 'MiraiFuture' ... done Call: lm(formula = dist ~ speed + speed^2, data = cars) Coefficients: (Intercept) speed -17.579 3.932 [13:11:04.574] - 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:11:04.576] getGlobalsAndPackages() ... [13:11:04.576] Searching for globals... [13:11:04.579] - globals found: [9] '{', 'lm', 'dist', '+', 'speed', 'I', '^', '~', 'cars' [13:11:04.579] Searching for globals ... DONE [13:11:04.580] Resolving globals: FALSE [13:11:04.580] [13:11:04.580] - packages: [2] 'stats', 'datasets' [13:11:04.581] getGlobalsAndPackages() ... DONE [13:11:04.581] run() for 'Future' ... [13:11:04.581] - state: 'created' [13:11:04.581] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:04.584] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:04.584] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:04.584] - Field: 'label' [13:11:04.584] - Field: 'local' [13:11:04.584] - Field: 'owner' [13:11:04.585] - Field: 'envir' [13:11:04.585] - Field: 'packages' [13:11:04.585] - Field: 'gc' [13:11:04.585] - Field: 'conditions' [13:11:04.585] - Field: 'expr' [13:11:04.585] - Field: 'uuid' [13:11:04.586] - Field: 'seed' [13:11:04.586] - Field: 'version' [13:11:04.586] - Field: 'result' [13:11:04.586] - Field: 'asynchronous' [13:11:04.586] - Field: 'calls' [13:11:04.586] - Field: 'globals' [13:11:04.587] - Field: 'stdout' [13:11:04.587] - Field: 'earlySignal' [13:11:04.587] - Field: 'lazy' [13:11:04.587] - Field: 'state' [13:11:04.587] - Field: '.cluster' [13:11:04.587] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:04.588] - Launch lazy future ... [13:11:04.588] Packages needed by the future expression (n = 2): 'stats', 'datasets' [13:11:04.588] Packages needed by future strategies (n = 0): [13:11:04.589] { [13:11:04.589] { [13:11:04.589] { [13:11:04.589] ...future.startTime <- base::Sys.time() [13:11:04.589] { [13:11:04.589] { [13:11:04.589] { [13:11:04.589] { [13:11:04.589] base::local({ [13:11:04.589] has_future <- base::requireNamespace("future", [13:11:04.589] quietly = TRUE) [13:11:04.589] if (has_future) { [13:11:04.589] ns <- base::getNamespace("future") [13:11:04.589] version <- ns[[".package"]][["version"]] [13:11:04.589] if (is.null(version)) [13:11:04.589] version <- utils::packageVersion("future") [13:11:04.589] } [13:11:04.589] else { [13:11:04.589] version <- NULL [13:11:04.589] } [13:11:04.589] if (!has_future || version < "1.8.0") { [13:11:04.589] info <- base::c(r_version = base::gsub("R version ", [13:11:04.589] "", base::R.version$version.string), [13:11:04.589] platform = base::sprintf("%s (%s-bit)", [13:11:04.589] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:04.589] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:04.589] "release", "version")], collapse = " "), [13:11:04.589] hostname = base::Sys.info()[["nodename"]]) [13:11:04.589] info <- base::sprintf("%s: %s", base::names(info), [13:11:04.589] info) [13:11:04.589] info <- base::paste(info, collapse = "; ") [13:11:04.589] if (!has_future) { [13:11:04.589] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:04.589] info) [13:11:04.589] } [13:11:04.589] else { [13:11:04.589] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:04.589] info, version) [13:11:04.589] } [13:11:04.589] base::stop(msg) [13:11:04.589] } [13:11:04.589] }) [13:11:04.589] } [13:11:04.589] base::local({ [13:11:04.589] for (pkg in c("stats", "datasets")) { [13:11:04.589] base::loadNamespace(pkg) [13:11:04.589] base::library(pkg, character.only = TRUE) [13:11:04.589] } [13:11:04.589] }) [13:11:04.589] } [13:11:04.589] ...future.strategy.old <- future::plan("list") [13:11:04.589] options(future.plan = NULL) [13:11:04.589] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.589] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:04.589] } [13:11:04.589] ...future.workdir <- getwd() [13:11:04.589] } [13:11:04.589] ...future.oldOptions <- base::as.list(base::.Options) [13:11:04.589] ...future.oldEnvVars <- base::Sys.getenv() [13:11:04.589] } [13:11:04.589] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:04.589] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:04.589] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:04.589] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:04.589] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:04.589] future.stdout.windows.reencode = NULL, width = 80L) [13:11:04.589] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:04.589] base::names(...future.oldOptions)) [13:11:04.589] } [13:11:04.589] if (FALSE) { [13:11:04.589] } [13:11:04.589] else { [13:11:04.589] if (TRUE) { [13:11:04.589] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:04.589] open = "w") [13:11:04.589] } [13:11:04.589] else { [13:11:04.589] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:04.589] windows = "NUL", "/dev/null"), open = "w") [13:11:04.589] } [13:11:04.589] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:04.589] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:04.589] base::sink(type = "output", split = FALSE) [13:11:04.589] base::close(...future.stdout) [13:11:04.589] }, add = TRUE) [13:11:04.589] } [13:11:04.589] ...future.frame <- base::sys.nframe() [13:11:04.589] ...future.conditions <- base::list() [13:11:04.589] ...future.rng <- base::globalenv()$.Random.seed [13:11:04.589] if (FALSE) { [13:11:04.589] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:04.589] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:04.589] } [13:11:04.589] ...future.result <- base::tryCatch({ [13:11:04.589] base::withCallingHandlers({ [13:11:04.589] ...future.value <- base::withVisible(base::local({ [13:11:04.589] lm(dist ~ speed + I(speed^2), data = cars) [13:11:04.589] })) [13:11:04.589] future::FutureResult(value = ...future.value$value, [13:11:04.589] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.589] ...future.rng), globalenv = if (FALSE) [13:11:04.589] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:04.589] ...future.globalenv.names)) [13:11:04.589] else NULL, started = ...future.startTime, version = "1.8") [13:11:04.589] }, condition = base::local({ [13:11:04.589] c <- base::c [13:11:04.589] inherits <- base::inherits [13:11:04.589] invokeRestart <- base::invokeRestart [13:11:04.589] length <- base::length [13:11:04.589] list <- base::list [13:11:04.589] seq.int <- base::seq.int [13:11:04.589] signalCondition <- base::signalCondition [13:11:04.589] sys.calls <- base::sys.calls [13:11:04.589] `[[` <- base::`[[` [13:11:04.589] `+` <- base::`+` [13:11:04.589] `<<-` <- base::`<<-` [13:11:04.589] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:04.589] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:04.589] 3L)] [13:11:04.589] } [13:11:04.589] function(cond) { [13:11:04.589] is_error <- inherits(cond, "error") [13:11:04.589] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:04.589] NULL) [13:11:04.589] if (is_error) { [13:11:04.589] sessionInformation <- function() { [13:11:04.589] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:04.589] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:04.589] search = base::search(), system = base::Sys.info()) [13:11:04.589] } [13:11:04.589] ...future.conditions[[length(...future.conditions) + [13:11:04.589] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:04.589] cond$call), session = sessionInformation(), [13:11:04.589] timestamp = base::Sys.time(), signaled = 0L) [13:11:04.589] signalCondition(cond) [13:11:04.589] } [13:11:04.589] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:04.589] signal <- FALSE && inherits(cond, character(0)) [13:11:04.589] ...future.conditions[[length(...future.conditions) + [13:11:04.589] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:04.589] if (FALSE && !signal) { [13:11:04.589] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.589] { [13:11:04.589] inherits <- base::inherits [13:11:04.589] invokeRestart <- base::invokeRestart [13:11:04.589] is.null <- base::is.null [13:11:04.589] muffled <- FALSE [13:11:04.589] if (inherits(cond, "message")) { [13:11:04.589] muffled <- grepl(pattern, "muffleMessage") [13:11:04.589] if (muffled) [13:11:04.589] invokeRestart("muffleMessage") [13:11:04.589] } [13:11:04.589] else if (inherits(cond, "warning")) { [13:11:04.589] muffled <- grepl(pattern, "muffleWarning") [13:11:04.589] if (muffled) [13:11:04.589] invokeRestart("muffleWarning") [13:11:04.589] } [13:11:04.589] else if (inherits(cond, "condition")) { [13:11:04.589] if (!is.null(pattern)) { [13:11:04.589] computeRestarts <- base::computeRestarts [13:11:04.589] grepl <- base::grepl [13:11:04.589] restarts <- computeRestarts(cond) [13:11:04.589] for (restart in restarts) { [13:11:04.589] name <- restart$name [13:11:04.589] if (is.null(name)) [13:11:04.589] next [13:11:04.589] if (!grepl(pattern, name)) [13:11:04.589] next [13:11:04.589] invokeRestart(restart) [13:11:04.589] muffled <- TRUE [13:11:04.589] break [13:11:04.589] } [13:11:04.589] } [13:11:04.589] } [13:11:04.589] invisible(muffled) [13:11:04.589] } [13:11:04.589] muffleCondition(cond, pattern = "^muffle") [13:11:04.589] } [13:11:04.589] } [13:11:04.589] else { [13:11:04.589] if (TRUE) { [13:11:04.589] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.589] { [13:11:04.589] inherits <- base::inherits [13:11:04.589] invokeRestart <- base::invokeRestart [13:11:04.589] is.null <- base::is.null [13:11:04.589] muffled <- FALSE [13:11:04.589] if (inherits(cond, "message")) { [13:11:04.589] muffled <- grepl(pattern, "muffleMessage") [13:11:04.589] if (muffled) [13:11:04.589] invokeRestart("muffleMessage") [13:11:04.589] } [13:11:04.589] else if (inherits(cond, "warning")) { [13:11:04.589] muffled <- grepl(pattern, "muffleWarning") [13:11:04.589] if (muffled) [13:11:04.589] invokeRestart("muffleWarning") [13:11:04.589] } [13:11:04.589] else if (inherits(cond, "condition")) { [13:11:04.589] if (!is.null(pattern)) { [13:11:04.589] computeRestarts <- base::computeRestarts [13:11:04.589] grepl <- base::grepl [13:11:04.589] restarts <- computeRestarts(cond) [13:11:04.589] for (restart in restarts) { [13:11:04.589] name <- restart$name [13:11:04.589] if (is.null(name)) [13:11:04.589] next [13:11:04.589] if (!grepl(pattern, name)) [13:11:04.589] next [13:11:04.589] invokeRestart(restart) [13:11:04.589] muffled <- TRUE [13:11:04.589] break [13:11:04.589] } [13:11:04.589] } [13:11:04.589] } [13:11:04.589] invisible(muffled) [13:11:04.589] } [13:11:04.589] muffleCondition(cond, pattern = "^muffle") [13:11:04.589] } [13:11:04.589] } [13:11:04.589] } [13:11:04.589] })) [13:11:04.589] }, error = function(ex) { [13:11:04.589] base::structure(base::list(value = NULL, visible = NULL, [13:11:04.589] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.589] ...future.rng), started = ...future.startTime, [13:11:04.589] finished = Sys.time(), session_uuid = NA_character_, [13:11:04.589] version = "1.8"), class = "FutureResult") [13:11:04.589] }, finally = { [13:11:04.589] if (!identical(...future.workdir, getwd())) [13:11:04.589] setwd(...future.workdir) [13:11:04.589] { [13:11:04.589] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:04.589] ...future.oldOptions$nwarnings <- NULL [13:11:04.589] } [13:11:04.589] base::options(...future.oldOptions) [13:11:04.589] if (.Platform$OS.type == "windows") { [13:11:04.589] old_names <- names(...future.oldEnvVars) [13:11:04.589] envs <- base::Sys.getenv() [13:11:04.589] names <- names(envs) [13:11:04.589] common <- intersect(names, old_names) [13:11:04.589] added <- setdiff(names, old_names) [13:11:04.589] removed <- setdiff(old_names, names) [13:11:04.589] changed <- common[...future.oldEnvVars[common] != [13:11:04.589] envs[common]] [13:11:04.589] NAMES <- toupper(changed) [13:11:04.589] args <- list() [13:11:04.589] for (kk in seq_along(NAMES)) { [13:11:04.589] name <- changed[[kk]] [13:11:04.589] NAME <- NAMES[[kk]] [13:11:04.589] if (name != NAME && is.element(NAME, old_names)) [13:11:04.589] next [13:11:04.589] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.589] } [13:11:04.589] NAMES <- toupper(added) [13:11:04.589] for (kk in seq_along(NAMES)) { [13:11:04.589] name <- added[[kk]] [13:11:04.589] NAME <- NAMES[[kk]] [13:11:04.589] if (name != NAME && is.element(NAME, old_names)) [13:11:04.589] next [13:11:04.589] args[[name]] <- "" [13:11:04.589] } [13:11:04.589] NAMES <- toupper(removed) [13:11:04.589] for (kk in seq_along(NAMES)) { [13:11:04.589] name <- removed[[kk]] [13:11:04.589] NAME <- NAMES[[kk]] [13:11:04.589] if (name != NAME && is.element(NAME, old_names)) [13:11:04.589] next [13:11:04.589] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.589] } [13:11:04.589] if (length(args) > 0) [13:11:04.589] base::do.call(base::Sys.setenv, args = args) [13:11:04.589] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:04.589] } [13:11:04.589] else { [13:11:04.589] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:04.589] } [13:11:04.589] { [13:11:04.589] if (base::length(...future.futureOptionsAdded) > [13:11:04.589] 0L) { [13:11:04.589] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:04.589] base::names(opts) <- ...future.futureOptionsAdded [13:11:04.589] base::options(opts) [13:11:04.589] } [13:11:04.589] { [13:11:04.589] NULL [13:11:04.589] options(future.plan = NULL) [13:11:04.589] if (is.na(NA_character_)) [13:11:04.589] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.589] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:04.589] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:04.589] .init = FALSE) [13:11:04.589] } [13:11:04.589] } [13:11:04.589] } [13:11:04.589] }) [13:11:04.589] if (TRUE) { [13:11:04.589] base::sink(type = "output", split = FALSE) [13:11:04.589] if (TRUE) { [13:11:04.589] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:04.589] } [13:11:04.589] else { [13:11:04.589] ...future.result["stdout"] <- base::list(NULL) [13:11:04.589] } [13:11:04.589] base::close(...future.stdout) [13:11:04.589] ...future.stdout <- NULL [13:11:04.589] } [13:11:04.589] ...future.result$conditions <- ...future.conditions [13:11:04.589] ...future.result$finished <- base::Sys.time() [13:11:04.589] ...future.result [13:11:04.589] } [13:11:04.593] - Launch lazy future ... done [13:11:04.593] 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:11:04.602] - 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:11:04.604] getGlobalsAndPackages() ... [13:11:04.604] Searching for globals... [13:11:04.606] - globals found: [7] '{', 'lm', 'dist', 'poly', 'speed', '~', 'cars' [13:11:04.606] Searching for globals ... DONE [13:11:04.606] Resolving globals: FALSE [13:11:04.607] [13:11:04.607] - packages: [2] 'stats', 'datasets' [13:11:04.607] getGlobalsAndPackages() ... DONE [13:11:04.608] run() for 'Future' ... [13:11:04.608] - state: 'created' [13:11:04.608] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:04.634] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:04.634] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:04.634] - Field: 'label' [13:11:04.634] - Field: 'local' [13:11:04.635] - Field: 'owner' [13:11:04.635] - Field: 'envir' [13:11:04.635] - Field: 'packages' [13:11:04.635] - Field: 'gc' [13:11:04.635] - Field: 'conditions' [13:11:04.636] - Field: 'expr' [13:11:04.636] - Field: 'uuid' [13:11:04.636] - Field: 'seed' [13:11:04.636] - Field: 'version' [13:11:04.636] - Field: 'result' [13:11:04.636] - Field: 'asynchronous' [13:11:04.637] - Field: 'calls' [13:11:04.637] - Field: 'globals' [13:11:04.637] - Field: 'stdout' [13:11:04.637] - Field: 'earlySignal' [13:11:04.637] - Field: 'lazy' [13:11:04.638] - Field: 'state' [13:11:04.638] - Field: '.cluster' [13:11:04.638] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:04.638] - Launch lazy future ... [13:11:04.638] Packages needed by the future expression (n = 2): 'stats', 'datasets' [13:11:04.638] Packages needed by future strategies (n = 0): [13:11:04.639] { [13:11:04.639] { [13:11:04.639] { [13:11:04.639] ...future.startTime <- base::Sys.time() [13:11:04.639] { [13:11:04.639] { [13:11:04.639] { [13:11:04.639] { [13:11:04.639] base::local({ [13:11:04.639] has_future <- base::requireNamespace("future", [13:11:04.639] quietly = TRUE) [13:11:04.639] if (has_future) { [13:11:04.639] ns <- base::getNamespace("future") [13:11:04.639] version <- ns[[".package"]][["version"]] [13:11:04.639] if (is.null(version)) [13:11:04.639] version <- utils::packageVersion("future") [13:11:04.639] } [13:11:04.639] else { [13:11:04.639] version <- NULL [13:11:04.639] } [13:11:04.639] if (!has_future || version < "1.8.0") { [13:11:04.639] info <- base::c(r_version = base::gsub("R version ", [13:11:04.639] "", base::R.version$version.string), [13:11:04.639] platform = base::sprintf("%s (%s-bit)", [13:11:04.639] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:04.639] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:04.639] "release", "version")], collapse = " "), [13:11:04.639] hostname = base::Sys.info()[["nodename"]]) [13:11:04.639] info <- base::sprintf("%s: %s", base::names(info), [13:11:04.639] info) [13:11:04.639] info <- base::paste(info, collapse = "; ") [13:11:04.639] if (!has_future) { [13:11:04.639] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:04.639] info) [13:11:04.639] } [13:11:04.639] else { [13:11:04.639] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:04.639] info, version) [13:11:04.639] } [13:11:04.639] base::stop(msg) [13:11:04.639] } [13:11:04.639] }) [13:11:04.639] } [13:11:04.639] base::local({ [13:11:04.639] for (pkg in c("stats", "datasets")) { [13:11:04.639] base::loadNamespace(pkg) [13:11:04.639] base::library(pkg, character.only = TRUE) [13:11:04.639] } [13:11:04.639] }) [13:11:04.639] } [13:11:04.639] ...future.strategy.old <- future::plan("list") [13:11:04.639] options(future.plan = NULL) [13:11:04.639] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.639] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:04.639] } [13:11:04.639] ...future.workdir <- getwd() [13:11:04.639] } [13:11:04.639] ...future.oldOptions <- base::as.list(base::.Options) [13:11:04.639] ...future.oldEnvVars <- base::Sys.getenv() [13:11:04.639] } [13:11:04.639] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:04.639] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:04.639] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:04.639] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:04.639] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:04.639] future.stdout.windows.reencode = NULL, width = 80L) [13:11:04.639] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:04.639] base::names(...future.oldOptions)) [13:11:04.639] } [13:11:04.639] if (FALSE) { [13:11:04.639] } [13:11:04.639] else { [13:11:04.639] if (TRUE) { [13:11:04.639] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:04.639] open = "w") [13:11:04.639] } [13:11:04.639] else { [13:11:04.639] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:04.639] windows = "NUL", "/dev/null"), open = "w") [13:11:04.639] } [13:11:04.639] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:04.639] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:04.639] base::sink(type = "output", split = FALSE) [13:11:04.639] base::close(...future.stdout) [13:11:04.639] }, add = TRUE) [13:11:04.639] } [13:11:04.639] ...future.frame <- base::sys.nframe() [13:11:04.639] ...future.conditions <- base::list() [13:11:04.639] ...future.rng <- base::globalenv()$.Random.seed [13:11:04.639] if (FALSE) { [13:11:04.639] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:04.639] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:04.639] } [13:11:04.639] ...future.result <- base::tryCatch({ [13:11:04.639] base::withCallingHandlers({ [13:11:04.639] ...future.value <- base::withVisible(base::local({ [13:11:04.639] lm(dist ~ poly(speed, 2), data = cars) [13:11:04.639] })) [13:11:04.639] future::FutureResult(value = ...future.value$value, [13:11:04.639] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.639] ...future.rng), globalenv = if (FALSE) [13:11:04.639] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:04.639] ...future.globalenv.names)) [13:11:04.639] else NULL, started = ...future.startTime, version = "1.8") [13:11:04.639] }, condition = base::local({ [13:11:04.639] c <- base::c [13:11:04.639] inherits <- base::inherits [13:11:04.639] invokeRestart <- base::invokeRestart [13:11:04.639] length <- base::length [13:11:04.639] list <- base::list [13:11:04.639] seq.int <- base::seq.int [13:11:04.639] signalCondition <- base::signalCondition [13:11:04.639] sys.calls <- base::sys.calls [13:11:04.639] `[[` <- base::`[[` [13:11:04.639] `+` <- base::`+` [13:11:04.639] `<<-` <- base::`<<-` [13:11:04.639] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:04.639] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:04.639] 3L)] [13:11:04.639] } [13:11:04.639] function(cond) { [13:11:04.639] is_error <- inherits(cond, "error") [13:11:04.639] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:04.639] NULL) [13:11:04.639] if (is_error) { [13:11:04.639] sessionInformation <- function() { [13:11:04.639] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:04.639] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:04.639] search = base::search(), system = base::Sys.info()) [13:11:04.639] } [13:11:04.639] ...future.conditions[[length(...future.conditions) + [13:11:04.639] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:04.639] cond$call), session = sessionInformation(), [13:11:04.639] timestamp = base::Sys.time(), signaled = 0L) [13:11:04.639] signalCondition(cond) [13:11:04.639] } [13:11:04.639] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:04.639] signal <- FALSE && inherits(cond, character(0)) [13:11:04.639] ...future.conditions[[length(...future.conditions) + [13:11:04.639] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:04.639] if (FALSE && !signal) { [13:11:04.639] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.639] { [13:11:04.639] inherits <- base::inherits [13:11:04.639] invokeRestart <- base::invokeRestart [13:11:04.639] is.null <- base::is.null [13:11:04.639] muffled <- FALSE [13:11:04.639] if (inherits(cond, "message")) { [13:11:04.639] muffled <- grepl(pattern, "muffleMessage") [13:11:04.639] if (muffled) [13:11:04.639] invokeRestart("muffleMessage") [13:11:04.639] } [13:11:04.639] else if (inherits(cond, "warning")) { [13:11:04.639] muffled <- grepl(pattern, "muffleWarning") [13:11:04.639] if (muffled) [13:11:04.639] invokeRestart("muffleWarning") [13:11:04.639] } [13:11:04.639] else if (inherits(cond, "condition")) { [13:11:04.639] if (!is.null(pattern)) { [13:11:04.639] computeRestarts <- base::computeRestarts [13:11:04.639] grepl <- base::grepl [13:11:04.639] restarts <- computeRestarts(cond) [13:11:04.639] for (restart in restarts) { [13:11:04.639] name <- restart$name [13:11:04.639] if (is.null(name)) [13:11:04.639] next [13:11:04.639] if (!grepl(pattern, name)) [13:11:04.639] next [13:11:04.639] invokeRestart(restart) [13:11:04.639] muffled <- TRUE [13:11:04.639] break [13:11:04.639] } [13:11:04.639] } [13:11:04.639] } [13:11:04.639] invisible(muffled) [13:11:04.639] } [13:11:04.639] muffleCondition(cond, pattern = "^muffle") [13:11:04.639] } [13:11:04.639] } [13:11:04.639] else { [13:11:04.639] if (TRUE) { [13:11:04.639] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.639] { [13:11:04.639] inherits <- base::inherits [13:11:04.639] invokeRestart <- base::invokeRestart [13:11:04.639] is.null <- base::is.null [13:11:04.639] muffled <- FALSE [13:11:04.639] if (inherits(cond, "message")) { [13:11:04.639] muffled <- grepl(pattern, "muffleMessage") [13:11:04.639] if (muffled) [13:11:04.639] invokeRestart("muffleMessage") [13:11:04.639] } [13:11:04.639] else if (inherits(cond, "warning")) { [13:11:04.639] muffled <- grepl(pattern, "muffleWarning") [13:11:04.639] if (muffled) [13:11:04.639] invokeRestart("muffleWarning") [13:11:04.639] } [13:11:04.639] else if (inherits(cond, "condition")) { [13:11:04.639] if (!is.null(pattern)) { [13:11:04.639] computeRestarts <- base::computeRestarts [13:11:04.639] grepl <- base::grepl [13:11:04.639] restarts <- computeRestarts(cond) [13:11:04.639] for (restart in restarts) { [13:11:04.639] name <- restart$name [13:11:04.639] if (is.null(name)) [13:11:04.639] next [13:11:04.639] if (!grepl(pattern, name)) [13:11:04.639] next [13:11:04.639] invokeRestart(restart) [13:11:04.639] muffled <- TRUE [13:11:04.639] break [13:11:04.639] } [13:11:04.639] } [13:11:04.639] } [13:11:04.639] invisible(muffled) [13:11:04.639] } [13:11:04.639] muffleCondition(cond, pattern = "^muffle") [13:11:04.639] } [13:11:04.639] } [13:11:04.639] } [13:11:04.639] })) [13:11:04.639] }, error = function(ex) { [13:11:04.639] base::structure(base::list(value = NULL, visible = NULL, [13:11:04.639] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.639] ...future.rng), started = ...future.startTime, [13:11:04.639] finished = Sys.time(), session_uuid = NA_character_, [13:11:04.639] version = "1.8"), class = "FutureResult") [13:11:04.639] }, finally = { [13:11:04.639] if (!identical(...future.workdir, getwd())) [13:11:04.639] setwd(...future.workdir) [13:11:04.639] { [13:11:04.639] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:04.639] ...future.oldOptions$nwarnings <- NULL [13:11:04.639] } [13:11:04.639] base::options(...future.oldOptions) [13:11:04.639] if (.Platform$OS.type == "windows") { [13:11:04.639] old_names <- names(...future.oldEnvVars) [13:11:04.639] envs <- base::Sys.getenv() [13:11:04.639] names <- names(envs) [13:11:04.639] common <- intersect(names, old_names) [13:11:04.639] added <- setdiff(names, old_names) [13:11:04.639] removed <- setdiff(old_names, names) [13:11:04.639] changed <- common[...future.oldEnvVars[common] != [13:11:04.639] envs[common]] [13:11:04.639] NAMES <- toupper(changed) [13:11:04.639] args <- list() [13:11:04.639] for (kk in seq_along(NAMES)) { [13:11:04.639] name <- changed[[kk]] [13:11:04.639] NAME <- NAMES[[kk]] [13:11:04.639] if (name != NAME && is.element(NAME, old_names)) [13:11:04.639] next [13:11:04.639] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.639] } [13:11:04.639] NAMES <- toupper(added) [13:11:04.639] for (kk in seq_along(NAMES)) { [13:11:04.639] name <- added[[kk]] [13:11:04.639] NAME <- NAMES[[kk]] [13:11:04.639] if (name != NAME && is.element(NAME, old_names)) [13:11:04.639] next [13:11:04.639] args[[name]] <- "" [13:11:04.639] } [13:11:04.639] NAMES <- toupper(removed) [13:11:04.639] for (kk in seq_along(NAMES)) { [13:11:04.639] name <- removed[[kk]] [13:11:04.639] NAME <- NAMES[[kk]] [13:11:04.639] if (name != NAME && is.element(NAME, old_names)) [13:11:04.639] next [13:11:04.639] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.639] } [13:11:04.639] if (length(args) > 0) [13:11:04.639] base::do.call(base::Sys.setenv, args = args) [13:11:04.639] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:04.639] } [13:11:04.639] else { [13:11:04.639] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:04.639] } [13:11:04.639] { [13:11:04.639] if (base::length(...future.futureOptionsAdded) > [13:11:04.639] 0L) { [13:11:04.639] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:04.639] base::names(opts) <- ...future.futureOptionsAdded [13:11:04.639] base::options(opts) [13:11:04.639] } [13:11:04.639] { [13:11:04.639] NULL [13:11:04.639] options(future.plan = NULL) [13:11:04.639] if (is.na(NA_character_)) [13:11:04.639] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.639] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:04.639] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:04.639] .init = FALSE) [13:11:04.639] } [13:11:04.639] } [13:11:04.639] } [13:11:04.639] }) [13:11:04.639] if (TRUE) { [13:11:04.639] base::sink(type = "output", split = FALSE) [13:11:04.639] if (TRUE) { [13:11:04.639] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:04.639] } [13:11:04.639] else { [13:11:04.639] ...future.result["stdout"] <- base::list(NULL) [13:11:04.639] } [13:11:04.639] base::close(...future.stdout) [13:11:04.639] ...future.stdout <- NULL [13:11:04.639] } [13:11:04.639] ...future.result$conditions <- ...future.conditions [13:11:04.639] ...future.result$finished <- base::Sys.time() [13:11:04.639] ...future.result [13:11:04.639] } [13:11:04.643] - Launch lazy future ... done [13:11:04.643] 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:11:04.659] getGlobalsAndPackages() ... [13:11:04.659] Searching for globals... [13:11:04.665] - globals found: [16] '{', 'outer_function', 'map', ':', '~', 'inner_function', '.x', 'if', 'inherits', '<-', '[[', '-', 'eval', 'bquote', 'lapply', '+' [13:11:04.665] Searching for globals ... DONE [13:11:04.665] Resolving globals: FALSE [13:11:04.666] The total size of the 3 globals is 7.52 KiB (7704 bytes) [13:11:04.667] 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:11:04.667] - globals: [3] 'outer_function', 'map', 'inner_function' [13:11:04.667] [13:11:04.667] getGlobalsAndPackages() ... DONE [13:11:04.668] run() for 'Future' ... [13:11:04.668] - state: 'created' [13:11:04.669] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:04.672] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:04.672] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:04.672] - Field: 'label' [13:11:04.672] - Field: 'local' [13:11:04.672] - Field: 'owner' [13:11:04.673] - Field: 'envir' [13:11:04.673] - Field: 'packages' [13:11:04.673] - Field: 'gc' [13:11:04.673] - Field: 'conditions' [13:11:04.673] - Field: 'expr' [13:11:04.673] - Field: 'uuid' [13:11:04.674] - Field: 'seed' [13:11:04.674] - Field: 'version' [13:11:04.674] - Field: 'result' [13:11:04.674] - Field: 'asynchronous' [13:11:04.674] - Field: 'calls' [13:11:04.675] - Field: 'globals' [13:11:04.675] - Field: 'stdout' [13:11:04.675] - Field: 'earlySignal' [13:11:04.675] - Field: 'lazy' [13:11:04.675] - Field: 'state' [13:11:04.675] - Field: '.cluster' [13:11:04.676] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:04.676] - Launch lazy future ... [13:11:04.676] Packages needed by the future expression (n = 0): [13:11:04.676] Packages needed by future strategies (n = 0): [13:11:04.677] { [13:11:04.677] { [13:11:04.677] { [13:11:04.677] ...future.startTime <- base::Sys.time() [13:11:04.677] { [13:11:04.677] { [13:11:04.677] { [13:11:04.677] base::local({ [13:11:04.677] has_future <- base::requireNamespace("future", [13:11:04.677] quietly = TRUE) [13:11:04.677] if (has_future) { [13:11:04.677] ns <- base::getNamespace("future") [13:11:04.677] version <- ns[[".package"]][["version"]] [13:11:04.677] if (is.null(version)) [13:11:04.677] version <- utils::packageVersion("future") [13:11:04.677] } [13:11:04.677] else { [13:11:04.677] version <- NULL [13:11:04.677] } [13:11:04.677] if (!has_future || version < "1.8.0") { [13:11:04.677] info <- base::c(r_version = base::gsub("R version ", [13:11:04.677] "", base::R.version$version.string), [13:11:04.677] platform = base::sprintf("%s (%s-bit)", [13:11:04.677] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:04.677] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:04.677] "release", "version")], collapse = " "), [13:11:04.677] hostname = base::Sys.info()[["nodename"]]) [13:11:04.677] info <- base::sprintf("%s: %s", base::names(info), [13:11:04.677] info) [13:11:04.677] info <- base::paste(info, collapse = "; ") [13:11:04.677] if (!has_future) { [13:11:04.677] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:04.677] info) [13:11:04.677] } [13:11:04.677] else { [13:11:04.677] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:04.677] info, version) [13:11:04.677] } [13:11:04.677] base::stop(msg) [13:11:04.677] } [13:11:04.677] }) [13:11:04.677] } [13:11:04.677] ...future.strategy.old <- future::plan("list") [13:11:04.677] options(future.plan = NULL) [13:11:04.677] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.677] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:04.677] } [13:11:04.677] ...future.workdir <- getwd() [13:11:04.677] } [13:11:04.677] ...future.oldOptions <- base::as.list(base::.Options) [13:11:04.677] ...future.oldEnvVars <- base::Sys.getenv() [13:11:04.677] } [13:11:04.677] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:04.677] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:04.677] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:04.677] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:04.677] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:04.677] future.stdout.windows.reencode = NULL, width = 80L) [13:11:04.677] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:04.677] base::names(...future.oldOptions)) [13:11:04.677] } [13:11:04.677] if (FALSE) { [13:11:04.677] } [13:11:04.677] else { [13:11:04.677] if (TRUE) { [13:11:04.677] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:04.677] open = "w") [13:11:04.677] } [13:11:04.677] else { [13:11:04.677] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:04.677] windows = "NUL", "/dev/null"), open = "w") [13:11:04.677] } [13:11:04.677] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:04.677] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:04.677] base::sink(type = "output", split = FALSE) [13:11:04.677] base::close(...future.stdout) [13:11:04.677] }, add = TRUE) [13:11:04.677] } [13:11:04.677] ...future.frame <- base::sys.nframe() [13:11:04.677] ...future.conditions <- base::list() [13:11:04.677] ...future.rng <- base::globalenv()$.Random.seed [13:11:04.677] if (FALSE) { [13:11:04.677] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:04.677] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:04.677] } [13:11:04.677] ...future.result <- base::tryCatch({ [13:11:04.677] base::withCallingHandlers({ [13:11:04.677] ...future.value <- base::withVisible(base::local({ [13:11:04.677] outer_function(1L) [13:11:04.677] })) [13:11:04.677] future::FutureResult(value = ...future.value$value, [13:11:04.677] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.677] ...future.rng), globalenv = if (FALSE) [13:11:04.677] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:04.677] ...future.globalenv.names)) [13:11:04.677] else NULL, started = ...future.startTime, version = "1.8") [13:11:04.677] }, condition = base::local({ [13:11:04.677] c <- base::c [13:11:04.677] inherits <- base::inherits [13:11:04.677] invokeRestart <- base::invokeRestart [13:11:04.677] length <- base::length [13:11:04.677] list <- base::list [13:11:04.677] seq.int <- base::seq.int [13:11:04.677] signalCondition <- base::signalCondition [13:11:04.677] sys.calls <- base::sys.calls [13:11:04.677] `[[` <- base::`[[` [13:11:04.677] `+` <- base::`+` [13:11:04.677] `<<-` <- base::`<<-` [13:11:04.677] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:04.677] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:04.677] 3L)] [13:11:04.677] } [13:11:04.677] function(cond) { [13:11:04.677] is_error <- inherits(cond, "error") [13:11:04.677] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:04.677] NULL) [13:11:04.677] if (is_error) { [13:11:04.677] sessionInformation <- function() { [13:11:04.677] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:04.677] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:04.677] search = base::search(), system = base::Sys.info()) [13:11:04.677] } [13:11:04.677] ...future.conditions[[length(...future.conditions) + [13:11:04.677] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:04.677] cond$call), session = sessionInformation(), [13:11:04.677] timestamp = base::Sys.time(), signaled = 0L) [13:11:04.677] signalCondition(cond) [13:11:04.677] } [13:11:04.677] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:04.677] signal <- FALSE && inherits(cond, character(0)) [13:11:04.677] ...future.conditions[[length(...future.conditions) + [13:11:04.677] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:04.677] if (FALSE && !signal) { [13:11:04.677] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.677] { [13:11:04.677] inherits <- base::inherits [13:11:04.677] invokeRestart <- base::invokeRestart [13:11:04.677] is.null <- base::is.null [13:11:04.677] muffled <- FALSE [13:11:04.677] if (inherits(cond, "message")) { [13:11:04.677] muffled <- grepl(pattern, "muffleMessage") [13:11:04.677] if (muffled) [13:11:04.677] invokeRestart("muffleMessage") [13:11:04.677] } [13:11:04.677] else if (inherits(cond, "warning")) { [13:11:04.677] muffled <- grepl(pattern, "muffleWarning") [13:11:04.677] if (muffled) [13:11:04.677] invokeRestart("muffleWarning") [13:11:04.677] } [13:11:04.677] else if (inherits(cond, "condition")) { [13:11:04.677] if (!is.null(pattern)) { [13:11:04.677] computeRestarts <- base::computeRestarts [13:11:04.677] grepl <- base::grepl [13:11:04.677] restarts <- computeRestarts(cond) [13:11:04.677] for (restart in restarts) { [13:11:04.677] name <- restart$name [13:11:04.677] if (is.null(name)) [13:11:04.677] next [13:11:04.677] if (!grepl(pattern, name)) [13:11:04.677] next [13:11:04.677] invokeRestart(restart) [13:11:04.677] muffled <- TRUE [13:11:04.677] break [13:11:04.677] } [13:11:04.677] } [13:11:04.677] } [13:11:04.677] invisible(muffled) [13:11:04.677] } [13:11:04.677] muffleCondition(cond, pattern = "^muffle") [13:11:04.677] } [13:11:04.677] } [13:11:04.677] else { [13:11:04.677] if (TRUE) { [13:11:04.677] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.677] { [13:11:04.677] inherits <- base::inherits [13:11:04.677] invokeRestart <- base::invokeRestart [13:11:04.677] is.null <- base::is.null [13:11:04.677] muffled <- FALSE [13:11:04.677] if (inherits(cond, "message")) { [13:11:04.677] muffled <- grepl(pattern, "muffleMessage") [13:11:04.677] if (muffled) [13:11:04.677] invokeRestart("muffleMessage") [13:11:04.677] } [13:11:04.677] else if (inherits(cond, "warning")) { [13:11:04.677] muffled <- grepl(pattern, "muffleWarning") [13:11:04.677] if (muffled) [13:11:04.677] invokeRestart("muffleWarning") [13:11:04.677] } [13:11:04.677] else if (inherits(cond, "condition")) { [13:11:04.677] if (!is.null(pattern)) { [13:11:04.677] computeRestarts <- base::computeRestarts [13:11:04.677] grepl <- base::grepl [13:11:04.677] restarts <- computeRestarts(cond) [13:11:04.677] for (restart in restarts) { [13:11:04.677] name <- restart$name [13:11:04.677] if (is.null(name)) [13:11:04.677] next [13:11:04.677] if (!grepl(pattern, name)) [13:11:04.677] next [13:11:04.677] invokeRestart(restart) [13:11:04.677] muffled <- TRUE [13:11:04.677] break [13:11:04.677] } [13:11:04.677] } [13:11:04.677] } [13:11:04.677] invisible(muffled) [13:11:04.677] } [13:11:04.677] muffleCondition(cond, pattern = "^muffle") [13:11:04.677] } [13:11:04.677] } [13:11:04.677] } [13:11:04.677] })) [13:11:04.677] }, error = function(ex) { [13:11:04.677] base::structure(base::list(value = NULL, visible = NULL, [13:11:04.677] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.677] ...future.rng), started = ...future.startTime, [13:11:04.677] finished = Sys.time(), session_uuid = NA_character_, [13:11:04.677] version = "1.8"), class = "FutureResult") [13:11:04.677] }, finally = { [13:11:04.677] if (!identical(...future.workdir, getwd())) [13:11:04.677] setwd(...future.workdir) [13:11:04.677] { [13:11:04.677] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:04.677] ...future.oldOptions$nwarnings <- NULL [13:11:04.677] } [13:11:04.677] base::options(...future.oldOptions) [13:11:04.677] if (.Platform$OS.type == "windows") { [13:11:04.677] old_names <- names(...future.oldEnvVars) [13:11:04.677] envs <- base::Sys.getenv() [13:11:04.677] names <- names(envs) [13:11:04.677] common <- intersect(names, old_names) [13:11:04.677] added <- setdiff(names, old_names) [13:11:04.677] removed <- setdiff(old_names, names) [13:11:04.677] changed <- common[...future.oldEnvVars[common] != [13:11:04.677] envs[common]] [13:11:04.677] NAMES <- toupper(changed) [13:11:04.677] args <- list() [13:11:04.677] for (kk in seq_along(NAMES)) { [13:11:04.677] name <- changed[[kk]] [13:11:04.677] NAME <- NAMES[[kk]] [13:11:04.677] if (name != NAME && is.element(NAME, old_names)) [13:11:04.677] next [13:11:04.677] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.677] } [13:11:04.677] NAMES <- toupper(added) [13:11:04.677] for (kk in seq_along(NAMES)) { [13:11:04.677] name <- added[[kk]] [13:11:04.677] NAME <- NAMES[[kk]] [13:11:04.677] if (name != NAME && is.element(NAME, old_names)) [13:11:04.677] next [13:11:04.677] args[[name]] <- "" [13:11:04.677] } [13:11:04.677] NAMES <- toupper(removed) [13:11:04.677] for (kk in seq_along(NAMES)) { [13:11:04.677] name <- removed[[kk]] [13:11:04.677] NAME <- NAMES[[kk]] [13:11:04.677] if (name != NAME && is.element(NAME, old_names)) [13:11:04.677] next [13:11:04.677] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.677] } [13:11:04.677] if (length(args) > 0) [13:11:04.677] base::do.call(base::Sys.setenv, args = args) [13:11:04.677] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:04.677] } [13:11:04.677] else { [13:11:04.677] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:04.677] } [13:11:04.677] { [13:11:04.677] if (base::length(...future.futureOptionsAdded) > [13:11:04.677] 0L) { [13:11:04.677] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:04.677] base::names(opts) <- ...future.futureOptionsAdded [13:11:04.677] base::options(opts) [13:11:04.677] } [13:11:04.677] { [13:11:04.677] NULL [13:11:04.677] options(future.plan = NULL) [13:11:04.677] if (is.na(NA_character_)) [13:11:04.677] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.677] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:04.677] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:04.677] .init = FALSE) [13:11:04.677] } [13:11:04.677] } [13:11:04.677] } [13:11:04.677] }) [13:11:04.677] if (TRUE) { [13:11:04.677] base::sink(type = "output", split = FALSE) [13:11:04.677] if (TRUE) { [13:11:04.677] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:04.677] } [13:11:04.677] else { [13:11:04.677] ...future.result["stdout"] <- base::list(NULL) [13:11:04.677] } [13:11:04.677] base::close(...future.stdout) [13:11:04.677] ...future.stdout <- NULL [13:11:04.677] } [13:11:04.677] ...future.result$conditions <- ...future.conditions [13:11:04.677] ...future.result$finished <- base::Sys.time() [13:11:04.677] ...future.result [13:11:04.677] } [13:11:04.680] - Launch lazy future ... done [13:11:04.681] run() for 'MiraiFuture' ... done List of 2 $ : num [1:2] 2 3 $ : num [1:2] 2 3 [13:11:04.689] getGlobalsAndPackages() ... [13:11:04.690] Searching for globals... [13:11:04.695] - globals found: [16] '{', 'outer_function', 'map', ':', '~', 'inner_function', '.x', 'if', 'inherits', '<-', '[[', '-', 'eval', 'bquote', 'lapply', '+' [13:11:04.695] Searching for globals ... DONE [13:11:04.695] Resolving globals: FALSE [13:11:04.696] The total size of the 3 globals is 7.52 KiB (7704 bytes) [13:11:04.697] 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:11:04.697] - globals: [3] 'outer_function', 'map', 'inner_function' [13:11:04.697] [13:11:04.697] getGlobalsAndPackages() ... DONE [13:11:04.697] run() for 'Future' ... [13:11:04.698] - state: 'created' [13:11:04.698] - Future backend: 'FutureStrategy', 'mirai_multisession', 'mirai_cluster', 'mirai', 'multiprocess', 'future', 'function' [13:11:04.700] - Future class: 'MiraiFuture', 'MultiprocessFuture', 'Future', 'environment' [13:11:04.700] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... [13:11:04.700] - Field: 'label' [13:11:04.701] - Field: 'local' [13:11:04.701] - Field: 'owner' [13:11:04.701] - Field: 'envir' [13:11:04.701] - Field: 'packages' [13:11:04.701] - Field: 'gc' [13:11:04.702] - Field: 'conditions' [13:11:04.702] - Field: 'expr' [13:11:04.702] - Field: 'uuid' [13:11:04.702] - Field: 'seed' [13:11:04.703] - Field: 'version' [13:11:04.703] - Field: 'result' [13:11:04.703] - Field: 'asynchronous' [13:11:04.704] - Field: 'calls' [13:11:04.704] - Field: 'globals' [13:11:04.704] - Field: 'stdout' [13:11:04.704] - Field: 'earlySignal' [13:11:04.704] - Field: 'lazy' [13:11:04.705] - Field: 'state' [13:11:04.705] - Field: '.cluster' [13:11:04.705] - Copy elements of temporary 'MiraiFuture' to final 'Future' object ... done [13:11:04.705] - Launch lazy future ... [13:11:04.705] Packages needed by the future expression (n = 0): [13:11:04.705] Packages needed by future strategies (n = 0): [13:11:04.706] { [13:11:04.706] { [13:11:04.706] { [13:11:04.706] ...future.startTime <- base::Sys.time() [13:11:04.706] { [13:11:04.706] { [13:11:04.706] { [13:11:04.706] base::local({ [13:11:04.706] has_future <- base::requireNamespace("future", [13:11:04.706] quietly = TRUE) [13:11:04.706] if (has_future) { [13:11:04.706] ns <- base::getNamespace("future") [13:11:04.706] version <- ns[[".package"]][["version"]] [13:11:04.706] if (is.null(version)) [13:11:04.706] version <- utils::packageVersion("future") [13:11:04.706] } [13:11:04.706] else { [13:11:04.706] version <- NULL [13:11:04.706] } [13:11:04.706] if (!has_future || version < "1.8.0") { [13:11:04.706] info <- base::c(r_version = base::gsub("R version ", [13:11:04.706] "", base::R.version$version.string), [13:11:04.706] platform = base::sprintf("%s (%s-bit)", [13:11:04.706] base::R.version$platform, 8 * base::.Machine$sizeof.pointer), [13:11:04.706] os = base::paste(base::Sys.info()[base::c("sysname", [13:11:04.706] "release", "version")], collapse = " "), [13:11:04.706] hostname = base::Sys.info()[["nodename"]]) [13:11:04.706] info <- base::sprintf("%s: %s", base::names(info), [13:11:04.706] info) [13:11:04.706] info <- base::paste(info, collapse = "; ") [13:11:04.706] if (!has_future) { [13:11:04.706] msg <- base::sprintf("Package 'future' is not installed on worker (%s)", [13:11:04.706] info) [13:11:04.706] } [13:11:04.706] else { [13:11:04.706] msg <- base::sprintf("Package 'future' on worker (%s) must be of version >= 1.8.0: %s", [13:11:04.706] info, version) [13:11:04.706] } [13:11:04.706] base::stop(msg) [13:11:04.706] } [13:11:04.706] }) [13:11:04.706] } [13:11:04.706] ...future.strategy.old <- future::plan("list") [13:11:04.706] options(future.plan = NULL) [13:11:04.706] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.706] future::plan("default", .cleanup = FALSE, .init = FALSE) [13:11:04.706] } [13:11:04.706] ...future.workdir <- getwd() [13:11:04.706] } [13:11:04.706] ...future.oldOptions <- base::as.list(base::.Options) [13:11:04.706] ...future.oldEnvVars <- base::Sys.getenv() [13:11:04.706] } [13:11:04.706] base::options(future.startup.script = FALSE, future.globals.onMissing = NULL, [13:11:04.706] future.globals.maxSize = NULL, future.globals.method = NULL, [13:11:04.706] future.globals.onMissing = NULL, future.globals.onReference = NULL, [13:11:04.706] future.globals.resolve = NULL, future.resolve.recursive = NULL, [13:11:04.706] future.rng.onMisuse = NULL, future.rng.onMisuse.keepFuture = NULL, [13:11:04.706] future.stdout.windows.reencode = NULL, width = 80L) [13:11:04.706] ...future.futureOptionsAdded <- base::setdiff(base::names(base::.Options), [13:11:04.706] base::names(...future.oldOptions)) [13:11:04.706] } [13:11:04.706] if (FALSE) { [13:11:04.706] } [13:11:04.706] else { [13:11:04.706] if (TRUE) { [13:11:04.706] ...future.stdout <- base::rawConnection(base::raw(0L), [13:11:04.706] open = "w") [13:11:04.706] } [13:11:04.706] else { [13:11:04.706] ...future.stdout <- base::file(base::switch(.Platform$OS.type, [13:11:04.706] windows = "NUL", "/dev/null"), open = "w") [13:11:04.706] } [13:11:04.706] base::sink(...future.stdout, type = "output", split = FALSE) [13:11:04.706] base::on.exit(if (!base::is.null(...future.stdout)) { [13:11:04.706] base::sink(type = "output", split = FALSE) [13:11:04.706] base::close(...future.stdout) [13:11:04.706] }, add = TRUE) [13:11:04.706] } [13:11:04.706] ...future.frame <- base::sys.nframe() [13:11:04.706] ...future.conditions <- base::list() [13:11:04.706] ...future.rng <- base::globalenv()$.Random.seed [13:11:04.706] if (FALSE) { [13:11:04.706] ...future.globalenv.names <- c(base::names(base::.GlobalEnv), [13:11:04.706] "...future.value", "...future.globalenv.names", ".Random.seed") [13:11:04.706] } [13:11:04.706] ...future.result <- base::tryCatch({ [13:11:04.706] base::withCallingHandlers({ [13:11:04.706] ...future.value <- base::withVisible(base::local({ [13:11:04.706] outer_function(1L) [13:11:04.706] })) [13:11:04.706] future::FutureResult(value = ...future.value$value, [13:11:04.706] visible = ...future.value$visible, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.706] ...future.rng), globalenv = if (FALSE) [13:11:04.706] list(added = base::setdiff(base::names(base::.GlobalEnv), [13:11:04.706] ...future.globalenv.names)) [13:11:04.706] else NULL, started = ...future.startTime, version = "1.8") [13:11:04.706] }, condition = base::local({ [13:11:04.706] c <- base::c [13:11:04.706] inherits <- base::inherits [13:11:04.706] invokeRestart <- base::invokeRestart [13:11:04.706] length <- base::length [13:11:04.706] list <- base::list [13:11:04.706] seq.int <- base::seq.int [13:11:04.706] signalCondition <- base::signalCondition [13:11:04.706] sys.calls <- base::sys.calls [13:11:04.706] `[[` <- base::`[[` [13:11:04.706] `+` <- base::`+` [13:11:04.706] `<<-` <- base::`<<-` [13:11:04.706] sysCalls <- function(calls = sys.calls(), from = 1L) { [13:11:04.706] calls[seq.int(from = from + 12L, to = length(calls) - [13:11:04.706] 3L)] [13:11:04.706] } [13:11:04.706] function(cond) { [13:11:04.706] is_error <- inherits(cond, "error") [13:11:04.706] ignore <- !is_error && !is.null(NULL) && inherits(cond, [13:11:04.706] NULL) [13:11:04.706] if (is_error) { [13:11:04.706] sessionInformation <- function() { [13:11:04.706] list(r = base::R.Version(), locale = base::Sys.getlocale(), [13:11:04.706] rngkind = base::RNGkind(), namespaces = base::loadedNamespaces(), [13:11:04.706] search = base::search(), system = base::Sys.info()) [13:11:04.706] } [13:11:04.706] ...future.conditions[[length(...future.conditions) + [13:11:04.706] 1L]] <<- list(condition = cond, calls = c(sysCalls(from = ...future.frame), [13:11:04.706] cond$call), session = sessionInformation(), [13:11:04.706] timestamp = base::Sys.time(), signaled = 0L) [13:11:04.706] signalCondition(cond) [13:11:04.706] } [13:11:04.706] else if (!ignore && TRUE && inherits(cond, "condition")) { [13:11:04.706] signal <- FALSE && inherits(cond, character(0)) [13:11:04.706] ...future.conditions[[length(...future.conditions) + [13:11:04.706] 1L]] <<- list(condition = cond, signaled = base::as.integer(signal)) [13:11:04.706] if (FALSE && !signal) { [13:11:04.706] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.706] { [13:11:04.706] inherits <- base::inherits [13:11:04.706] invokeRestart <- base::invokeRestart [13:11:04.706] is.null <- base::is.null [13:11:04.706] muffled <- FALSE [13:11:04.706] if (inherits(cond, "message")) { [13:11:04.706] muffled <- grepl(pattern, "muffleMessage") [13:11:04.706] if (muffled) [13:11:04.706] invokeRestart("muffleMessage") [13:11:04.706] } [13:11:04.706] else if (inherits(cond, "warning")) { [13:11:04.706] muffled <- grepl(pattern, "muffleWarning") [13:11:04.706] if (muffled) [13:11:04.706] invokeRestart("muffleWarning") [13:11:04.706] } [13:11:04.706] else if (inherits(cond, "condition")) { [13:11:04.706] if (!is.null(pattern)) { [13:11:04.706] computeRestarts <- base::computeRestarts [13:11:04.706] grepl <- base::grepl [13:11:04.706] restarts <- computeRestarts(cond) [13:11:04.706] for (restart in restarts) { [13:11:04.706] name <- restart$name [13:11:04.706] if (is.null(name)) [13:11:04.706] next [13:11:04.706] if (!grepl(pattern, name)) [13:11:04.706] next [13:11:04.706] invokeRestart(restart) [13:11:04.706] muffled <- TRUE [13:11:04.706] break [13:11:04.706] } [13:11:04.706] } [13:11:04.706] } [13:11:04.706] invisible(muffled) [13:11:04.706] } [13:11:04.706] muffleCondition(cond, pattern = "^muffle") [13:11:04.706] } [13:11:04.706] } [13:11:04.706] else { [13:11:04.706] if (TRUE) { [13:11:04.706] muffleCondition <- function (cond, pattern = "^muffle") [13:11:04.706] { [13:11:04.706] inherits <- base::inherits [13:11:04.706] invokeRestart <- base::invokeRestart [13:11:04.706] is.null <- base::is.null [13:11:04.706] muffled <- FALSE [13:11:04.706] if (inherits(cond, "message")) { [13:11:04.706] muffled <- grepl(pattern, "muffleMessage") [13:11:04.706] if (muffled) [13:11:04.706] invokeRestart("muffleMessage") [13:11:04.706] } [13:11:04.706] else if (inherits(cond, "warning")) { [13:11:04.706] muffled <- grepl(pattern, "muffleWarning") [13:11:04.706] if (muffled) [13:11:04.706] invokeRestart("muffleWarning") [13:11:04.706] } [13:11:04.706] else if (inherits(cond, "condition")) { [13:11:04.706] if (!is.null(pattern)) { [13:11:04.706] computeRestarts <- base::computeRestarts [13:11:04.706] grepl <- base::grepl [13:11:04.706] restarts <- computeRestarts(cond) [13:11:04.706] for (restart in restarts) { [13:11:04.706] name <- restart$name [13:11:04.706] if (is.null(name)) [13:11:04.706] next [13:11:04.706] if (!grepl(pattern, name)) [13:11:04.706] next [13:11:04.706] invokeRestart(restart) [13:11:04.706] muffled <- TRUE [13:11:04.706] break [13:11:04.706] } [13:11:04.706] } [13:11:04.706] } [13:11:04.706] invisible(muffled) [13:11:04.706] } [13:11:04.706] muffleCondition(cond, pattern = "^muffle") [13:11:04.706] } [13:11:04.706] } [13:11:04.706] } [13:11:04.706] })) [13:11:04.706] }, error = function(ex) { [13:11:04.706] base::structure(base::list(value = NULL, visible = NULL, [13:11:04.706] conditions = ...future.conditions, rng = !identical(base::globalenv()$.Random.seed, [13:11:04.706] ...future.rng), started = ...future.startTime, [13:11:04.706] finished = Sys.time(), session_uuid = NA_character_, [13:11:04.706] version = "1.8"), class = "FutureResult") [13:11:04.706] }, finally = { [13:11:04.706] if (!identical(...future.workdir, getwd())) [13:11:04.706] setwd(...future.workdir) [13:11:04.706] { [13:11:04.706] if (identical(getOption("nwarnings"), ...future.oldOptions$nwarnings)) { [13:11:04.706] ...future.oldOptions$nwarnings <- NULL [13:11:04.706] } [13:11:04.706] base::options(...future.oldOptions) [13:11:04.706] if (.Platform$OS.type == "windows") { [13:11:04.706] old_names <- names(...future.oldEnvVars) [13:11:04.706] envs <- base::Sys.getenv() [13:11:04.706] names <- names(envs) [13:11:04.706] common <- intersect(names, old_names) [13:11:04.706] added <- setdiff(names, old_names) [13:11:04.706] removed <- setdiff(old_names, names) [13:11:04.706] changed <- common[...future.oldEnvVars[common] != [13:11:04.706] envs[common]] [13:11:04.706] NAMES <- toupper(changed) [13:11:04.706] args <- list() [13:11:04.706] for (kk in seq_along(NAMES)) { [13:11:04.706] name <- changed[[kk]] [13:11:04.706] NAME <- NAMES[[kk]] [13:11:04.706] if (name != NAME && is.element(NAME, old_names)) [13:11:04.706] next [13:11:04.706] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.706] } [13:11:04.706] NAMES <- toupper(added) [13:11:04.706] for (kk in seq_along(NAMES)) { [13:11:04.706] name <- added[[kk]] [13:11:04.706] NAME <- NAMES[[kk]] [13:11:04.706] if (name != NAME && is.element(NAME, old_names)) [13:11:04.706] next [13:11:04.706] args[[name]] <- "" [13:11:04.706] } [13:11:04.706] NAMES <- toupper(removed) [13:11:04.706] for (kk in seq_along(NAMES)) { [13:11:04.706] name <- removed[[kk]] [13:11:04.706] NAME <- NAMES[[kk]] [13:11:04.706] if (name != NAME && is.element(NAME, old_names)) [13:11:04.706] next [13:11:04.706] args[[name]] <- ...future.oldEnvVars[[name]] [13:11:04.706] } [13:11:04.706] if (length(args) > 0) [13:11:04.706] base::do.call(base::Sys.setenv, args = args) [13:11:04.706] args <- names <- old_names <- NAMES <- envs <- common <- added <- removed <- NULL [13:11:04.706] } [13:11:04.706] else { [13:11:04.706] base::do.call(base::Sys.setenv, args = base::as.list(...future.oldEnvVars)) [13:11:04.706] } [13:11:04.706] { [13:11:04.706] if (base::length(...future.futureOptionsAdded) > [13:11:04.706] 0L) { [13:11:04.706] opts <- base::vector("list", length = base::length(...future.futureOptionsAdded)) [13:11:04.706] base::names(opts) <- ...future.futureOptionsAdded [13:11:04.706] base::options(opts) [13:11:04.706] } [13:11:04.706] { [13:11:04.706] NULL [13:11:04.706] options(future.plan = NULL) [13:11:04.706] if (is.na(NA_character_)) [13:11:04.706] Sys.unsetenv("R_FUTURE_PLAN") [13:11:04.706] else Sys.setenv(R_FUTURE_PLAN = NA_character_) [13:11:04.706] future::plan(...future.strategy.old, .cleanup = FALSE, [13:11:04.706] .init = FALSE) [13:11:04.706] } [13:11:04.706] } [13:11:04.706] } [13:11:04.706] }) [13:11:04.706] if (TRUE) { [13:11:04.706] base::sink(type = "output", split = FALSE) [13:11:04.706] if (TRUE) { [13:11:04.706] ...future.result$stdout <- base::rawToChar(base::rawConnectionValue(...future.stdout)) [13:11:04.706] } [13:11:04.706] else { [13:11:04.706] ...future.result["stdout"] <- base::list(NULL) [13:11:04.706] } [13:11:04.706] base::close(...future.stdout) [13:11:04.706] ...future.stdout <- NULL [13:11:04.706] } [13:11:04.706] ...future.result$conditions <- ...future.conditions [13:11:04.706] ...future.result$finished <- base::Sys.time() [13:11:04.706] ...future.result [13:11:04.706] } [13:11:04.710] - Launch lazy future ... done [13:11:04.710] 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.54 0.09 1.12