runUpToSection | R Documentation |
This function allows the caller to evaluate the code blocks within a document all the way up to a specified section of the document.
runUpToSection(section, doc, all = TRUE, env = globalenv(),
nestedEnvironments = FALSE, frags = readScript(doc),
verbose = FALSE)
section |
the index of the section, i.e. a number |
doc |
the name of the file containing the code |
all |
a logical value. It should be |
env |
the environment in which the expressions will be evaluated |
nestedEnvironments |
a logical value controlling whether the each code block should be evaluated in its own environment which are created with the previous code block's environment as a parent environment. |
frags |
the code fragments read from the document or specified directly by the caller. |
verbose |
logical value indicating whether to display the code |
A list containing the results of evaluating the different fragments. The list will have a length given by the section number.
Currently, all = FALSE
is not implemented.
Duncan Temple Lang
sourceVariable
frags = parse(system.file("samples", "dual.R", package = "CodeDepends"))
runUpToSection(3, frags = frags, verbose = TRUE, all = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.