rubuntuinstallationrstudioinstallation-package

Install R and RStudio in Xubuntu 16.04


I've just started using Linux and I'm currently trying to install R and RStudio in Xubuntu 16.04. I'm just a little bit confused about the installation of R because some people say we just need to do that:

sudo apt-get install r-base

And on the other hand, others are saying to add a repository, do the update and then do the command line. For the installation of RStudio it should be okay...

So how can I install R please?

Thanks!


Solution

  • I recently reinstalled R on Ubuntu 14.04 and this worked for me:

    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
    sudo add-apt-repository 'deb [arch=amd64,i386] https://cran.rstudio.com/bin/linux/ubuntu xenial/'
    sudo apt-get update
    sudo apt-get install r-base