Learn R Programming

nws (version 1.7.0.1)

export: sleigh Class Method

Description

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

Usage

"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

Run this code
## 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)

Run the code above in your browser using DataLab