| nwsFindTry {nws} | R Documentation |
Find a Stored Value (Non-Blocking Version)
Description
Attempt to find a value associated with a variable from the shared netWorkSpace;
a non-blocking version of nwsFind.
Usage
## S4 method for signature 'netWorkSpace'
nwsFindTry(.Object, xName, defaultVal=NULL)
Arguments
.Object |
a netWorkSpace class object |
xName |
name of variable to be found |
defaultVal |
value to return if xName is not found |
Details
The nwsFindTry method looks in the shared netWorkSpace .Object
for a value bound to xName; if it finds such a value, nwsFindTry
returns it but does not remove it.
If it does not find a value, nwsFindTry returns immediately, rather than
blocking as in the case of nwsFind), and
the value of argument defaultVal is returned.
By default, defaultVal is NULL.
If there is more than one value associated with xName, the
particular value returned depends on xName's behavior. See
nwsDeclare for details.
See Also
Examples
## Not run:
ws <- netWorkSpace('nws example')
x <- nwsFindTry(ws, 'abc', -1)
## End(Not run)
[Package nws version 1.7.0.1 Index]