sfPar: sfPar

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Executing a list of functions distributed via sfApply.

Usage

1
sfPar(fList, sfParParallel = TRUE, sfParArgsList = NULL, ...)

Arguments

fList

the list of functions

sfParParallel

if FALSE, then apply is used instead of sfClusterApplyLB - good for debugging

sfParArgsList

an optional list of arguments passed to each function

...

passed to each function

Details

If argsList is a name it is evaluated on the node before calling the function this allows to distribute variables by sfExport before rather than transferring them with each call which is advantages when the call is issued very often and the arguments are large

Value

a list of returns for each function

Author(s)

Thomas Wutzler

See Also

twSnowfall

Examples

1
2
3
4
5
6
7
#sfInit(parallel=TRUE,cpus=4)
fList <- list(
	function(...){ "Hello world!" } # dots are important
	,function(a){ a }
)
# each function is executed on a different node
(res <- sfPar( fList, sfParArgsList=list(a="aha") ))	


Search within the twSnowfall package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.