Skip to main content
Figure 1 | BMC Bioinformatics

Figure 1

From: R/parallel – speeding up bioinformatics analysis with R

Figure 1

Example using R/parallel. To parallelize a loop it is only needed to add an if-else structure. The loop to be parallelized is placed inside the else body and the parallelizer function runParallel inside the if body. The last step is to indicate in runParallel the variable names used to accumulate the partial results and the operations to apply after each iteration. Other arguments like the number of parallel processes (workers) are optional. Detailed documentation and examples can be found on the project web page as well as within the package as R help pages.

Back to article page