Re: [R] R in cron job: X problems

2007-04-19 Thread Liaw, Andy
This is in the FAQ, if I remember correctly... However, alternatively: As Jeff Horner recently pointed out on the list, the Cairo package is a good way of generating png without needing an X display. You may want to look into that. I've just installed cairo on our CentOS boxes and the Cairo pac

Re: [R] R in cron job: X problems

2007-04-19 Thread Henrik Bengtsson
Try using png2() in R.utils, which immitates png() but uses bitmap() and ghostscript to create the PNG file. You need to set 'R_GSCMD' to tell R where ghostscript is located - you can use System$findGhostscript() at startup to let R try to locate ghostscript for you. /H On 4/19/07, Mark Liberman

[R] R in cron job: X problems

2007-04-19 Thread Mark Liberman
I'd like to use an R CMD BATCH script as part of a chron job that is set up to run every hour. The trouble is that the script creates a graphical output in a file via png(), and apparently this in turn works through X. When cron invokes the job, no X server is available -- I suppose that the DISP