From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erik Iverson Subject: Re: Re: org-babel-R export parameters Date: Mon, 07 Jun 2010 13:40:32 -0500 Message-ID: <4C0D3D20.7020304@ccbr.umn.edu> References: <20100606225802.GC13859@thinkpad.adamsinfoserv.com> <87k4qbyc5p.fsf@stats.ox.ac.uk> <20100607080434.GD13859@thinkpad.adamsinfoserv.com> <871vcjp631.fsf@stats.ox.ac.uk> <20100607103100.GE13859@thinkpad.adamsinfoserv.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=53194 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLhFa-0005QK-G8 for emacs-orgmode@gnu.org; Mon, 07 Jun 2010 14:40:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLhFV-00013y-Kl for emacs-orgmode@gnu.org; Mon, 07 Jun 2010 14:40:42 -0400 Received: from walleye.ccbr.umn.edu ([128.101.116.11]:3350) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLhFV-00013l-Ez for emacs-orgmode@gnu.org; Mon, 07 Jun 2010 14:40:37 -0400 In-Reply-To: <20100607103100.GE13859@thinkpad.adamsinfoserv.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dan Davison , emacs-orgmode >> >> #+begin_src R :results file :var basename="myplot" >> a <- 1:4 >> pngfile <- sprintf("%s.png", basename) >> pdffile <- sprintf("%s.pdf", basename) >> >> png(pngfile) >> plot(a) >> dev.off() >> >> pdf(pdffile) >> plot(a) >> dev.off() >> >> pngfile >> #+end_src > > I like this better, and I can use dev.copy here too. The issue is a > plot is rarely one line. Most of my plots are a half page of code > between the data set, legend, etc. > You could just make your complex plots functions, and then call your function in in one line. Or if you're using lattice or ggplot2, create objects representing the plot, and then plot them in one line.