[R-sig-Debian] R crashes when making graphs

Paul Johnson pauljohn32 at gmail.com
Wed Dec 8 21:14:08 CET 2010

On Tue, Dec 7, 2010 at 3:00 AM, Manderscheid Katharina
<Katharina.Manderscheid at unilu.ch> wrote:
> here is the example i am using to test if it works.
>> data(airquality)
>> plot(airquality$Temp)

I have just tested this code and it works perfectly in the JGR on
Ubuntu 10.10. I have the Sun JDK installed.

I started JGR inside a terminal, after starting R manuall, so I could
track everything. If you do the same, maybe you will see a difference.

I install the JGR from "scratch" on CRAN, not with the deb package on
cran2deb.  I do that because I'm a crabby old man, trying to make sure
all library versions match on my system. I suggest you try that too.

For general bug shooting, in Ubuntu note problem that you can get
several versions of package installed, under /usr/lib/R,
/usr/local/lib/R, and ~/R/.  So try to make sure you have only one,
consider removing all.

Then as root run

$ R CMD  javareconf

And then

$ install.packages("JGR", dep=T, lib="/usr/local/lib/R/site-library")

Here's the terminal output from starting R and then JGR:

pauljohn at pols124:~$ R

R version 2.12.0 (2010-10-15)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-pc-linux-gnu (64-bit)

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.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(JGR)
Loading required package: rJava
Loading required package: JavaGD
Loading required package: iplots

Please use the corresponding JGR launcher to start JGR.
Run JGR() for details. You can also use JGR(update=TRUE) to update JGR.

> JGR()
Please consider running JGR() as root to create a start script in
/usr/local/lib/R/site-library/JGR/scripts/run automatically.
Starting JGR ...
Warning message:
In file(con, "w") :
  cannot open file '/usr/local/lib/R/site-library/JGR/scripts/run':
Permission denied


Inside the JGR window, I type commands you listed and a graph popped out.

> sessionInfo()
R version 2.12.0 (2010-10-15)
Platform: x86_64-pc-linux-gnu (64-bit)

 [1] LC_CTYPE=en_US.utf8          LC_NUMERIC=C
 [3] LC_TIME=en_US.utf8           LC_COLLATE=en_US.utf8
 [5] LC_MONETARY=en_US.utf8       LC_MESSAGES=en_US.utf8
 [7] LC_PAPER=en_US.utf8          LC_NAME=en_US.utf8
 [9] LC_ADDRESS=en_US.utf8        LC_TELEPHONE=en_US.utf8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] JGR_1.7-3    iplots_1.1-3 JavaGD_0.5-3 rJava_0.8-7

loaded via a namespace (and not attached):
[1] tools_2.12.0

Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas

More information about the R-SIG-Debian mailing list