Rtangle {utils}R Documentation

R Driver for Stangle

Description

A driver for Stangle that extracts R code chunks.

Usage

Rtangle()
RtangleSetup(file, syntax, output = NULL, annotate = TRUE,
             split = FALSE, prefix = TRUE, 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, only the code chunks without any decorating comments are extracted.
split Split output into a file for each code chunk?
prefix If split = TRUE, prefix the chunk labels by the basename of the input file to get output file names?
quiet If TRUE all progress messages are suppressed.

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’.

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’).

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

Author(s)

Friedrich Leisch and R-core.

See Also

Sweave User Manual’, a vignette in the utils package.

Sweave, RweaveLatex


[Package utils version 2.13.0 Index]