Hi
a short question is there a way to generate jpeg's etc. in BATCH mode ? The
following example does not work in BATCH:
I have a file called Rgraph.in:
*rsy at puffin*[15:11][~][57]> cat Rgraph.in
jpeg("/tmp/my.jpg")
hist(runif(10000))
dev.off()
*rsy at puffin*[15:11][~][58]>
*rsy at puffin*[15:09][~][55]> R BATCH Rgraph.in OUT
4.120u 0.160s 0:05.17 82.7% 0+0k 0+0io 2208pf+0w
*rsy at puffin*[15:09][~][56]> cat OUT
R : Copyright 2003, The R Foundation for Statistical Computing
Version 1.8.1 (2003-11-21), ISBN 3-900051-00-3
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for a HTML browser interface to help.
Type 'q()' to quit R.
[Previously saved workspace restored]
> invisible(options(echo = TRUE))
> jpeg("/tmp/my.jpg")
Error in jpeg("/tmp/my.jpg") : R_X11 module cannot be loaded
In addition: Warning message:
X11 module is not available under this GUI
Execution halted
*rsy at puffin*[15:09][~][57]>
Try using bitmap() instead. -roger Reinhard Sy wrote:> Hi > a short question is there a way to generate jpeg's etc. in BATCH mode ? The > following example does not work in BATCH: > > I have a file called Rgraph.in: > *rsy at puffin*[15:11][~][57]> cat Rgraph.in > jpeg("/tmp/my.jpg") > hist(runif(10000)) > dev.off() > > *rsy at puffin*[15:11][~][58]> > > *rsy at puffin*[15:09][~][55]> R BATCH Rgraph.in OUT > 4.120u 0.160s 0:05.17 82.7% 0+0k 0+0io 2208pf+0w > *rsy at puffin*[15:09][~][56]> cat OUT > > R : Copyright 2003, The R Foundation for Statistical Computing > Version 1.8.1 (2003-11-21), ISBN 3-900051-00-3 > > R is free software and comes with ABSOLUTELY NO WARRANTY. > You are welcome to redistribute it under certain conditions. > Type 'license()' or 'licence()' for distribution details. > > R is a collaborative project with many contributors. > Type 'contributors()' for more information and > 'citation()' on how to cite R in publications. > > Type 'demo()' for some demos, 'help()' for on-line help, or > 'help.start()' for a HTML browser interface to help. > Type 'q()' to quit R. > > [Previously saved workspace restored] > > > >>invisible(options(echo = TRUE)) >>jpeg("/tmp/my.jpg") > > Error in jpeg("/tmp/my.jpg") : R_X11 module cannot be loaded > In addition: Warning message: > X11 module is not available under this GUI > Execution halted > *rsy at puffin*[15:09][~][57]> > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help >
Reinhard Sy wrote:> Hi > a short question is there a way to generate jpeg's etc. in BATCH mode ? The > following example does not work in BATCH:...> Error in jpeg("/tmp/my.jpg") : R_X11 module cannot be loaded > In addition: Warning message: > X11 module is not available under this GUI > Execution halted > *rsy at puffin*[15:09][~][57]>Under Unix and Unix-like systems, R needs a running X server to produce JPEGs. You needn't start the X-server; check out XVFB - X Virtual Frame Buffer - which sets up a virtual X server, but with no display. You may already have this installed: "man Xvfb" will tell you. http://www.visualmining.com/support/server/XvfbonUnix.html Cheers Jason -- Indigo Industrial Controls Ltd. http://www.indigoindustrial.co.nz 64-21-343-545 jasont at indigoindustrial.co.nz