getVariables | R Documentation |
These functions and methods allow one to get the names of the variables used within a script or block of code and from various derived types.
getVariables(x, inputs = FALSE, functions = TRUE, ...)
x |
the object with information about the variables |
inputs |
a logical indicating wether to include the input
variables or just return the output variables, i.e. those on the
left hand side of of an assignment. Defaults to |
functions |
Indicates what types of functions should be
included. |
... |
Passed to |
A character vector, with possibly repeated values, giving the names of the variables. If an annotated script was used, the vector is named by the sections of the script.
Duncan Temple Lang
readScript
getInputs
f = system.file("samples", "namedAnnotatedScript.R", package = "CodeDepends")
sc = readScript(f, "labeled")
getVariables(sc)
getVariables(sc[[3]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.