[ESS] Interaction with Sweave, knitr, pandoc, polymode et al.

Charles C. Berry ccberry @end|ng |rom uc@d@edu
Mon Apr 4 17:46:16 CEST 2016


On Mon, 4 Apr 2016, Stephen Eglen wrote:

>
>
> Hi,
>
> Vincent:  we (ess-core) were recently discussing support for Rmd, so
> your questions come at a good time.
>
> Tamas: Although I like org mode, I think the knitr universe is far
> better optimised for R work.

Agree.

> One thing that always bugged me in
> org-babel is that the output goes back into the source buffer.  Is there
> a way to turn that off, so that output goes into a separate file and
> then e.g. is compiled to a pdf?

org-export-as makes a copy of the buffer before running babel using 
org-export-with-buffer-copy, and runs (org-export-execute-babel-code) in 
that buffer, so I think the answer is almost `yes'. I suppose you could 
advice org-export-execute-babel-code, if you wanted to copy that buffer 
after the babel code ran and before all the other export processing.

In interactive use, you can shunt the output of each src block to another 
file, leaving a link to that file in the original buffer by constructing 
:file (and related) header args.

FWIW, Exports to *.pdf leave a *.tex file in the output directory. 
Optionally, you can construct a *.tex file or a buffer.

HTH,

Chuck




More information about the ESS-help mailing list