\HeaderA{tangleToR}{An Sweave driver to retrieve code chunks}{tangleToR}
\aliasA{tangleToRFinish}{tangleToR}{tangleToRFinish}
\aliasA{tangleToRRuncode}{tangleToR}{tangleToRRuncode}
\aliasA{tangleToRSetup}{tangleToR}{tangleToRSetup}
\keyword{utilities}{tangleToR}
\begin{Description}\relax
A driver function for \code{Sweave} which will provide the user with
code chunks from a vignette file within R.  Functionality is very
similar to that provided by \code{Stangle} except that an R object is
returned as opposed to the chunks being written to a file.
\end{Description}
\begin{Usage}
\begin{verbatim}
tangleToR()
\end{verbatim}
\end{Usage}
\begin{Value}
An object of type \code{chunkList} is returned, which contains the
code chunks from the vignette file.
\end{Value}
\begin{Author}\relax
Jeff Gentry
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{Stangle}{Stangle}},\code{\LinkA{Sweave}{Sweave}}, \code{\LinkA{chunkList}{chunkList}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
    library(tools)
    testfile <- file.path(.path.package("tools"),
                           "Sweave", "Sweave-test-1.Rnw")
    if (file.exists(testfile))
        z <- Stangle(testfile,driver=tangleToR)
\end{ExampleCode}
\end{Examples}


