Hi, first of all, congrats for your editor: is the best.
Not sure where to post this problem (R devel, here, mailing list for the bundles?)
Anyway: I am trying to use the R bundle (R statistical language).
I have the following problem:
- I have a script that generate a PDF multiline using plot…
pdf(merge.fitting.file.path) print(plot(parent.fitting)) print(plot(my.fit)) dev.off()
everything is working ok from R console or R CMD BATCH : I get back my multiline PDF
When I run the scripts inside textMate (with cmd-R) only THE LAST PAGE of the pdf is recorder in the file!
Can you please suggest me where to post this BUG?
Thanks
On 27 Sep 2011, at 17:06, Davide Rambaldi wrote:
Not sure where to post this problem (R devel, here, mailing list for the bundles?)
Here's the right place :)
I have the following problem:
- I have a script that generate a PDF multiline using plot…
pdf(merge.fitting.file.path) print(plot(parent.fitting)) print(plot(my.fit)) dev.off()
The easiest to check the default parameter settings for "pdf()" in a software environment execute:
args(pdf)
function (file = "/tmp/TM_R/Rplot%03d.pdf", width = 8, height = 8, onefile = FALSE, family, title, fonts, version, paper, encoding, bg, fg, pointsize, pagecentre, colormodel, useDingbats, useKerning, fillOddEven, maxRasters)
Here you see that the parameter "onefile" is set to FALSE which means that each plot will go in a separate pdf file.
Please try:
pdf(merge.fitting.file.path, onefile = TRUE)
Kind regards, Hans
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 :-)
many thanks
Davide
2011/9/27 Hans-Jörg Bibiko bibiko@eva.mpg.de:
On 27 Sep 2011, at 17:06, Davide Rambaldi wrote:
Not sure where to post this problem (R devel, here, mailing list for the bundles?)
Here's the right place :)
I have the following problem:
- I have a script that generate a PDF multiline using plot…
pdf(merge.fitting.file.path) print(plot(parent.fitting)) print(plot(my.fit)) dev.off()
The easiest to check the default parameter settings for "pdf()" in a software environment execute:
args(pdf)
function (file = "/tmp/TM_R/Rplot%03d.pdf", width = 8, height = 8, onefile = FALSE, family, title, fonts, version, paper, encoding, bg, fg, pointsize, pagecentre, colormodel, useDingbats, useKerning, fillOddEven, maxRasters)
Here you see that the parameter "onefile" is set to FALSE which means that each plot will go in a separate pdf file.
Please try:
pdf(merge.fitting.file.path, onefile = TRUE)
Kind regards, Hans
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
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