How to upgrade R in ubuntu?
Follow the instructions from here
sudo gedit /etc/apt/sources.list
This will open up your sources.list file in gedit, where you can add the following line.
deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu/ version/
Replace version/ with whatever version of Ubuntu you are using (eg, precise/, oneric/, and so on). If you’re getting a “Malformed line error”, check to see if you have a space between /ubuntu/ and version/.
Fetch the secure APT key with gpg –keyserver keyserver.ubuntu.com –recv-key E084DAB9 or gpg —hkp://keyserver keyserver.ubuntu.com:80 –recv-key E084DAB9.
Feed it to apt-key with gpg -a –export E084DAB9 | sudo apt-key add –
Update your sources and upgrade your installation with sudo apt-get update && sudo apt-get upgrade.
Since R is already installed, you should be able to upgrade it with this method.
Note that you don’t have to necessarily use the Berkeley mirror. You may get a list of all mirrors here : http://cran.r-project.org/mirrors.html