codeChunk-class {DynDoc} | R Documentation |
A class to wrap necessary information for a code chunk from a vignette file.
Objects can be created by calls of the form new("codeChunk", ...)
.
chunkName
:"character"
The name
(if one exists) for the code chunkchunk
:"character"
The code
from the code chunkoptions
:"SweaveOptions"
Any
options that were set at the time the code chunk appears in the
vignette filesignature(object = "codeChunk",
env="environment")
: Will evaluate the code in the code chunk
using the environment specified. If no environment is specified,
.GlobalEnv is used.signature(object = "codeChunk")
: Displays the
information for the code chunksignature(object = "codeChunk",
value="character")
: Edits the chunk
slot of the objectsignature(object = "codeChunk")
: Returns the
chunk
slot of the objectsignature(object = "codeChunk")
: Returns the
name of the code chunksignature(object = "codeChunk")
: Returns
the actual options from the options
slot. signature(object = "codeChunk")
: Returns
the object stored in the options
slot.Jeff Gentry
Sweave
, SweaveOptions
, chunkList
library(tools) testfile <- file.path(.path.package("tools"), "Sweave", "Sweave-test-1.Rnw") if (file.exists(testfile)) { z <- Stangle(testfile,driver=tangleToR) getChunk(z,1) }