Skip to navigation

Installing and updating R with aptitude

If you like, choose your favourite R mirror from the CRAN mirror list and substitute it for the http://www.sourcekeg.co.uk/cran/ below. The following is for Ubuntu Dapper. If you are using a different distro, replace “dapper” with the correct codename for that distro before you add it to sources.list.

sudo -s 
echo "deb http://www.sourcekeg.co.uk/cran/bin/linux/ubuntu  dapper/" >> /etc/apt/sources.list
exit
gpg --keyserver subkeys.pgp.net --recv-key E2A11821
gpg -a --export E2A11821 | sudo apt-key add -
sudo aptitude update

Then, if you don’t have R yet:

sudo aptitude install r-base

If you have it, you may be able to get the latest update with

sudo aptitude upgrade

or, r-base may show up along with other R stuff under “The following packages have been kept back”. In that case:

sudo aptitude dist-upgrade

Read up on the difference between upgrade and dist-upgrade

Comments are closed.