Algebraic Topology Group Departament de Matemàtiques UAB Campus Virtual UAB Societat Catalana de Matemàtiques


R in (k)ubuntu 14.04 and 16.04

The R version in (k)ubuntu 14.04 doesn't upgrade automatically, and you have to add a repository manually. This has worked for me:

  • Edit the file /etc/apt/souces.list as a superuser and add the repository trusty/. This procedure can also be done executing one of these lines: trusty for the 14.04 and xenial for 16.40.
    sudo sh -c 'echo "deb trusty/" >> /etc/apt/sources.list'
    sudo sh -c 'echo "deb xenial/" >> /etc/apt/sources.list'
  • Add the public key to the system and to the apt:
    gpg --keyserver --recv-key E084DAB9
    gpg -a --export E084DAB9 | sudo apt-key add -
  • Update the  software list from the repositories:
    sudo apt-get update
  • Either upgrade the software
    sudo apt-get upgrade
    or install R:
    sudo apt-get -y install r-base