Description Usage Arguments Details Examples
Try to get the value of a symbol if exists or return a default value
1 | tryGet(symbol, def = NULL, ..., envir = parent.frame())
|
symbol |
the symbol to examine |
def |
the default value if the symbol does not exist |
... |
additional parameters passed to |
envir |
the environment to examine whether the symbol exists and get the symbol |
By default, the symbol is examined in envir
without inheritance,
that is, if the symbol does not exist in envir
the default value
def
will be returned.
1 2 |
$a
[1] 2
$b
[1] 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.