Learn R Programming

parallelMap (version 1.0-83)

parallelMap: Maps a function over lists or vectors in parallel.

Description

Use the parallelization mode and the other options set in parallelStart.

Usage

parallelMap(fun, ..., more.args = list(),
    simplify = FALSE, use.names = FALSE,
    level = as.character(NA))

Arguments

fun
[function] Function to map over ....
...
[any] Arguments to vectorize over (list or vector).
more.args
[list] A list of other arguments passed to fun. Default is empty list.
simplify
[logical(1)] Should the result be simplified? See sapply. Default is FALSE.
use.names
[logical(1)] Should result be named by first vector if that is of class character? Default is FALSE.
level
[character(1)] The call is only parallelized if the same level is specified in parallelStart or this argument is NA. Default is NA.

Value

  • Result.

Examples

Run this code
parallelStart()
parallelMap(identity, 1:2)
parallelStop()

Run the code above in your browser using DataLab