1. Installing the latest R in Ubuntu

    At work I have Ubuntu Maverick installed. However, the official packages are a bit outdated. Alternatively, one can add them from an rcran mirror.

    In order to do that, you have to add a line to your /etc/apt/sources/list file. The following did it for me

     deb http://mirrors.softliste.de/cran/bin/linux/ubuntu maverick/
    

    In order to put the setup to work you further need to add the gpg key for the repositories. Theoretically, you can do that with

    sudo gpg --keyserver subkeys.pgp.net --recv-key E2A11821

    but I was getting an error

     gpg: requesting key E2A11821 from hkp server subkeys.pgp.net
     gpg: keyserver timed out
     gpg: keyserver receive failed: keyserver error
    

    Fortunately I found someone describing the same pain, and a healing process for it too in here. After an apt-get update and apt-get upgrade, I’m set up and ready to go.