[ESS] Support for knitr?

Stephen Eglen S.J.Eglen at damtp.cam.ac.uk
Thu Jan 12 16:10:14 CET 2012


Kevin Wright <kw.stat at gmail.com> wrote:

> After many years using Sweave, I have switched to knitr.  See
> http://yihui.github.com/knitr/ for an overview of the package.
> 
> Is it worth evaluating the possibility of replacing some of the hard-coded
> use of "Sweave" in the 'ess-*" functions with a variable that could accept
> other functions like "knit"?  There may be others (pgfSweave???).
> 
> Alternatively, it might be simpler to just create new functions like
> "ess-swv-knit".
> 
> I don't know enough of the architecture of the relevant R/lisp code to
> suggest a best approach.

hi Kevin,

Supporting other tools like knitr is on my todo list.  There are a
couple of issues worth untangling:

- ESS support for editing multiple-modes in one file.  What regexps
  should be used to separate code from doc?  knitr seems to support a
  lot of formats which can cause headaches, whereas the noweb <<>> and @
  delimiters are simple.  If you were to restrict yourself to noweb
  separators, that might simplify matters.

- ESS support for compiling the documents.  (For this I'm in favour of
  the end user using Makefiles rather than ESS.)

Stephen



More information about the ESS-help mailing list