* ob-comint.el (org-babel-comint-eval-invisibly-and-wait-for-file): New
function to evaluate code invisibly and block until output file exists.
* ob-R.el (org-babel-R-evaluate-session): Use
`ess-eval-buffer' to evaluate R code in session for :results
value. Write result to file invisibly using new function
`org-babel-comint-eval-invisibly-and-wait-for-file'.
These changes move to using standard ESS code evaluation in R sessions
in the :results value case, which avoids unnecessary output to the
comint buffer. In addition, the R command responsible for writing the
result to file is hidden from the user.
For some reason ob-R refuses to compile when it requires ob-comint.
When (require 'ob-comint) is not included in ob-R.el everything
compiles without error, but warnings are thrown because the
arguments to a macro defined in ob-comint are mis-interpreted as
functions.
When (require 'ob-comint) is added to ob-R.el then it throws errors
complaining that the last argument to a function is nil and should
be a string. I don't understand this error at all and can't fix it.