Charlie Chen
2003-Jun-12 16:14 UTC
[R] Problems for runing R in BATCH to generate PNG/JPEG files
Hello all:
After I compile the R-1.7 with the follows in
Linux7.3:
configure --with-x --with-jpeglib --with-libpng
--x-includes=/usr/X11R6/include
--x-libraries=/usr/X11R6/lib
and make and make install. The R is able to generate
PNG/JPEG files from the command line. However, when I
put the same commands in a batch file and run:
R --gui BATCH R.Batch.file
It gave me a error in the R.Batch.file.Rout:
Error in png("myplot.png") : R_X11 module cannot be
loaded
In addition: Warning message:
X11 module is not available under this GUI
Execution halted
Would you please guide me through to fix the problem?
Your help is greatly appreciated.
Charlie
Prof Brian Ripley
2003-Jun-12 16:30 UTC
[R] Problems for runing R in BATCH to generate PNG/JPEG files
1) Read ?BATCH, carefully. Note that R --gui BATCH isn't valid syntax. 2) Read ?png, carefully. 3) So you need to not use BATCH *and* provide an X server: I use Xvfb on Linux (but on Solaris the console is available to batch processes). On Thu, 12 Jun 2003, Charlie Chen wrote:> Hello all: > > After I compile the R-1.7 with the follows in > Linux7.3:That's not a Linux version number! RedHat 7.3, perhaps?> > configure --with-x --with-jpeglib --with-libpng > --x-includes=/usr/X11R6/include > --x-libraries=/usr/X11R6/lib > and make and make install. The R is able to generate > PNG/JPEG files from the command line. However, when I > put the same commands in a batch file and run: > > R --gui BATCH R.Batch.file > > It gave me a error in the R.Batch.file.Rout: > > Error in png("myplot.png") : R_X11 module cannot be > loaded > In addition: Warning message: > X11 module is not available under this GUI > Execution halted > > Would you please guide me through to fix the problem? > Your help is greatly appreciated.The help pages *are* very helpful once you read them. -- 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 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595