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 gpghkp://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

Advertisements

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: