From cbeleites at units.it  Fri Aug 20 11:38:32 2010
From: cbeleites at units.it (Claudia Beleites)
Date: Fri, 20 Aug 2010 11:38:32 +0200
Subject: [Rd] Does anyone use Sweave (RweaveLatex) option "expand=FALSE"?
In-Reply-To: <4C6D9D26.9060505@gmail.com>
References: <4C6D80E3.2090806@gmail.com> <4C6D9431.4020104@units.it>
	<4C6D9634.4030003@gmail.com> <4C6D9D26.9060505@gmail.com>
Message-ID: <4C6E4D18.7050801@units.it>

Dear Kevin,

thank you for the explanation.

 > I use it, frequently. The idea for it goes back to some of Knuth's
 > original literate programming ideas for developing weave and tangle when
 > he was writing TeX (the program).  I want to be able to document the
 > pieces of some complex algorithm without having to see all of the gory
 > details.  For instance, I have code that looks like the following.
 > (Note that this is typed on the fly rather than copied from actual
 > source, so there may be typos.)
 >
 > <<mainloop,keep.source=TRUE,expand=FALSE>>=
 > for (i in 1:nSamples) {
 > <<getInfoAboutThisSample>>
 > for (j in 1:nChromosomes) {
 > <<getChromosomeDataForCurrentSample>>
 > <<normalizeChromosomeData>>
 > <<findSegments>>
 > <<computeSignificance>>
 > <<writeResults>>
 > }
 > }
 > @

Sounds & looks like after invention of the macro and before invention of the 
function?

However, I'll stay with functions: my new RAM already arrived :-)
But: you never know. It may come handy some day also for me.

I'll be a great fan of errors reported with line number! And if the reporting 
isn't that convenient in expand = FALSE chunks, it still helps a lot in many, 
many  expanded chunks, right?.


My 2 ct,

Claudia

-- 
Claudia Beleites
Dipartimento dei Materiali e delle Risorse Naturali
Universit? degli Studi di Trieste
Via Alfonso Valerio 6/a
I-34127 Trieste

phone: +39 0 40 5 58-37 68
email: cbeleites at units.it



[Rd] Does anyone use Sweave (RweaveLatex) option "expand=FALSE"?
Claudia Beleites