[R] using jpeg() in BATCH mode

Evan Zane Macosko macosko at fas.harvard.edu
Tue Aug 14 22:57:53 CEST 2001


So I tried using the dev2bitmap function, and I get an empty file.  Here
is my batch script(simplified):

angles<-scan("tempout.txt");
hist(angles);
filename<-c("/var/www/html/histograph.png");
dev2bitmap(filename, type = "png256", height = 4, width = 4, res = 65,
pointsize = 10);


Any suggestions on why this doesn't work?

On Tue, 14 Aug 2001, Prof Brian Ripley wrote:

> On Tue, 14 Aug 2001, Evan Zane Macosko wrote:
>
> > I'm trying to run R in batch mode, and I'm having trouble printing my
> > plots to any file type other than postscript.  I know R BATCH doesn't
> > support X11()--is there any way to use R BATCH and write jpeg files?
>
> Under Unix, to use jpeg() you need to start R with the X11 gui, and BATCH
> does not.  bitmap() works though ...
>
> > Also: I am running a cgi script to do this--alternatively to batch, is
> > there some kinds of R-CGI interface that might be easier?
>
> BATCH is just a very simple wrapper: you can write your own.
>
>
> --
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272860 (secr)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>

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