Learn R Programming

BBmisc (version 1.2-200)

parallelExport: Export a larger object which is needed in slave code of parallelMap.

Description

Objects can later be retrieved with parallelGetExported in slave code.

Usage

parallelExport(..., list = character(0))

Arguments

...
[character(1)] Names of object to export.
list
[list of character(1)] Names of objects to export. Alternative way to pass arguments.

Value

  • Nothing.

Details

For local and multicore mode the objects are stored in a package environment, for snowfall sfExport is used internally.

Examples

Run this code
foo <- 100
f <- function(x) x + parallelGetExported("foo")
parallelStart(mode="local")
parallelExport("foo")
y <- parallelMap(f, 1:3)
parallelStop()

Run the code above in your browser using DataLab