Learn R Programming

easyRNASeq (version 2.8.2)

parallel additional methods: parallel additional methods

Description

Functions defined in the easyRNASeq package that enhance the parallel package.

Usage

## S3 method for class 'list,`function`':
parallelize(obj = list(), fun = NULL,
  nnodes = 1, ...)

Arguments

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 fun

Value

Details

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.

See Also

clusterApply makePSOCKcluster stopCluster

Examples

Run this code
parallelize(list(a<-c(1,2),b<-c(2,1)),sum,nnodes=1)

Run the code above in your browser using DataLab