[R] Trouble with R and cronjobs

Trent Piepho xyzzy at speakeasy.org
Wed Apr 3 05:54:25 CEST 2002


On Wed, 3 Apr 2002 j_turner at ihug.co.nz wrote:
> > Can someone tell me how to fix this?
> 
> 1) have X running all the time (yuck).
> or
> 2) install ghostscript (if you don't have it already), and use 
> 
> bitmap(file="foo.png", type="png256",res=300)
> 
> If it *must* be png format, I'd pick 2. For quality plots over web services, 
> you really can't beat the pdf() driver, though.  Yum.  

Or 
 3) run the virtual X server, Xvfb, which simulates an X server but doesn't
    actually drive any hardware.

Note that the plots will look different when you use the png vs bitmap device,
especially fonts.  

Xvfb has advantages even if you have an X server, if you are working remotely. 
R has to send the graphics commands over the network to the X server, then
download the finished graph.  One user here generated a batch of png plots
from a remote PC with an X server and ssh X forwarding.  It look about 6
hours.  I told him how to setup Xvfb to run on the same machine as R, and the
same process took about 1 minute.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list