|
From: | Erik Iverson |
Subject: | Re: [Orgmode] Re: org-babel-R export parameters |
Date: | Mon, 07 Jun 2010 13:40:32 -0500 |
User-agent: | Thunderbird 2.0.0.23 (X11/20090812) |
<snip>
#+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_srcI 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.
[Prev in Thread] | Current Thread | [Next in Thread] |