From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: R plots always exported to Rplots.pdf Date: Wed, 22 May 2013 07:18:32 -0600 Message-ID: <87zjvnqazk.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfBVq-0008IR-9Y for emacs-orgmode@gnu.org; Wed, 22 May 2013 12:03:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfB9i-0001w3-Op for emacs-orgmode@gnu.org; Wed, 22 May 2013 11:41:46 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:36705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfB9i-0001vK-BC for emacs-orgmode@gnu.org; Wed, 22 May 2013 11:40:46 -0400 Received: by mail-pd0-f175.google.com with SMTP id 6so1478777pdd.34 for ; Wed, 22 May 2013 08:40:45 -0700 (PDT) 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: Greg Slodkowicz Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Greg Slodkowicz writes: > Hi, > I'm trying to generate a report with R plots using org-mode but no matter > what header arguments are you the generated files are always called > Rplots.pdf > > This is what my code block looks like: > > #+NAME: pvals_waw > #+BEGIN_SRC R :file fig1.png :exports results > pvals = read.table("waw_data.txt", header=T) > plot(pvals$pvalue, pvals$length) > #+END_SRC > > after evaluating the code block I get > > #+RESULTS: pvals_waw > [[file:fig1.png]] > > but I can see that the plot is in Rplots.pdf so subsequent attempt to > export Latex/PDF fail. I'm using org 20130522 and R 3.0. > > Best, > Greg The following example demonstrates the combination of header arguments required to generate the correctly named output. --=-=-= Content-Type: text/x-org Content-Disposition: inline; filename=R-graphics.org #+name: input | 1 | 2 | | 2 | 4 | | 3 | 9 | #+NAME: pvals_waw #+headers: :var input=input #+BEGIN_SRC R :results graphics :file output.pdf plot(input) #+END_SRC after evaluating the code block I get #+RESULTS: pvals_waw [[file:output.pdf]] --=-=-= Content-Type: text/plain This should be documented on Worg, but there is no doubt that there is still work to be done on language-specific header argument documentation. -- Eric Schulte http://cs.unm.edu/~eschulte --=-=-=--