Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

batchMap

Maps a function over lists or vectors, adding jobs to a registry.


Description

You can then submit these jobs to the batch system.

Usage

batchMap(reg, fun, ..., more.args = list(), use.names = FALSE)

Arguments

reg

[Registry]
Empty Registry that will store jobs for the mapping.

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.

use.names

[logical(1)]
Store parameter names to enable named results in loadResults and some other functions. Default is FALSE.

Value

Vector of type integer with job ids.

Examples

reg = makeRegistry(id = "BatchJobsExample", file.dir = tempfile(), seed = 123)
f = function(x) x^2
batchMap(reg, f, 1:10)
print(reg)

BatchJobs

Batch Computing with R

v1.8
BSD_2_clause + file LICENSE
Authors
Bernd Bischl <bernd_bischl@gmx.net>, Michel Lang <michellang@gmail.com>, Henrik Bengtsson <henrikb@braju.com>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.