Skip to content
Prev 36716 / 63424 Next

Using Sweave in hostile environments

Just for the archives, a partial answer to my question:

I was unable to find a definition for the Sinput environment that would 
work, but relatively minor changes to some of the RweaveLatex functions 
cause Sweave to generate SaveVerbatim environments rather than Sinput 
environments, and that's enough to get things to work.  So the example 
below would be handled using

<<chunkname, eval=FALSE, saveVerbatim=TRUE>>=
x <- 1
@

somewhere safe, and then

\BUseVerbatim[fontshape=sl]{chunkname.in.1}

in the box.  Each piece of input or output will be saved in a separate 
verbatim piece, and they each need to be used explicitly:  you'll 
probably want to look at the .tex file to figure out the names.

This is pretty rough and I won't commit it to R, but I've attached the 
patch file (against R trunk rev 51988) in case anyone else wants to use it.

Duncan Murdoch
On 13/05/2010 10:19 AM, Duncan Murdoch wrote:
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Sweave.patch
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20100514/5bd60eac/attachment.pl>