R on Ubuntu - wch/ggplot2 GitHub Wiki

As of this writing, the latest version of ggplot2, 0.9.0, requires R version 2.14. The standard Ubuntu software repositories may not have the latest version of R, and so you may need to add a different one.

R 2.15 under Ubuntu 12.04 (Precise)

As root, add these lines to the end of /etc/apt/sources.list. You edit the file by running sudo nano /etc/apt/sources.list.

# For latest version of R
deb http://ppa.launchpad.net/marutter/rrutter/ubuntu precise main
deb-src http://ppa.launchpad.net/marutter/rrutter/ubuntu precise main
  • If you have Ubuntu version 11.10 (Oneiric), you can do the same as above, replacing precise with oneiric.

  • If you have Ubuntu version 10.04 (Lucid), you can do the same as above, replacing oneiric with lucid. I haven't tested this, though.

Install the signing key:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B04C661B

Finally, you can install the latest r-base and upgrade the other R-related packages (if needed):

sudo apt-get update
sudo apt-get install r-base
sudo apt-get upgrade

You can see more information about repository at https://launchpad.net/~marutter/+archive/rrutter.