loadCode | R Documentation |
source() code from a directory. This actually evaluates the code.
Often we want to analyze it statically, i.e., without running the
code.
This function is useful if the code is mostly function definitions.
But for that, we can now use getFunctionDefs
in CodeDepends
.
loadCode(dir, env = new.env(), files = list.files(dir, pattern = "\\.[RrsSqQ]$", full.names = TRUE))
dir |
the directory in which to find the R code files |
env |
the environment into which to |
files |
the full paths to the files whose code we read.
This allows the caller to provide a subset of the files and also to
control the order in which the files are |
This sources the code into the given environment.
This returns the environment env
which will contain the variables defined in the sour
Duncan Temple Lang
getFunctionDefs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.