Rtangle

0th

Percentile

R Driver for Stangle

A driver for Stangle that extracts Rcode chunks.

Keywords
utilities
Usage
Rtangle()
RtangleSetup(file, syntax, output = NULL, annotate = TRUE,
             split = FALSE, quiet = FALSE, ...)
Arguments
file
Name of Sweave source file. See the description of the corresponding argument of Sweave.
syntax
An object of class SweaveSyntax.
output
Name of output file used unless split = TRUE: see Details.
annotate
By default, code chunks are separated by comment lines specifying the names and numbers of the code chunks. If FALSE the decorating comments are omitted.
split
Split output into a file for each code chunk?
quiet
If TRUE all progress messages are suppressed.
...
Additional named arguments setting defaults for further options.
Details

Unless split = TRUE, the default name of the output file is basename(file) with an extension corresponding to the Sweave syntax (e.g., Rnw, Stex) replaced by R. File names "stdout" and "stderr" are interpreted as the output and message connection respectively.

If splitting is selected (including by the options in the file), each chunk is written to a separate file with extension the name of the engine (default .R).

The annotation is of one of the forms################################################### ### code chunk number 3: viewport ###################################################

################################################### ### code chunk number 18: grid.Rnw:647-648 ###################################################

################################################### ### code chunk number 19: trellisdata (eval = FALSE) ################################################### using either the chunk label or the file name and line numbers.

Note that this driver does not simple extract the code chunks verbatim because code chunks can re-use earlier chunks.

See Also

../doc/Sweave.pdf{Sweave User Manual}, a vignette in the utils package.

Sweave, RweaveLatex

Aliases
  • Rtangle
  • RtangleSetup
Documentation reproduced from package utils, version 3.3, License: Part of R 3.3

Community examples

Looks like there are no examples yet.