Usage
parDosa(cl, seq, fun, cldata,
lib = NULL, dir = NULL, evalq=NULL,
size = 1, balancing = c("none", "load", "size", "both"),
rng.type = c("none", "RNGstream", "SPRNG"),
cleanup = TRUE, unload = FALSE, ...)
Arguments
cl
A cluster object created by makeCluster
, or
an integer. It can also be NULL
, see Details. fun
A function or character string naming a function.
cldata
A list containing data.
This list is then exported to the cluster by
clusterExport
.
It is stored in a hidden environment.
Data in cldata
can be used by fun
. lib
Character, name of package(s). Optionally packages can be
loaded onto the cluster. More than one package can be
specified as character vector. Packages already loaded are skipped.
dir
Working directory to use, if NULL
working
directory is not set on workers (default).
Can be a vector to set different directories on workers.
evalq
Character, expressions to evaluate,
e.g. for changing global options (passed to clusterEvalQ
).
More than one expressions can be specified as character vector. balancing
Character, type of balancing to perform (see Details).
size
Vector of problem sizes (or relative performance information)
corresponding to elements of seq
(recycled if needed).
The default 1
indicates equality of problem sizes.
rng.type
Character, "none"
or the type of RNG on the workers
(see clusterSetupRNG
).
The logical value !(rng.type == "none")
is used for
forking (e.g. when cl
i cleanup
logical, if cldata
should be removed from
the workers after applying fun
.
If TRUE
, effects of dir
argument is also cleaned up.
unload
logical, if pkg
should be unloaded after applying fun
.
...
Other arguments of fun
, that are simple values and not objects.
(Arguments passed as objects should be specified in cldata
,
otherwise those are not exported to the cluster by this function.)