tools:::Rd_package_description("RweaveExtra")
tools:::Rd_package_author("RweaveExtra")
Maintainer: tools:::Rd_package_maintainer("RweaveExtra")
The RweaveExtraLatex
and RtangleExtra
drivers extend the standard Sweave
drivers
RweaveLatex
and
Rtangle
, respectively. They are selected
through the driver
argument of Sweave
.
The drivers provide additional options to completely ignore code
chunks on weaving, tangling, or both. Chunks ignored on weaving are
not parsed and are written out verbatim on tangling. Chunks ignored on
tangling are processed as usual on weaving, but completely left out of
the tangled scripts. The driver RtangleExtra
furthermore
provides two additional options: chunk.sep
to control the
separation (or remove it entirely) between code chunks in the tangled
script; extension
to specify the extension of the file name (or
remove it entirely) when splitting is selected.
In a literate programming workflow, the additional options allow to include code chunks in a file such as:
code that is not parsable by R (say, because of errors inserted for educational purposes);
code in another programming language entirely (say, a shell script to start an analysis);
code for a Shiny app.
With the standard drivers, using option eval = FALSE
results in
code being commented out in tangled scripts files. Chunks may be
omitted on tangling with drop.evalFALSE = TRUE
, but only
provided the chunk is not evaluated on weaving. Therefore, the
standard drivers have no provision to either omit a chunk on weaving
and tangle it as is, or to process a chunk on weaving but omit it
on tangling.