sleigh Class Method

Description

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

Usage

1
2
## 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

1
2
3
4
5
6
7
## 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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.