freeVariables | R Documentation |
This statically analyzes the code and finds variables that may be used
directly but that are not previously defined.
This optionally can take into account code that is source
d,
variables that are available via the code loading packages, and variables that are created via load
.
This is analogous to getGlobals
and
findGlobals
but for R scripts rather than functions.
freeVariables(sc, load = TRUE, packages = TRUE, includeSource = TRUE,
exclude = getSearchPathVariables(), inputs = getInputs(sc))
sc |
the R code, either created via |
load |
a logical value controlling whether to read files that are
|
packages |
a logical value that controls whether to determine the
names of the variables that become available to the code when a packge
is loaded via |
includeSource |
a logical value controlling whether
this function processes calls to |
exclude |
which variables to exclude from the undefined variables, but treat as being externally defined. |
inputs |
typically not provided but the |
a character vector
Duncan Temple Lang
getGlobals
findGlobals
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.