From mboxrd@z Thu Jan 1 00:00:00 1970 From: Riccardo Romoli Subject: Generating plot with org-babel-R Date: Sat, 4 Feb 2012 23:52:28 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d041a438ea0094b04b82b48b6 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:38558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtoT9-0008JZ-0h for emacs-orgmode@gnu.org; Sat, 04 Feb 2012 17:52:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtoT7-0000ra-NH for emacs-orgmode@gnu.org; Sat, 04 Feb 2012 17:52:30 -0500 Received: from mail-pz0-f41.google.com ([209.85.210.41]:52118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtoT7-0000rW-Gg for emacs-orgmode@gnu.org; Sat, 04 Feb 2012 17:52:29 -0500 Received: by dadv6 with SMTP id v6so4232075dad.0 for ; Sat, 04 Feb 2012 14:52:28 -0800 (PST) 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 --f46d041a438ea0094b04b82b48b6 Content-Type: text/plain; charset=ISO-8859-1 Hi, I'm trying to generate some figure with R, into an org session. Firstly I use the code in the org site. The problem is that the code do not generate any figure. This is the code: #+TITLE:Test #+AUTHOR: Your Name #+EMAIL: your-email@server.com #+BABEL: :session *R* :cache yes :results output graphics :exports both :tangle yes * Example of Org-Babel for R Literate Programming ** R text output A simple summary. #+begin_src R x <- rnorm(10) summary(x) #+end_src ** R graphics output Note we use the object =x= generated in previous code block, thanks to the header option =:session *R*=. The output graphics file is =a.png=. #+begin_src R :file a.png y <- rnorm(10) plot(x, y) #+end_src Same plot with larger dimension: #+begin_src R :file b.png :width 800 :height 800 plot(x, y) #+end_src Where do I wrong? Best Riccardo --f46d041a438ea0094b04b82b48b6 Content-Type: text/html; charset=ISO-8859-1 Hi, I'm trying to generate some figure with R, into an org session. Firstly I use the code in the org site. The problem is that the code do not generate any figure.

This is the code:

#+TITLE:Test 
#+AUTHOR: Your Name
#+EMAIL: your-email@server.com
#+BABEL: :session *R* :cache yes :results output graphics :exports both :tangle yes 

* Example of Org-Babel for R Literate Programming
** R text output
A simple summary. 
#+begin_src R 
  x <- rnorm(10)
  summary(x)
#+end_src

** R graphics output
Note we use the object =x= generated in previous code block, thanks to
the header option =:session *R*=.  The output graphics file is
=a.png=. 

#+begin_src R  :file a.png
  y <- rnorm(10)
  plot(x, y)
#+end_src

Same plot with larger dimension:

#+begin_src R  :file b.png :width 800 :height 800
  plot(x, y)
#+end_src

Where do I wrong?

Best
Riccardo
--f46d041a438ea0094b04b82b48b6--