From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Landis Subject: problems with R graphics Date: Thu, 1 Mar 2012 02:18:05 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2vcp-0002Cd-TG for emacs-orgmode@gnu.org; Wed, 29 Feb 2012 21:20:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2vcn-0003Zp-NW for emacs-orgmode@gnu.org; Wed, 29 Feb 2012 21:20:11 -0500 Received: from plane.gmane.org ([80.91.229.3]:42095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2vcn-0003ZB-Ge for emacs-orgmode@gnu.org; Wed, 29 Feb 2012 21:20:09 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S2vch-0007Gm-Qx for emacs-orgmode@gnu.org; Thu, 01 Mar 2012 03:20:04 +0100 Received: from c-75-69-36-245.hsd1.vt.comcast.net ([75.69.36.245]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 01 Mar 2012 03:20:03 +0100 Received: from landis by c-75-69-36-245.hsd1.vt.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 01 Mar 2012 03:20:03 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hello all, I believe this is my first post on this list, and I'm very new to org-babel, so forgive me if I am posting nonsense. However, I'm really enthused about the possibilities org-babel presents. Unfortunately, I can't seem to get graphics to insert themselves properly on export. I've included an example that reproduces my problem below. For what it's worth, I am using Windows 7 with a freshly downloaded issue of Vincent Goulet's package. Session info: Emacs version: GNU Emacs 23.4.1 (i386-mingw-nt6.1.7601) of 2012-02-04 on MARVIN Org mode version 7.8.03 ESS version 5.14 R version 2.14.1 Many thanks for any thoughts or requests for more info. Matt org example ---------------------------- #+TITLE: An attempt to make org-mode work with R In this example, I want to fit a regression and plot it. I'm following the examples at the [[http://orgmode.org/worg/org- contrib/babel/languages/ob-doc-R.html][org manual]] and Erik Iverson's [[https://github.com/erikriverson/org-mode-R-tutorial][tutorial]]. * A stand-alone code block First, create some data, perform a regression, and plot it. This works great. #+begin_src R :results graphics :file regress.png :exports both x <- runif(n = 100, min = 0, max = 20) y <- 5*x^2 + 0.3*x + 3 + rnorm(100, sd = 200) f <- lm(y ~ x) plot(x, y, bty = 'n') abline(f, lty = 'dashed') #+end_src Success. * In code blocks using ":session" Now do the same thing, but across an unnamed session #+begin_src R :session :exports code :results silent x <- runif(n = 100, min = 0, max = 20) y <- 5*x^2 + 0.3*x + 3 + rnorm(100, sd = 200) #+end_src Now, I would like to display the results of the regression as R output. #+begin_src R :session :results output :exports both f <- lm(y ~ x) summary(f) #+end_src Again, success! This is really going to come in handy. #+begin_src R :session :results graphics :file regress_session.png :exports both plot(x, y, bty = 'n') abline(f, lty = 'dashed') #+end_src This code block doesn't work. No error, but no file is created. Also, if I press C-c C-c in the code block, in the org file I get #+begin_example #+results: [[file:regress_session.png]] #+end_example But no file is actually created. What could be going wrong?