A future is an abstraction for a value that may
available at some point in the future. A future can either be
resolved, a state which can be checked
resolved(). As long as it is unresolved, the
value is not available. As soon as it is resolved, the value
is available via
Future( expr = NULL, envir = parent.frame(), substitute = TRUE, stdout = TRUE, conditions = "condition", globals = NULL, packages = NULL, seed = FALSE, lazy = FALSE, local = TRUE, gc = FALSE, earlySignal = FALSE, label = NULL, ... )
An R expression.
The environment from where global objects should be identified.
If TRUE, argument
If TRUE (default), then the standard output is captured,
and re-outputted when
A character string of conditions classes to be captured
and relayed. The default is to relay messages and warnings.
To not intercept any types of conditions, use
(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
(optional) a character vector specifying packages to be attached in the R environment evaluating the future.
(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
If FALSE (default), the future is resolved eagerly (starting immediately), otherwise not.
If TRUE, the expression is evaluated such that all assignments are done to local temporary environment, otherwise the assignments are done to the global environment of the R process evaluating the future.
If TRUE, the garbage collector run (in the process that
evaluated the future) only after the value of the future is collected.
Exactly when the values are collected may depend on various factors such
as number of free workers and whether
Specified whether conditions should be signaled as soon as possible or not.
An optional character string label attached to the future.
Additional named elements of the future.
An object of class
A Future object is itself an environment.
One function that creates a Future is
It returns a Future that evaluates an R expression in the future.
An alternative approach is to use the
assignment operator, which creates a future from the
right-hand-side (RHS) R expression and assigns its future value
to a variable as a promise.