I got a couple of answers already indicating that this is a known
"problem". Thanks to everyone who responded and apologies for
reposting a
known problem. I must have missed the last post about this - I searched
the mailing list archive and found it about a year ago. Apparently, one of
the solutions is to use the bitmap driver which produces the PNG files by
default anyway.
I noticed that the png help page mentions that it depends on the x11
device. It just was not clear to me that one cannot use x11 in batch mode.
Finally, I am still curious why this thing works under Windows. Was the
png driver rewritten for it? Does it still depend on the windows device
but it can be invoked in batch mode?
Thanks in advance,
Andy
__________________________________
Andy Jaworski
Engineering Systems Technology Center
3M Center, 518-1-01
St. Paul, MN 55144-1000
-----
E-mail: apjaworski at mmm.com
Tel: (651) 733-6092
Fax: (651) 736-3122
"Liaw, Andy"
<andy_liaw at merc To: Andrzej P.
Jaworski/US-Corporate/3M/US at 3M-Corporate
k.com> cc:
Subject: RE: [R] PNG diver problem
11/28/2001
03:00 PM
This is a known bug/problem/whatever-you-want-to-call-it. The help page
for
png (and jpeg) does say they depend on x11(), so this should not be called
a
bug.
You can run R without the BATCH to get access to png/jpeg device. This is
the only way I know how.
You could have found the answer by searching the archive of this list, too.
This has been raised way too many times...
Andy
-----Original Message-----
From: apjaworski at mmm.com [mailto:apjaworski at mmm.com]
Sent: Wednesday, November 28, 2001 3:26 PM
To: r-help at stat.math.ethz.ch
Subject: [R] PNG diver problem
Hi,
I am having the following problem and I am not sure if this is bug or I am
missing something obvious.
I have a bunch of R functions that automatically process large data sets.
The processing produces several numerical summaries and several graphs
which are subsequently put in reports. I usually do my processing in R
BATCH mode on a Win2000 machine.
All the graphical functions in my package have a switch between the windows
and png drivers. When I run the processing interactively I get the plots
on the screen, but in the batch mode, the plots are produced as PNG files.
Everything works fin on the Win machine. Yesterday I tried to do some work
on my home Linux machine. I edited my code replacing the windows driver
with x11 and tried it in the interactive mode. Things worked fine. When I
ran the same thing in the batch mode I got the following:
Error in png(filen, width = 685, height = 684) :
the x11 device has not been loaded
Execution halted
I tried to load the x11 driver before the processing started, but no matter
what I tried I got the above error or a variation of it saying that x11
cannot be loaded. It almost looks like one cannot load x11 in the batch
mode, but png somehow depends on it.
Is it me or is it a bug?
A few details:
(1) Under Win2000 the command I am using is
Rcmd BATCH --no-save --quiet xxx.R
where xxx.R is the R script.
(2) Under Linux the command is
R CMD BATCH --no-save --quiet xxx.R
(3) The Windows and Linux code that does the processing is identical with
the exception of windows/x11 driver change
(4) My Linux box is a Pentium-MMX 266MHz machine with 192Mb of memory
running RH 7.2 Linux with customized 2.4.16 kernel. My Win2000 machine is
an IBM Intellistation with 1GHz Pentium III and
512Mb of memory.
(5) Both machines run R-1.3.1 (original versions dated 2001-08-31).
Any help will be appreciated.
Andy
__________________________________
Andy Jaworski
Engineering Systems Technology Center
3M Center, 518-1-01
St. Paul, MN 55144-1000
-----
E-mail: apjaworski at mmm.com
Tel: (651) 733-6092
Fax: (651) 736-3122
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.
-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_.
_._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._