Description Usage Arguments Details Examples
Declare a variable with particular mode in a shared netWorkSpace.
1 | nwsDeclare(.Object, xName, mode)
|
.Object |
a netWorkSpace class object. |
xName |
character string giving the name of variable to be declared. |
mode |
character string specifying the mode of the variable, see Details. |
If xName
has not already been declared in the netWorkSpace, the behavior
of xName
will be determined by mode
. Possible values are
'fifo'
(the default), 'lifo'
, 'multi'
, or
'single'
. In the first three cases,
multiple values can be associated with xName
. When a value is
retrieved for xName
, the oldest value stored will be used in
'fifo'
mode, the youngest in 'lifo'
mode, and a
nondeterministic choice will be made in 'multi'
mode. In
'single' mode, only the most recent value is retained.
1 2 3 4 5 6 7 8 | ## Not run:
ws <- netWorkSpace('nws example')
nwsDeclare(ws, 'pi', 'single')
nwsStore(ws, 'pi', 2.171828182)
nwsStore(ws, 'pi', 3.141592654)
nwsListVars(ws) # shows that only the most recent value of pi is retained
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.