Associate a Value with a Variable in netWorkSpace
Store value associated with a variable in the shared netWorkSpace.
## S4 method for signature 'netWorkSpace' nwsStore(.Object, xName, xVal)
a netWorkSpace class object.
character string to be used as the name of the stored variable.
value to be stored.
nwsStore method associates the value
xVal with the
xName in the
.Object, thereby making the
value available to all the distributed R processes. If a mode
has not already been set for
'fifo' will be used (see
Note that, by default (
nwsStore is not idempotent:
nwsStore (nws, xName, xVal) will add additional values to the
set of values associated with the variable named
xName. See the examples
below for details.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
## Not run: ws <- netWorkSpace('nws example') # To store value 5 bound to variable 'x' on the netWorkSpace 'ws' # (If 'x' was declared, then its mode is inherited, # otherwise 'x' uses the default mode 'fifo') nwsStore(ws, 'x', 5) # store 10 values associate with variable y to the netWorkSpace for (i in 1:10) nwsStore(ws, 'y', i) # retrieve 10 values associate with variable y from the netWorkSpace for (i in 1:10) print(nwsFetch(ws, 'y')) ## End(Not run)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.