Not a user-side function. Do not call directly.
crew_eval(
command,
name = NA_character_,
string = NA_character_,
data = list(),
globals = list(),
seed = NULL,
algorithm = NULL,
packages = character(0),
library = NULL
)
A monad object with results and metadata.
Language object with R code to run.
Character of length 1, name of the task.
Character of length 1, string representation of the command.
Named list of local data objects in the evaluation environment.
Named list of objects to temporarily assign to the global environment for the task.
Integer of length 1 with the pseudo-random number generator
seed to set for the evaluation of the task. Passed to the
seed
argument of set.seed()
if not NULL
.
If algorithm
and seed
are both NULL
,
then the random number generator defaults to the
recommended widely spaced worker-specific
L'Ecuyer streams as supported by mirai::nextstream()
.
See vignette("parallel", package = "parallel")
for details.
Integer of length 1 with the pseudo-random number
generator algorithm to set for the evaluation of the task.
Passed to the kind
argument of RNGkind()
if not NULL
.
If algorithm
and seed
are both NULL
,
then the random number generator defaults to the
recommended widely spaced worker-specific
L'Ecuyer streams as supported by mirai::nextstream()
.
See vignette("parallel", package = "parallel")
for details.
Character vector of packages to load for the task.
Library path to load the packages. See the lib.loc
argument of require()
.
The crew_eval()
function evaluates an R expression
in an encapsulated environment and returns a monad with the results,
including warnings and error messages if applicable.
The random number generator seed, globals
, and global options
are restored to their original values on exit.
Other utility:
crew_assert()
,
crew_clean()
,
crew_deprecate()
,
crew_random_name()
,
crew_retry()
,
crew_terminate_process()
,
crew_terminate_signal()
,
crew_worker()