findUsedOptions | R Documentation |
This analyzes R code to find any reference to an R option, e.g.,
options()$prompt
, getOption("prompt", "> ")
, etc.
findUsedOptions(code, asNodes = FALSE)
code |
the R code |
asNodes |
a logical value which if |
If asNodes
is FALSE
, a character vector.
If asNodes
is TRUE
, a list of rstatic
language objects.
Duncan Temple Lang
find_nodes
findUsedOptions(body(dev.new))
findUsedOptions(body(dev.new), TRUE)
# Shows can handle options in the default values of a function parameter.
f = function(x, ext = getOption("MyOpt", FALSE)) {
if(ext)
readLines(x)
x
}
findUsedOptions(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.