1

I recently installed Ubuntu 14.04.2 LTS (trusty) and followed the instructions on http://r-interface.blogspot.nl/2012/04/install-r-jgr-and-deducer-in-ubuntu.html to install R, JGR and deducer.

If I run R, load JGR and open JGR from there, it works, but I like to create a shortcut directly to JGR. I tried simply locking the JGR console to the launcher, but if I then click on it, it will mention:

'Unable to start R: Unable to initialize R'.

In the above mentioned link, at step 4 I managed to create the desktop icon which should link to /usr/local/lib/R/site-library/JGR/scripts/run, but when I open that in the files browser, nothing happens. JGR also turns up empty when in the applications.

Anyone know how to do this?

reto
  • 9,995
  • 5
  • 53
  • 52
stikpet
  • 11
  • 3

1 Answers1

1

I faced the same situation but it could be solved manually.

  1. follow the same guide http://r-interface.blogspot.com.es/2012/04/install-r-jgr-and-deducer-in-ubuntu.html up to the point 4
  2. in the point 4 , with R launched ( sudo R --no-save )

    library(JGR)
    JGR()
    

note that it prints in the screen the contents of a bash script. Something like (but use yours):

    #!/bin/sh

    export R_HOME="/usr/lib/R"
    export R_ARCH=""
    export R_LIBS="/home/jesus/R/x86_64-pc-linux-gnu-library/3.0:/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library"
    export R_LIBS_USER="~/R/x86_64-pc-linux-gnu-library/3.0"
    export JAVA_LD_PATH="/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/java-7-oracle/jre/lib/amd64/server:@JAVA_LD@"
    '/usr/lib/jvm/java-7-oracle/jre/bin/java' -cp '/home/jesus/R/x86_64-pc-linux-gnu-library/3.0/rJava/java/boot' -Drjava.class.path='/home/jesus/R/x86_64-pc-linux-gnu-library/3.0/rJava/jri/JRI.jar:/home/jesus/R/x86_64-pc-linux-gnu-library/3.0/iplots/java/iplots.jar:/home/jesus/R/x86_64-pc-linux-gnu-library/3.0/JGR/java/JGR.jar:/usr/lib/R/etc/classes:/usr/lib/R/etc/classes/classes.jar' -Drjava.path='/home/jesus/R/x86_64-pc-linux-gnu-library/3.0/rJava' -Dmain.class=org.rosuda.JGR.JGR  -Djgr.load.pkgs=yes  -Dr.arch=  RJavaClassLoader

You only need to create the missing file /usr/local/lib/R/site-library/JGR/scripts/run (use the same name than in the guide, or adjust at your will) with the contents spat in the previous step.

Make it executable :

  chmod a+x /usr/local/lib/R/site-library/JGR/scripts/run
  1. Continue the guide where you leave the step 4
Jesus Monzon Legido
  • 1,253
  • 12
  • 10