Message-ID: <42367154246C08458DDA1F9A7AD4834670D8BA56@nc-mail.northland.edu>
Date: 2010-01-06T21:18:34Z
From: Derek Ogle
Subject: Suppress getOptions() in Stangle
Hello,
I am creating PDF handouts using Sweave for a beginner's R workshop. I want to include the R code for the handout in an appendix as described (using the listings LaTeX package) as described in ...
http://n4.nabble.com/including-Sweave-tangled-code-in-Rnw-document-tp875112p875112.html
Whenever a graphic is created in this code the resulting Stangle code precedes the plotting code with a getOptions() call. For example, this code in my RNW file ...
<<echo=FALSE,label=transLW,fig=TRUE,include=FALSE>>=
plot(logWT~logTL,data=dA)
@
\includegraphics[width=3in]{Figs/reg1-transLW}
produces the following lines in the Stangle "code" file
getOption("SweaveHooks")[["fig"]]()
plot(logWT~logTL,data=dA)
In hopes of getting the cleanest code possible for this beginner class I was wondering if anyone knew of a way to suppress the getOptions() code in the Stangle results.
Thanks in advance for any help.