Since I needed to whip up a quick scatter plot, I decided to install my old friend R (http://cran.r-project.org/)
But as is usually the case a Google search only resulted in a partial instruction list, so here are the commands I used to get it all working.
sudo vi /etc/apt/sources.list
Add the following repository to the bottom of your sources list
deb http://cran.stat.ucla.edu/bin/linux/ubuntu jaunty/
Notice that this repository is for Jaunty aka Ubuntu 9.04, I used this for an older VMWare image that i had. If you have a newer version of Ubuntu simply replace “jaunty/” at the end with your versions name. (of course be sure to visit http://cran.stat.ucla.edu/bin/linux/ubuntu to make sure it is available)
Next we need to add the public key for this repository
gpg --keyserver subkeys.pgp.net --recv-key E2A11821
gpg -a --export E2A11821 | sudo apt-key add -
And finally update your repository to take in the changes
sudo apt-get update
Now that you have everything up to date you can go ahead and install R/CRAN with the following:
sudo apt-get install r-base r-base-dev
That should do it, post a comment if you have any issues.