Install SPSS and JGR in 8.04 Hardy Heron
This guide is intended to help users install and configure "R", a great, free alternative to SPSS. The instructions that I outline here are tailored to Ubuntu 8.04 (Hardy Heron), but can be alternated to fit any Linux distribution. I also have these instructions available on my blog located here.
What is "R"?
This is right from the R homepage:
R is a language and environment for statistical computing and graphics. It is a <a href="http://www.gnu.org/" target="_top">GNU project</a> which is similar to the S language and environment which was developed at Bell Laboratories (formerly AT&T, now Lucent Technologies) by John Chambers and colleagues. R can be considered as a different implementation of S. There are some important differences, but much code written for S runs unaltered under R.
R provides a wide variety of statistical (linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, ...) and graphical techniques, and is highly extensible. The S language is often the vehicle of choice for research in statistical methodology, and R provides an Open Source route to participation in that activity.
What is JGR?
Fortunately or unfortunately, R is based on Command Line Interface (CLI). This is where JGR comes into play. JGR is a Graphical User Interface (GUI) for the R program. This is from the JGR homepage:
[i]JGR (speak 'Jaguar') is a universal and unified Graphical User Interface for R (it actually abbreviates Java Gui for R). JGR was introduced at the useR! meeting in 2004 and there is an introductory article in the Statistical Computing and Graphics Newsletter Vol 16 nr 2 p9-12
Installation:
We begin by simply installing R, Java, and all dependencies in one command:
[In Terminal]
sudo apt-get install -y r-base-dev r-recommended sun-java6-jdk
When everything is finished downloading and is about to install, you will be prompted to accept the End User License Agreement (EULA) from Sun Java:
![]()
Check the "Do you agree with the DLJ license terms?" and hit "Forward". Allow the installer to finish before continuing.
Enable support for Java in R:
[In Terminal]
sudo update-java-alternatives -s java-6-sun
[In Terminal]
sudo R CMD javareconf
Now, installing JGR:
[In Terminal]
sudo R
[In R]
install.packages('JGR')After entering the above command, a prompt to select the closest mirror will appear:

Select the closest mirror to you and continue by running this command within R:
[In R]
library(JGR)
Running it:
Run JGR from inside R:
[In R]
JGR()
Run JGR from the terminal:
[In Terminal]
/usr/local/lib/R/site-library/JGR/scripts/run
You should then be pleasantly greeted with the JGR interface:
![]()
Thank you for using my tutorial. If you thought this was useful, you may want to consider subscribing to my Linux RSS Feed to get updates for more Linux tips and tricks. Don't forget to comment on my blog as well!
Basic Troubleshooting:
This section will be expanded upon as I receive input from the comments below.
If you get an error message while trying to load the JGR library (or at the end of the "install.packages('JGR') command that looks like, or contains the following:
"installation of package 'maps' had non-zero exit status"
"installation of package 'CarbonEL' had non-zero exit status"
"installation of package 'rJava' had non-zero exit status"
"installation of package 'JavaGD' had non-zero exit status"
"installation of package 'mapproj' had non-zero exit status"
"installation of package 'iplots' had non-zero exit status in"
Then you will need to make sure that (1) you in fact have the package sun-java6-jdk installed, and (2) you have also run the two commands in the "Enable Java in R" section of this tutorial.
Sources: JGR Installation Guide for Feisty

