Re: [Orgmode] Re: org-babel-R export parameters

2010-06-07 Thread Eric Schulte
Erik Iverson writes: >> I personally find this useful because it allows me to use code blocks to >> generate results, and then when I'm content with the file I can set >> ":exports none" to avoid re-generating the file on every export -- while >> retaining the existing link keeps the file include

Re: [Orgmode] Re: org-babel-R export parameters

2010-06-07 Thread Russell Adams
On Mon, Jun 07, 2010 at 12:44:43PM -0700, Eric Schulte wrote: > The png is still included your output because the link to the png is > part of your org-mode buffer. That explains it. So here's the fix, add # at the beginning of the line with the inline image.

Re: [Orgmode] Re: org-babel-R export parameters

2010-06-07 Thread Erik Iverson
I personally find this useful because it allows me to use code blocks to generate results, and then when I'm content with the file I can set ":exports none" to avoid re-generating the file on every export -- while retaining the existing link keeps the file included in my export. I do see how th

Re: [Orgmode] Re: org-babel-R export parameters

2010-06-07 Thread Eric Schulte
Hi Russel, Russell Adams writes: [...] > > So my current issue is that it appears that even though I set :export > none, the png is still included in my Latex output. > > Suggestions? > The png is still included your output because the link to the png is part of your org-mode buffer. > > #+res

Re: [Orgmode] Re: org-babel-R export parameters

2010-06-07 Thread Russell Adams
On Mon, Jun 07, 2010 at 01:40:32PM -0500, Erik Iverson wrote: > 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. Funny you should mentio

Re: [Orgmode] Re: org-babel-R export parameters

2010-06-07 Thread Erik Iverson
#+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

Re: [Orgmode] Re: org-babel-R export parameters

2010-06-07 Thread Erik Iverson
The idea is I want to be able to see the inline PNG image of my graph while writing, and when I export I'll point the latex exporter to the PDF. This provides a vector format for Latex, instead of a low resolution bitmap. Yes you can use PDF's as includes, and they look great because they are a

Re: [Orgmode] Re: org-babel-R export parameters

2010-06-07 Thread Russell Adams
On Mon, Jun 07, 2010 at 10:03:46AM +0100, Dan Davison wrote: > Hi Russell, > > Thanks, that's clear. You may well be right that it would be appropriate > to expose further information about the babel source block > (e.g. the :file argument) to the external language. However, one general > design c

[Orgmode] Re: org-babel-R export parameters

2010-06-07 Thread Dan Davison
Russell Adams writes: > On Mon, Jun 07, 2010 at 12:27:46AM +0100, Dan Davison wrote: >> Russell Adams writes: >> >> > I needed the ability to view what parameters were sent to plot in >> > R. Turns out that you can't query some things like the active filename >> > in R, so I went back to org. >

Re: [Orgmode] Re: org-babel-R export parameters

2010-06-07 Thread Russell Adams
On Mon, Jun 07, 2010 at 12:27:46AM +0100, Dan Davison wrote: > Russell Adams writes: > > > I needed the ability to view what parameters were sent to plot in > > R. Turns out that you can't query some things like the active filename > > in R, so I went back to org. Really, you can't query the fil

[Orgmode] Re: org-babel-R export parameters

2010-06-06 Thread Dan Davison
Russell Adams writes: > I needed the ability to view what parameters were sent to plot in > R. Turns out that you can't query some things like the active filename > in R, so I went back to org. > > This patch takes each parameter and converts it to a variable in R, > including the filename (org_b