Defines instructions for parallelization by linking a method with options.
egf_parallel(method = c("serial", "multicore", "snow"),
outfile = "", cores = getOption("egf.cores", 1L),
args = list(), cl = NULL)A list inheriting from class "egf_parallel"
containing the arguments (after possible matching and coercion).
a character string indicating a method of parallelization.
"serial" indicates no parallelization.
"multicore" indicates R level forking.
It is intended for use from a terminal rather than from a GUI.
"snow" indicates socket clusters.
On Windows, "multicore" is equivalent to "serial".
"snow" is supported on both Unix-alikes and Windows.
a character string indicating a file path where console output
should be diverted. An empty string indicates no diversion.
If method = "snow", then diversion may be necessary to
view output.
a positive integer indicating a number of threads/processes to
fork/spawn when parallel != "serial".
detectCores can be called to detect the
theoretical maximum.
a list of optional arguments to
mclapply (method = "multicore") or
makePSOCKcluster (method = "snow").
an existing socket cluster
(method = "snow"). The default is to create a new cluster
stop it upon job completion.
vignette("parallel", "parallel").
parallel <- egf_parallel()
str(parallel)
Run the code above in your browser using DataLab