When using #Begin_Src R
blocks one can change the code in blocks and then rerun all the code blocks in a document. Great.
However, if one does this with inline src, such as, src_R[:session *myRSession* :exports results :results raw value]{length(unique(someDataFrame$SomeVariable[someDataFrame$conditionVariable == "1"]))}
one will get an output as text following this, e.g. 12. If one repeatedly evaluates all the code blocks in the file one gets an ever growning string of text "12 12 12 12 ..." Which results in one having to go in manually afterwords to clean it up.
The challenge is that in using orgmode and orgbabel to practice reproducible research by writing a technical manuscript one can have a lot of these inline statements (e.g. for every statistical test, p-values, degrees of freedom and so on).
Has anyone solved this, or have any suggestions? I have used knitr with an .Rtex file as an alternative. While this solves the in-line issue it has it's own challenges, and ideally I would like to settle on one markup format for all papers that blend code with text (and would prefer that that markup language be orgmode).
:results replace
header argument? That has helped me avoid appending results. – Emacs User Jun 1 '16 at 20:08