RtangleExtra {RweaveExtra} | R Documentation |
R Driver for Stangle with Additional Options
Description
A driver for Sweave
extending the standard driver
Rtangle
with additional code chunk options.
Usage
RtangleExtra()
RtangleExtraSetup(file, syntax, output = NULL, annotate = TRUE,
split = FALSE, quiet = FALSE, drop.evalFALSE = FALSE,
ignore.on.tangle = FALSE, ignore = FALSE,
extension = NULL, ...)
Arguments
file |
Name of Sweave source file. See the description of the
corresponding argument of |
syntax |
An object of class |
output |
Name of output file used unless |
annotate |
|
split |
Split output into a file for each code chunk? |
quiet |
Logical to suppress all progress messages. |
drop.evalFALSE |
See |
ignore.on.tangle |
If |
ignore |
An alternative way to set both |
extension |
Extension to use for the file name, without the
leading dot, when splitting is selected. If |
... |
See |
Details
Chunks ignored on tangling are not written out to script files, but
they are processed normally on weaving (unless ignore = TRUE
).
Therefore, chunks may still use eval = TRUE
for weaving
purposes, yet not be tangled.
The argument extension
is specially useful with
ignore.on.weave = TRUE
of RweaveExtraLatex
to
include code or text that the engine would not be able to parse.
Value
Named list
of five functions; see Sweave
or the ‘Sweave User Manual’ vignette in the utils
package.
Author(s)
Vincent Goulet, based on work by Friedrich Leisch and R-core.
See Also
RweaveExtraLatex
, Rtangle
,
Sweave
.
Examples
testfile <- system.file("examples", "example-extra.Rnw",
package = "RweaveExtra")
## Check the contents of the file
if (interactive()) file.show(testfile)
## Tangle the file in the current working directory
Stangle(testfile, driver = RtangleExtra())
## View tangled file
if (interactive()) file.show("example-extra.R")
## Use 'extension=sh' with 'ignore.on.weave=TRUE', and
## the options 'split=TRUE' and 'prefix=FALSE' of Stangle
## to extract the shell script to a file 'hello.sh'
Stangle(testfile, driver = RtangleExtra(),
split = TRUE, annotate = FALSE)
if(interactive()) file.show("hello.sh")