cacheSweave {cacheSweave}R Documentation

Cache Sweave Computations

Description

Cache computations when using Sweave

Usage

cacheSweaveDriver()

Details

Computations in Sweave documents can be cached by setting the option cache=true in the code check declaration. When this option is set, objects that are created in the code chunk (either through assignment or by side effects) are stored in a key-value database in the directory specified by setCacheDir.

The cacheSweaveDriver function is used directly with Sweave and is passed as the driver argument. cacheSweaveDriver also creates a "map file" which has the extention ".map" which contains metadata for each of the code chunks in a document. This map file can be used in conjunction with the RRPM package for creating reproducible research packages.

Value

Nothing useful is returned.

Note

Code chunks that have side effects that do not result in objects being created in the global environment (i.e. plotting or system interaction) should generally not be cached since the code will not be run upon reevaluation.

Author(s)

Roger D. Peng rpeng@jhsph.edu, with much code for cacheSweaveDriver copied from Sweave source by Friedrich Leisch

See Also

Sweave and package RRPM


[Package cacheSweave version 0.4-3 Index]