Does anyone have a launcher for JGR?
thanks
Does anyone have a launcher for JGR?
thanks
No, but you can create one. When you run JGR() from inside R, it will tell you where the JGR run script is. It probably is at:
/usr/local/lib/R/site-library/JGR/scripts/run
Now you can add your own launcher.
Right click on the panel for example, and select "add to panel" then "custom application launcher" and paste the above path to run.
Hi all,
I think have followed the guidelines (see below) but it did not work (bottom line : JavaJD could not be found)
Any suggestion, please?
$ sudo apt-get install sun-java6-jdk
$ sudo update-alternatives --config java
There are 5 alternatives which provide `java'.
Selection Alternative
-----------------------------------------------
1 /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
2 /usr/bin/gij-4.1
3 /usr/bin/gij-4.2
4 /usr/lib/jvm/java-gcj/jre/bin/java
+ 5 /usr/lib/jvm/java-7-icedtea/jre/bin/java
$sudo R CMD javareconf
Java interpreter : /usr/bin/java
Java version : 1.6.0_03
Java home path : /usr/lib/jvm/java-6-sun-1.6.0.03/jre
Java compiler : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
Java library path: $(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64::/usr/java/packages/lib/amd64:/lib:/usr/lib
JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -L$(JAVA_HOME)/lib/amd64 -L$(JAVA_HOME)/../lib/amd64 -L -L/usr/java/packages/lib/amd64 -L/lib -L/usr/lib -ljvm
JNI cpp flags : -I/usr/lib/jvm/java-6-sun-1.6.0.03/jre/../include -I/usr/lib/jvm/java-6-sun-1.6.0.03/jre/../include/linux
Updating Java configuration in /etc/R
Done.
$ sudo R
R version 2.5.1 (2007-06-27)
Copyright (C) 2007 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
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.
> install.packages('JGR', dep=TRUE)
Warning in install.packages("JGR", dep = TRUE) :
argument 'lib' is missing: using '/usr/local/lib/R/site-library'
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
also installing the dependency ‘JavaGD’
trying URL 'http://lib.stat.cmu.edu/R/CRAN/src/contrib/JavaGD_0.5-1.tar.gz'
Content type 'application/x-gzip' length 86505 bytes
opened URL
==================================================
downloaded 84Kb
trying URL 'http://lib.stat.cmu.edu/R/CRAN/src/contrib/JGR_1.5-18.tar.gz'
Content type 'application/x-gzip' length 426244 bytes
opened URL
==================================================
downloaded 416Kb
* Installing *source* package 'JavaGD' ...
checking for gcc... gcc-4.2 -std=gnu99
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc-4.2 -std=gnu99 accepts -g... yes
checking for gcc-4.2 -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc-4.2 -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking return type of signal handlers... void
checking for memset... yes
checking for mkdir... yes
checking for rmdir... yes
checking for select... yes
checking for socket... yes
checking Java support in R... present:
interpreter : '/usr/bin/java'
cpp flags : '-I/usr/lib/jvm/java-6-sun-1.6.0.03/jre/../include -I/usr/lib/jvm/java-6-sun-1.6.0.03/jre/../include/linux'
java libs : '-L/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/amd64/server -L/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/amd64 -L/usr/lib/jvm/java-6-sun-1.6.0.03/jre/../lib/amd64 -L -L/usr/java/packages/lib/amd64 -L/lib -L/usr/lib -ljvm'
checking whether JNI programs can be compiled... yes
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/zzz.R
config.status: creating src/config.h
** libs
gcc-4.2 -std=gnu99 -I/usr/share/R/include -I/usr/share/R/include -I/usr/lib/jvm/java-6-sun-1.6.0.03/jre/../include -I/usr/lib/jvm/java-6-sun-1.6.0.03/jre/../include/linux -Iinclude -fpic -g -O2 -c javaGD.c -o javaGD.o
In file included from javaGD.h:12,
from javaGD.c:23:
/usr/share/R/include/R_ext/GraphicsEngine.h:150: error: expected specifier-qualifier-list before ‘NewDevDesc’
/usr/share/R/include/R_ext/GraphicsEngine.h:224: error: expected ‘)’ before ‘*’ token
/usr/share/R/include/R_ext/GraphicsEngine.h:231: error: expected declaration specifiers or ‘...’ before ‘NewDevDesc’
javaGD.c: In function ‘Rf_addJavaGDDevice’:
javaGD.c:215: warning: implicit declaration of function ‘GEcreateDevDesc’
javaGD.c:215: warning: assignment makes pointer from integer without a cast
javaGD.c: In function ‘reloadJavaGD’:
javaGD.c:233: error: ‘GEDevDesc’ has no member named ‘dev’
javaGD.c: In function ‘javaGDobjectCall’:
javaGD.c:252: error: ‘GEDevDesc’ has no member named ‘dev’
javaGD.c: In function ‘javaGDresize’:
javaGD.c:269: error: ‘GEDevDesc’ has no member named ‘dev’
javaGD.c: In function ‘javaGDgetSize’:
javaGD.c:307: error: ‘GEDevDesc’ has no member named ‘dev’
make: *** [javaGD.o] Error 1
chmod: cannot access `/usr/local/lib/R/site-library/JavaGD/libs/*': No such file or directory
ERROR: compilation failed for package 'JavaGD'
** Removing '/usr/local/lib/R/site-library/JavaGD'
* Installing *source* package 'JGR' ...
** R
** inst
** help
>>> Building/Updating help pages for package 'JGR'
Formats: text html latex example
jgr.addMenu text html latex example
jgr.addMenuItem text html latex example
jgr.addMenuSeperator text html latex example
supplements text html latex
** building package indices ...
* DONE (JGR)
The downloaded packages are in
/tmp/RtmpfnAtvi/downloaded_packages
Warning message:
installation of package 'JavaGD' had non-zero exit status in: install.packages("JGR", dep = TRUE)
>library(JGR)
Loading required package: rJava
Error: package 'JavaGD' required by 'JGR' could not be found
Ubuntu 9.10/Code::Blocks 8.02/gcc (GCC) 4.4 via
a virtual machine on OSX 10.6
cant help you with jgr im afraid, but i personally like R commander. its in the repos, which makes it nice and easy to install. just search for Rcmdr. then boot r ('R' in the terminal), and typeto start the program. its not pretty, but it gets the job done, and you can still type in / see R syntax, so you can still learn the programming language of R!Code:library(Rcmdr)
'I know lifes a bummer baby, But thats got precious little to do with me' - Monster Magnet
# INSTALL R, JAVA6, JGR,
#### in terminal
### http://edtechdev.blogspot.com/2007/0...in-ubuntu.html
gpg --keyserver subkeys.pgp.net --recv-key E2A11821
gpg -a --export E2A11821 | sudo apt-key add -
## get the sources.list file,
sudo gedit /etc/apt/sources.list
## in the pop sources.list file, at the bottom add
deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu hardy/
## e.g., using http://cran.cnr.berkeley.edu/
#click Linux to access Index of /bin/linux select ubuntu to see the file
# structure.
# use the closest mirror site to you. I used berkeley's R-cran though.
## save and clos sources.list back to terminal to insall R
## http://rosuda.org/JGR/linux.shtml
sudo apt-get update
sudo apt-get install r-base-dev r-recommended
# I run and installed the r-base after "the recommended" following
# http://edtechdev.blogspot.com/2007/0...in-ubuntu.html
sudo apt-get install r-base r-base-dev
# in the terminal run R to see
# you can run some old code to have fun but DONT INSTALL JGR!! install java # first
R
# type
quit()
# quit R without saving . now java
# in terminal type
sudo apt-get update
sudo apt-get install sun-java6-jdk # http://rosuda.org/JGR/linux.shtml
# RUN IF YOU HAVE ANOTHER JAVA INSTALLED
sudo update-java-alternatives -s java-1.6.0-sun
## RUN NOW, THIS
sudo R CMD javareconf
# IF EVERYTHING FUN, NO ERROR MESSAGE
# DO INSTALL JGR
install.packages("JGR",dep=TRUE)
## type these commands in R:
library(JGR)
JGR()
# YOU WILL SEE A JAVA CONSOL POP WINDOW, ENJOY JGR-ING.
ok, I might be able to help you.
go to System/Adminstration/Synaptic Package Manager/
you might be told that you have broken package. , in Synaptic Package Manager/Settings/Filters in the pop window of Filters
highligh Broken on the left, and click Select All button on the right, then ok
back to the Synaptic Package Manager window, click title S on the right upmini-window. (do you see, S, Package, Installed Version ...., Yes, click the S ), you will see the packages have been ordered. Roll-down to find the broken java6 package. Then right click and marked it for update. you will notice a up-arrow appeas on the green block. now click Reload (the blue arrow). roll down to find the highlighted java6 , push the Apply (green ) button, java6 will be updated.
now run sudo R CMD javareconf again to see.
Last edited by GreenLinux@R; June 6th, 2008 at 09:19 PM.
Thanks,
Although my problem was fixed I'd like to understand what you wrote for future reference. I lost you at "right upmini-window". What do you mean?
PS:
Thanks extends to all other answers. To anyone interested I also have a thread started at http://www.nabble.com/forum/ViewPost...22071&framed=y
Ubuntu 9.10/Code::Blocks 8.02/gcc (GCC) 4.4 via
a virtual machine on OSX 10.6
Here is a way to install JGR into a folder you want it to be.
## download 4 packages' source codes (.tar.gz files ) from R-CRAN to local_folder (mine is Desktop )
rjava*.tar.gz,JavaGD*.tar.gz,iplots*.tar.gz and JGR*.tar.gz
# copy packages to the targeted lib you want JGR to be installed (mine is /usr/lib/R/site-library )
greenlinux4r@greenlinux4r-desktop:$ cd ~/Desttop
greenlinux4r@greenlinux4r-desktop:~/Desktop$ sudo cp rJava* /usr/lib/R/sit*greenlinux4r@greenlinux4r-desktop:~/Desktop$ sudo cp JavaGD* /usr/lib/R/sit*
greenlinux4r@greenlinux4r-desktop:~/Desktop$ sudo cp iplot* /usr/lib/R/sit*
greenlinux4r@greenlinux4r-desktop:~/Desktop$ sudo cp JGR* /usr/lib/R/sit*
##go to the folder you want to install JGR in:
greenlinux4r@greenlinux4r-desktop:~/Desktop$ cd /usr/lib/R/sit*
###
greenlinux4r@greenlinux4r-desktop:/usr/lib/R/site-library$ sudo R CMD INSTALL -l /usr/lib/R/site-library rJava*.tar.gz
greenlinux4r@greenlinux4r-desktop:/usr/lib/R/site-library$ sudo R CMD INSTALL -l /usr/lib/R/site-library JavaG*.tar.gz
greenlinux4r@greenlinux4r-desktop:/usr/lib/R/site-library$ sudo R CMD INSTALL -l /usr/lib/R/site-library iplo*.tar.gz
greenlinux4r@greenlinux4r-desktop:/usr/lib/R/site-library$ sudo R CMD INSTALL -l /usr/lib/R/site-library JGR*.tar.gz
So here you go.
here you need to change permission to run JGR in some folder in root.
see http://ubuntuforums.org/showthread.php?t=275183
#### I did:
greenlinux4r@greenlinux4r-desktop:~$ sudo su
# after input my pswds
root@greenlinux4r-desktop:/home/greenlinux4r#
# run JGR outside R
root@greenlinux4r-desktop:/home/greenlinux4r# /usr/lib/R/site-library/JGR/scripts/run
here you need to change permission to run JGR in some folder in root.
see http://ubuntuforums.org/showthread.php?t=275183
I did:
greenlinux4r@greenlinux4r-desktop:~$ sudo su
after input my pswds
root@greenlinux4r-desktop:/home/greenlinux4r#
Bookmarks