[R] Package pixmap breaks try() under circumstances

Christian Lederer rsubscriber at slcmsr.net
Wed Feb 23 01:33:14 CET 2005


Dear R users,

in some circumstances, try() shows a strange behaviour,
when the pixmap package is loaded.

The following piece of code works as expected, if it is
either sourced in an interactive session or invoked via
R CMD BATCH (the try-error is printed).

However, if i invoke R using ``R --vanilla < source.R'',
the execution halts (without printing the try-error).

# source.R
library(pixmap)
x <- numeric()
y <- numeric()
result <- try(plot(lm(x~y)))
print(result)

If i don't use library(pixmap), than also R --vanilla < source.R
works as expected.

This happens with R-2.0.1 and pixmap-0.4.2 under SuSE 9.2.

Christian :-(

P.S.
The reason for preferring R --vanilla script.R over R CMD BATCH is,
that i have to produce png images for a server and want to avoid
the bitmap device for performance reasons.
With R --vanilla < script.R, this is possible, using the xvnc
virtual X server.




More information about the R-help mailing list