Hi Tom,

2015ko apirilak 23an, "Thomas S. Dye"-ek idatzi zuen:
> 
> IIRC :results output graphics is needed for the ggplot package.

Hmm.  This is the case if the code is *not* evaluated in a session.  In
a session, either value or output result types work.  (All this has been
tested with a recent master version.)  An unfortunate situation – IMO
the value type ought to work outside of a session, provided that the
value of the last expression in the block is a ggplot object.

Here’s a code block that can be adapted to test various combinations:

#+begin_src R :results output graphics :file foo.png :session *foo*
  library(ggplot2)
  ggplot(data.frame(x = rnorm(10), y = rnorm(10)),
         aes(x = x, y = y)) +
    geom_point()
#+end_src

-- 
Aaron Ecay

Reply via email to