[R] two problems on R in Ubuntu linux

Mao Jianfeng jianfeng.mao at gmail.com
Mon Apr 12 08:34:06 CEST 2010


Dear R-helpers

I want to express my respect and thankfulness to all of you.

I just switch from windows xp to Ubuntu linux platform. I am facing
two problems when I run R in Ubuntu.

I need your helps and advice, thanks in advance.

-----------------------------------------------------------------------------------------------------------------------------------------------------------
1. JGR() can not be loaded in R session properly

when I load JGR package in R, I got:
----------------------------------------------------------------------------------------------
> library(JGR)
Loading required package: rJava
Loading required package: JavaGD
Loading required package: iplots
Error in .jnew("org/rosuda/iplots/Framework") :
  java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit
Error: package 'iplots' could not be loaded

note: Tcl/Tk interface can be loaded by R automatically.

Loading Tcl/Tk interface ... done

----------------------------------------------------------------------------------------------------------------------------------------------------------
2. demo() just can return a blank window-board

when I execute demo(graphics) and hit <Return>, I just got a blank prompt.
-----------------------------------------------------------------------------------------------
> demo(graphics)


	demo(graphics)
	---- ~~~~~~~~

Type  <Return>	 to start :

> require(datasets)

> require(grDevices); require(graphics)

> ## Here is some code which illustrates some of the differences between
> ## R and S graphics capabilities.  Note that colors are generally specified
> ## by a character string name (taken from the X11 rgb.txt file) and that line
> ## textures are given similarly.  The parameter "bg" sets the background
> ## parameter for the plot and there is also an "fg" parameter which sets
> ## the foreground color.
>
>
> x <- stats::rnorm(50)

> opar <- par(bg = "white")

> plot(x, ann = FALSE, type = "n")
Hit <Return> to see next plot:
Error in plot.new() : attempt to plot on null device
-------------------------------------------------------------------------------------------------------------------------------------------------------------

Yours,

Jian-Feng, Mao
the Institute of Botany, CAS
Beijing, China



More information about the R-help mailing list