runUpToSection

0th

Percentile

Evaluate the code blocks up to a particular section of a document

This function allows the caller to evaluate the code blocks within a document all the way up to a specified section of the document.

Keywords
programming
Usage
runUpToSection(section, doc, all = TRUE, env = globalenv(),
                nestedEnvironments = FALSE, frags = readScript(doc),
                 verbose = FALSE)
Arguments
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 TRUE for now.

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

Value

A list containing the results of evaluating the different fragments. The list will have a length given by the section number.

Note

Currently, all = FALSE is not implemented.

See Also

sourceVariable

Aliases
  • runUpToSection
Examples
# NOT RUN {
 frags = parse(system.file("samples", "dual.R", package = "CodeDepends"))  
 runUpToSection(3, frags = frags, verbose = TRUE, all = TRUE)
# }
Documentation reproduced from package CodeDepends, version 0.6.5, License: GPL

Community examples

Looks like there are no examples yet.