R/utils_api-minifuture.R

Defines functions minifuture

Documented in minifuture

#' @return
#' `minifuture(expr)` creates a future with minimal overhead, by disabling
#' user-friendly behaviors, e.g. automatic identification of global
#' variables and packages needed, and relaying of output.
#'
#' @rdname future
#' @export
minifuture <- function(expr, substitute = TRUE, globals = NULL, packages = NULL, stdout = NA, conditions = NULL, seed = NULL, ..., envir = parent.frame()) {
  if (substitute) expr <- substitute(expr)
  reset <- character(0L)
  future(expr, substitute = FALSE, globals = globals, packages = packages, stdout = stdout, conditions = conditions, seed = seed, reset = reset, ..., envir = envir)
}

Try the future package in your browser

Any scripts or data that you put into this service are public.

future documentation built on April 12, 2025, 1:25 a.m.