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)
the index of the section, i.e. a number
the name of the file containing the code
a logical value. It should be TRUE
for now.
the environment in which the expressions will be evaluated
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.
the code fragments read from the document or specified directly by the caller.
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.
# NOT RUN { frags = parse(system.file("samples", "dual.R", package = "CodeDepends")) runUpToSection(3, frags = frags, verbose = TRUE, all = TRUE) # }