Learn R Programming

RweaveExtra (version 1.2-0)

RweaveExtraLatex: R/LaTeX Driver for Sweave with Additional Options

Description

A driver for Sweave extending the standard driver RweaveLatex with additional code chunk options.

Usage

RweaveExtraLatex()

RweaveExtraLatexSetup(file, syntax, output = NULL, quiet = FALSE, debug = FALSE, stylepath, ignore.on.weave = FALSE, ignore = FALSE, ...)

Value

Named list of five functions; see Sweave

or the ‘Sweave User Manual’ vignette in the utils

package.

Arguments

file

Name of Sweave source file. See the description of the corresponding argument of Sweave.

syntax

An object of class SweaveSyntax. See RweaveLatex.

output

Name of output file. See RweaveLatex.

quiet

If TRUE all progress messages are suppressed. See RweaveLatex.

debug

If TRUE, input and output of all code chunks is copied to the console. See RweaveLatex.

stylepath

See RweaveLatex.

ignore.on.weave

If TRUE, the code chunk is ignored entirely, i.e., neither parsed nor evaluated.

ignore

An alternative way to set both ignore.on.weave and ignore.on.tangle of RtangleExtra.

...

See RweaveLatex.

Author

Vincent Goulet, based on work by Friedrich Leisch and R-core.

Details

Chunks ignored on weaving are not parsed and are not evaluated, but they are written out on tangling as normal code chunks (unless ignore=TRUE).

If ignore.on.weave or ignore is FALSE, the code chunk is processed using the standard driver RweaveLatex with its options.

See Also

RtangleExtra, RweaveLatex, Sweave.

Examples

Run this code
testfile <- system.file("examples", "example-extra.Rnw", package = "RweaveExtra")
oldwd <- setwd(tempdir())
## Check the contents of the file
if(interactive()) file.show(testfile)

## Weave, then tangle the file in the current working directory
Sweave(testfile, driver = RweaveExtraLatex())
Stangle(testfile, driver = RtangleExtra())

## View weaved and tangled files
if(interactive()) file.show("example-extra.tex")
if(interactive()) file.show("example-extra.R")

if(!interactive()) unlink("example-extra*")
setwd(oldwd)

Run the code above in your browser using DataLab