From xie at yihui.name  Tue Jan 31 18:23:56 2012
From: xie at yihui.name (Yihui Xie)
Date: Tue, 31 Jan 2012 11:23:56 -0600
Subject: [Rd] Sweave driver extension
In-Reply-To: <1328015890.14959.16.camel@nemo>
References: <1327434615.8525.38.camel@nemo>
	<CANROs4f+ObUuxTN5hvdbWhZbuTwL_Gdq1GQCXKnM2taWDrzQ7Q@mail.gmail.com>
	<4F26DC7F.7040903@gmail.com>
	<CANROs4c6QFR2QVyFiu6GHhKdWHRiEptSB9MpciEbGR--JwRuVQ@mail.gmail.com>
	<1328015890.14959.16.camel@nemo>
Message-ID: <CANROs4e+bsa6WuaW7ARXwnzd_cTGTWzE0G+h3TjkRNDRy-b0Qg@mail.gmail.com>

On Tue, Jan 31, 2012 at 7:18 AM, Terry Therneau <therneau at mayo.edu> wrote:
> Three thinngs -
> ? My original questions to R-help was "who do I talk to". ?That was
> answered by Brian R, and the discussion of how to change Sweave moved
> offline. ?FYI, I have a recode in hand that allows arbitrary reordering
> of chunks; but changes to code used by hundreds need to be approached
> cautiously. ?Like the witch says in Wizard of Oz: "... But that's not
> what's worrying me, it's how to do it. ?These things must be done
> delicately, or you hurt the spell."
>
> ? A few emails have made me aware of others who use noweb. ?Most of
> them, as I have, use the original Unix utility. ?But since survival is
> so interwoven with R I am trying to impliment that functionality
> entirely in R to make the code self contained. ?Just working out how to
> best do so.
>
> ?Yihui: with respect to the note below, I don't see why you want to add
> new syntax. ?Why add "run_chunk(a)" when it is a synonym for <<a>>?

A short answer is it is easy to implement, because run_chunk() uses
eval() which naturally supports recursion (you can eval(parse(text =
"eval(parse(text = ...))"))).

I think I will add <<>> in the next few days too. There have been
quite a few features like this one that I did not plan to do because I
do not use them at all, but I added them to knitr one by one anyway
when I saw convincing reasons (function overhead problems in this
case). So I really appreciate these discussions.

I feel r-devel is not a good place for me to chime in, so I will turn
the discussion irrelevant to r-devel offline later.

>
> Terry T.
>
>


Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA



[Rd] Sweave driver extension
Yihui Xie