Re: [Rd] Sweave driver extension

From: Yihui Xie <>
Date: Tue, 31 Jan 2012 11:23:56 -0600

On Tue, Jan 31, 2012 at 7:18 AM, Terry Therneau <> 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.


Yihui Xie <>
Phone: 515-294-2465 Web:
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA

______________________________________________ mailing list
Received on Tue 31 Jan 2012 - 17:28:11 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 31 Jan 2012 - 20:00:12 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive