Evaluate an expression 'everywhere' on all connected daemons for the specified compute profile. Designed for performing setup operations across daemons or exporting common data, resultant changes to the global environment, loaded packages or options are persisted regardless of a daemon's 'cleanup' setting.

everywhere(.expr, ..., .args = list(), .compute = "default")



an expression to evaluate asynchronously (of arbitrary length, wrapped in { } where necessary), or else a pre-constructed language object.


(optional) either named arguments (name = value pairs) specifying objects referenced in '.expr', or an environment. These objects (from the environment if one was supplied) are placed in the global environment of the evaluation process.


(optional) either a list of name = value pairs, or an environment, as in '...' above. Contrary to '...', these objects remain local to the evaluation environment.


[default 'default'] character value for the compute profile to use (each compute profile has its own independent set of daemons).


Invisible NULL.


if (interactive()) {
# Only run examples in interactive R sessions

# export common data by a super-assignment expression:
everywhere(y <<- 3)
# '...' variables are assigned to the global environment:
everywhere({}, a = 1, b = 2)
m <- mirai(a + b - y == 0L)

daemons(1, dispatcher = FALSE)
m <- mirai("package:parallel" %in% search())