export {nws}R Documentation

sleigh Class Method

Description

Define a variable in the scope of the workers or specified worker.

Usage

## S4 method for signature 'sleigh':
export(.Object, xName, xVal, worker=NULL)

Arguments

.Object a sleigh class object.
xName a variable name (given as a quoted string in the function call).
xVal a value to be assigned to 'x'.
worker integer rank of the worker where the variable is defined. The rank values range from 0 to workerCount - 1. By default, the variable is defined on all workers in the sleigh.

See Also

unexport

Examples

## Not run: 
s <- sleigh()
m <- matrix(rnorm(16), 4, 4)
export(s, 'm', m)
eachWorker(s, function() m %*% matrix(rnorm(16), 4, 4), eo=list(closure=FALSE))
## End(Not run)

[Package nws version 1.7.0.0 Index]