Same as future(), but with different default arguments. Specifically, globals and packages must be manually specified, conditions are not captured, standard output is not captured, random seeds are not declared or set.

minifuture(
  expr,
  substitute = TRUE,
  globals = NULL,
  packages = NULL,
  stdout = NA,
  conditions = NULL,
  seed = NULL,
  ...,
  envir = parent.frame()
)

Arguments

expr

An R expression.

substitute

If TRUE, argument expr is substitute():ed, otherwise not.

globals

(optional) a logical, a character vector, or a named list to control how globals are handled. For details, see section 'Globals used by future expressions' in the help for future().

packages

(optional) a character vector specifying packages to be attached in the R environment evaluating the future.

stdout

If TRUE (default), then the standard output is captured, and re-outputted when value() is called. If FALSE, any output is silenced (by sinking it to the null device as it is outputted). Using stdout = structure(TRUE, drop = TRUE) causes the captured standard output to be dropped from the future object as soon as it has been relayed. This can help decrease the overall memory consumed by captured output across futures. Using stdout = NA fully avoids intercepting the standard output; behavior of such unhandled standard output depends on the future backend.

conditions

A character string of conditions classes to be captured and relayed. The default is to relay all conditions, including messages and warnings. To drop all conditions, use conditions = character(0). Errors are always relayed. Attribute exclude can be used to ignore specific classes, e.g. conditions = structure("condition", exclude = "message") will capture all condition classes except those that inherits from the message class. Using conditions = structure(..., drop = TRUE) causes any captured conditions to be dropped from the future object as soon as it has been relayed, e.g. by value(f). This can help decrease the overall memory consumed by captured conditions across futures. Using conditions = NULL (not recommended) avoids intercepting conditions, except from errors; behavior of such unhandled conditions depends on the future backend and the environment from which R runs.

seed

(optional) If TRUE, the random seed, that is, the state of the random number generator (RNG) will be set such that statistically sound random numbers are produced (also during parallelization). If FALSE (default), it is assumed that the future expression does neither need nor use random numbers generation. To use a fixed random seed, specify a L'Ecuyer-CMRG seed (seven integer) or a regular RNG seed (a single integer). If the latter, then a L'Ecuyer-CMRG seed will be automatically created based on the given seed. Furthermore, if FALSE, then the future will be monitored to make sure it does not use random numbers. If it does and depending on the value of option future.rng.onMisuse, the check is ignored, an informative warning, or error will be produced. If seed is NULL, then the effect is as with seed = FALSE but without the RNG check being performed.

envir

The environment from where global objects should be identified.

...

Additional arguments passed to future().

Value

A Future