[Rd] literate programming
Friedrich.Leisch at stat.uni-muenchen.de
Friedrich.Leisch at stat.uni-muenchen.de
Thu Aug 7 08:14:26 CEST 2008
>>>>> On Wed, 6 Aug 2008 10:25:38 -0500 (CDT),
>>>>> Terry Therneau (TT) wrote:
> "ESS supported noweb before Sweave existed."
> That is the bit I didn't know. What I was rather looking for was a noweb
> mode that knows about S formatting, and here it was available all along. I've
> used a version of ESS for a loooong time - probably should re-read the
> documentation one of these days to catch up on all the new
> features!
> "and the latex
> syntax was added lateron because some people write whole packages using
> noweb and would have had a syntax conflict in their vignettes"
> I'm not quite sure what this means.
Well, you can write your Sweave files also looking like
**********************************************************
This is some latex documentation bla bla bla
And here comes a code chuck:
\begin{Scode}{echo=FALSE,fig=TRUE}
plot(rnorm(100))
\end{Scode}
and here we go again with latex
**********************************************************
and Sweave will process it correctly (if the file has extension
.Rtex). As Sweave does not use noweb's magic <<>>= tags in this case,
you can use those for regular noweb processing. Of course you loose
the nice handling of code chunks by ESS in that case ...
Best,
Fritz
More information about the R-devel
mailing list