[R] Create png graph from script?
garry.kremer@convergys.com
garry.kremer at convergys.com
Fri Mar 8 22:08:48 CET 2002
I am looking for a way to create png format files from a script that runs
from crontab. I would like to avoid ghostscript or depending on a
particular x11 device being available. Any help is appreciated.
Details below.
I am running R Version 1.4.1 on Solaris 2.6.
If I can rely on an x11 device being available I can achieve the result as
follows:
$ /fred/R-1.4.1/bin/R --no-save <rbatchtest
$ cat rbatchtest
x11("10.20.30.400:0")
png(filename="batchtest.png")
plot(1,1)
dev.off()
$
If I try to run this without the x11 command I get the following error:
Error in X11(paste("png::", filename, sep = ""), width, height,
pointsize, :
unable to start device PNG
In addition: Warning message:
unable to open connection to X11 display`'
Execution halted
I'm not comfortable about relying on an x11 device to be available in the
middle of the night when the script runs from cron.
I know I can create postscript and rely on ghostscript to do the conversion
but the ghostscript licensing is a concern.
Is there such a concept as a "dummy" x11 device or other creative solution?
--
NOTICE: The information contained in this electronic mail transmission is
intended by Convergys Corporation for the use of the named individual or
entity to which it is directed and may contain information that is
privileged or otherwise confidential. If you have received this electronic
mail transmission in error, please delete it from your system without
copying or forwarding it, and notify the sender of the error by reply email
or by telephone (collect), so that the sender's address records can be
corrected.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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