BiocCloud (version 0.99.3)

taskApply: Run a set of tasks in a parallel computing environment

Description

Provides a framework for running a task in a parallel computing environment, preparing the worker nodes beforehand if necessary.

Usage

taskApply(X, fun, ..., prepareWorkers)

Arguments

X
A list of tasks to perform. This must be a regular R list.
prepareWorkers
An optional function containing any code that needs to be run on the workers prior to the computation (for example, loading package dependencies).
fun
A function to be run in parallel on each item of X.
...
Additional arguments to be passed to fun.

Value

  • The return value of func.

Details

See the vignette for more information.

Be sure and turn off all EC2 instances when you are done with them, or you will be charged for all usage!

Examples

Run this code
tasks <- 1:10

f <- function(x) x +1

results <- taskApply(tasks, f)

Run the code above in your browser using DataLab