[R] problems on JGR package and demo() function in Ubuntu linux
David Winsemius
dwinsemius at comcast.net
Tue Apr 13 15:07:30 CEST 2010
On Apr 13, 2010, at 3:31 AM, Mao Jianfeng wrote:
> Dear R-helpers
>
> I want to express my respect and thankfulness to all of you. An
> apology to the second post of this query. I have
> ever asked this question yesterday. Following Mr. Henrik
> Bengtsson's advice I re-submit this query here.
>
> I just switch from windows xp to Ubuntu linux platform. I am facingtwo
> problems when I run R in Ubuntu.
>
> I need your helps and advice, thanks in advance.
>
> 1. R session info
> -----------------------------------------------------------------------------------------------------------
>> sessionInfo()
> R version 2.10.1 (2009-12-14)
> i486-pc-linux-gnu
>
> locale:
> [1] en_US.UTF-8
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] JavaGD_0.5-2 rJava_0.8-3
>
> loaded via a namespace (and not attached):
> [1] tcltk_2.10.1 tools_2.10.1
>
> 2. problem 1: JGR package can not be loaded in R session properly
> -----------------------------------------------------------------------------------------------------------
>> 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
I got that error on a Mac (i.e. BSD Unix) and it waas solved when I
installed and then used a launcher obtained from the JGR website. The
situation was not unlike using the R64.app GUI.
--
David
>> traceback()
> 3: stop(gettextf("package '%s' could not be loaded", pkg), call. =
> FALSE,
> domain = NA)
> 2: .getRequiredPackages2(pkgInfo)
> 1: library(JGR)
>
> 3. problem 2: demo() just can return a blank window-board
> -----------------------------------------------------------------------------------------------------------
>> 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
>> traceback()
> 7: plot.new()
> 6: plot.default(x, ann = FALSE, type = "n")
> 5: plot(x, ann = FALSE, type = "n")
> 4: eval.with.vis(expr, envir, enclos)
> 3: eval.with.vis(ei, envir)
> 2: source(available, echo = echo, max.deparse.length = Inf,
> keep.source = TRUE)
> 1: demo(graphics)
> -----------------------------------------------------------------------------------------------------------
>
>
> Yours,
>
> Jian-Feng, Mao
> the Institute of Botany, CAS
> Beijing, China
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list