[TxMt] Re: R bundle have a BUG?

Hans-Jörg Bibiko bibiko at eva.mpg.de
Tue Sep 27 20:42:54 UTC 2011


On 27 Sep 2011, at 21:41, Davide Rambaldi wrote:

> Ok it's working with onefile = TRUE (I look at my result trough a web
> page and I did not notice the split of pdf :-)


... and please note the following approach which is implemented in the R bundle:

- each plot command will write its result into ONE pdf file (located in /tmp/TM_R/) automatically WITHOUT a preceding pdf() command; all generated pdf files (in /tmp/TM_R/) will be inserted as linked image in the HTML output window; that's why the parameter 'onefile' is set to FALSE as default
- if you're using the command pdf() explicitly then the result will not be displayed in the HTML output window

As an example one could write the following code to come up with resulting pdf in Preview:

pdf(file='~/Desktop/x1.pdf', onefile=T)
plot(10:1)
plot(1:10)
dev.off()
system('open ~/Desktop/x1.pdf')


or 


plot(1:3)
plot(3:1)
pdf(file='/tmp/TM_R/x1.pdf', onefile=T)
plot(100:1)
plot(1:100)
dev.off()



and click at third image to open it in Preview [third one due sorting Rplot00x.pdf, x1.pdf]


Best,
--Hans


More information about the textmate mailing list