Re: [R-pkg-devel] R CMD BATCH plot output

2024-07-29 Thread Dirk Eddelbuettel
On 29 July 2024 at 13:02, Ivan Krylov wrote: | On Sun, 28 Jul 2024 15:27:33 -0500 | Dirk Eddelbuettel wrote: | | > If we cannot (or do not want to) modify the given main.R, I would | > suggest something along the lines of | > | > Rscript -e 'pdf(myfilenamevar); source("main.R"); dev.off()' |

Re: [R-pkg-devel] R CMD BATCH plot output

2024-07-29 Thread Ivan Krylov via R-package-devel
On Sun, 28 Jul 2024 15:27:33 -0500 Dirk Eddelbuettel wrote: > If we cannot (or do not want to) modify the given main.R, I would > suggest something along the lines of > > Rscript -e 'pdf(myfilenamevar); source("main.R"); dev.off()' | tee > 2024-07-28.log Perhaps even options(device = \(file =

Re: [R-pkg-devel] R CMD BATCH plot output

2024-07-28 Thread Dirk Eddelbuettel
On 28 July 2024 at 15:44, Duncan Murdoch wrote: | On 2024-07-28 1:48 p.m., Josiah Parry wrote: | > However, if plots are generated in the process, the plots are stored in | > Rplots.pdf. | > | > Is there a way via command line arguments to change the name of the pdf | > output. | > | > There mi

Re: [R-pkg-devel] R CMD BATCH plot output

2024-07-28 Thread Duncan Murdoch
On 2024-07-28 4:05 p.m., Josiah Parry wrote: Thanks, Duncan! Is there a way to override this using the command line arguments? I assume you could do that using commandArgs() in the dev.new() call, but I don't use BATCH. I'd like to be able to have a generalizable way to address this without

Re: [R-pkg-devel] R CMD BATCH plot output

2024-07-28 Thread Ben Bolker
Dirk Eddelbuettel would tell you to use his 'little r' script instead, though not sure if it has this particular flexibility. You could wrap R CMD BATCH in your own script that moved Rplots.pdf where you wanted it ... On Sun, Jul 28, 2024, 4:05 PM Josiah Parry wrote: > Thanks, Duncan! > > Is the

Re: [R-pkg-devel] R CMD BATCH plot output

2024-07-28 Thread Josiah Parry
Thanks, Duncan! Is there a way to override this using the command line arguments? I'd like to be able to have a generalizable way to address this without having to modify R source code. My understanding is that when there is a plot output, R CMD BATCH uses the PDF device which is a fair default.

Re: [R-pkg-devel] R CMD BATCH plot output

2024-07-28 Thread Duncan Murdoch
On 2024-07-28 1:48 p.m., Josiah Parry wrote: Hey folks! I am working with R CMD BATCH and providing a providing a logfile output e.g. R CMD BATCH main.R 2024-07-28.log This creates the desired log file with the contents of stdout and stderr. However, if plots are generated in the process, the

[R-pkg-devel] R CMD BATCH plot output

2024-07-28 Thread Josiah Parry
Hey folks! I am working with R CMD BATCH and providing a providing a logfile output e.g. R CMD BATCH main.R 2024-07-28.log This creates the desired log file with the contents of stdout and stderr. However, if plots are generated in the process, the plots are stored in Rplots.pdf. Is there a way