parallel additional methods {easyRNASeq} | R Documentation |
Functions defined in the easyRNASeq package that enhance the parallel package.
## S4 method for signature 'list,'function'' parallelize(obj = list(), fun = NULL, nnodes = 1, ...)
obj |
the object which processing has to be parallelizes |
fun |
the function to be applied in parallel |
nnodes |
the number of nodes to use |
... |
additional arguments passed to the function |
The parallelize function ease the use of the parallel package. If the number of nodes provided by the user is 1, then a simple 'lapply' is used, otherwise a cluster object is created and the object dispatched for parallelization.
the result of the clusterApply
function.
Nicolas Delhomme
clusterApply
makePSOCKcluster
and stopCluster
in makeCluster
parallelize(list(a<-c(1,2),b<-c(2,1)),sum,nnodes=1)