[R] Trouble with R and cronjobs

j_turner@ihug.co.nz j_turner at ihug.co.nz
Wed Apr 3 04:53:05 CEST 2002


<dstierman <dstierman at micron.com> on April 3 said...>
> It appears that my DISPLAY environmental variable is not
> set. Is that necessary, even when the output of the plot command is to a png
> file?

Yes.  And No.

Yes:
A running X server is absolutely necessary for the png() command.  If X isn't 
running, you get no png().  No jpeg(), either, for that matter.  help(png) 
states:
--
These devices [png, jpeg] effectively plot on a hidden screen and then copy
the image to the required format.
--
In other words, they do their own (hidden) X11 plot, then convert that to a 
jpeg or png image.  However...

No:
> 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.  

Cheers

Jason

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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