[ESS] Change in ESS affects Org generating images through R session

Charles C. Berry ccberry @end|ng |rom uc@d@edu
Fri Apr 8 19:19:39 CEST 2016

On Fri, 8 Apr 2016, William Denton wrote:

> It's possible a recent change in ESS has broken generating images with R in 
> Org. I raised this on the Org list and was asked to bring it over here (see 
> below).

I get the same error without org-mode.

> This works in Org, and generates an image:
> #+BEGIN_SRC R :results graphics :file example.png
> plot(1)
> But if I start an R session (M-x R) and then run this, with :session, I get 
> an error.
> #+BEGIN_SRC R :session :results graphics :file example.png
> plot(1)

The code this passes to ESS is

   png(filename="example.png"); tryCatch({
   },error=function(e){plot(x=-1:1, y=-1:1, type='n', xlab='', ylab='', axes=FALSE); text(x=0, y=0, labels=e$message, col='red'); paste('ERROR', e$message, sep=' : ')}); dev.off()

and if I paste this into a *.R buffer and try to run ess-eval-buffer it returns the same error.

Repreating `ess-eval-line-step' will run this flawlessly.

This is with

ess-version: 15.09-2 patched [git: e87714be20a038b650e49cb2d798531175a8654f]

> The error is
> + + Error: unexpected symbol in:
> "plot(1)
> },error=function(e){plot(x=-1:1, y=-1:1, type='n"




More information about the ESS-help mailing list