nwsFindTry {nws} | R Documentation |
Attempt to find a value associated with a variable from the shared netWorkSpace;
a non-blocking version of nwsFind
.
## S4 method for signature 'netWorkSpace': nwsFindTry(.Object, xName, defaultVal=NULL)
.Object |
a netWorkSpace class object |
xName |
name of variable to be found |
defaultVal |
value to return if xName is not found |
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.
## Not run: ws <- netWorkSpace('nws example') x <- nwsFindTry(ws, 'abc', -1) ## End(Not run)