Skip to content

Problems for runing R in BATCH to generate PNG/JPEG files

2 messages · Charlie Chen, Brian Ripley

#
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
#
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:

            
That's not a Linux version number!  RedHat 7.3, perhaps?
The help pages *are* very helpful once you read them.