Thursday, September 30, 2010

Installing R and JGR in Ubuntu Intrepid

Installing R and JGR in Ubuntu Intrepid

Here’s an update to my previous instructions on getting R set up and working in Ubuntu. These work for Ubuntu Intrepid, but won’t work for Ubuntu Jaunty (due out next month) until you see “jaunty” in this list.
R is a free, open source software package for performing statistical analyses. It is an alternative to commercial tools such as SPSS, SAS, and S. I recommend using the RSeek search engine to search for help and 3rd party libraries.
To install R, open the Terminal console and run these commands:
gpg --keyserver subkeys.pgp.net --recv-key E2A11821

gpg -a --export E2A11821 | sudo apt-key add -
Then open up your apt-get sources list for editing:
sudo gedit /etc/apt/sources.list
Add this line to the bottom of the sources.list file:
deb http://rh-mirror.linux.iastate.edu/CRAN/bin/linux/ubuntu intrepid/
Note the trailing slash at the end of “intrepid/”. Also you can replace “rh-mirror.linux.iastate.edu” with another mirror server of your choice. Save the file and go back to the Terminal.
Now type this in the terminal to update apt-get’s database before you install R:
sudo apt-get update
Install R with this command:
sudo apt-get install r-base r-base-dev r-recommended
Then run “R” to start R, and “q()” to quit it.
To get JGR, the Java GUI interface working (requires you have java installed, see the sun-java6 package), run this on the command line:
sudo R CMD javareconf

No comments: