| .findElementsInEnv | R Documentation |
sim$Find all references to sim$
.parsingSim will pull out the various ways to use sim, e.g.,
sim$xxx, sim[["xxx"]], sim[[P(sim)$xxx]]
.findElementsInEnv(
envToFindSim = parent.frame(),
moduleEnv = parent.frame(),
type
)
.findElement(x, type)
.parsingSim(x, type)
envToFindSim |
An environment where |
moduleEnv |
The environment where the module functions are. |
type |
Either "get", "assign", or "globals". See details. |
x |
A call in which to search for |
.findElementsInEnv is a wrapper around .findElements.
It will convert function code to a call, and then pass it to .findElements.
It also does some cleaning for duplications, NA values, and cases where the element
inside a sim[["xxx"]] is a variable that should be evaluated, rather than
simply taken verbatim (e.g., sim[[P(sim)$stackName]]).
When type = "get", the function scans for sim$xxx or sim[["xxx"]]] on
the RHS of an assignment operator or when there is no assignment. When
type = "assign", the function scans for sim$xxx or sim[["xxx"]] on the
LHS of an assignment operator. When type = "globals", the function
scans for all functions (i.e., "globals") being used.
This is similar to codetools::findGlobals(), but faster.
.findElement will omit whatever it finds inside a is.null(), when type = "assign".
Usually this is a test of existence of that object, in order to assign to that object.
It is only reading it to determine whether or not it should write to it.
A character string with all sim objects found.
Eliot McIntire
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.