Installing R

In this recipe, we will see how to install R on Linux.

Getting ready…

To step through this recipe, you need Ubuntu 14.04 (Linux flavor) installed on the machine.

How to do it…

Here are the steps in the installation of R:

  1. The Comprehensive R Archive Network (CRAN) contains precompiled binary distributions of the base system and contributed packages. It also contains source code for all the platforms. Add the security key as follows:
    sudo apt-key adv --keyserver 
  2. Add the CRAN repository to the end of /etc/apt/sources.list:
       deb trusty/
  3. Install R as follows:
      sudo apt-get update
      sudo apt-get install r-base r-base-dev

This will install R and the recommended ...

Get Apache Spark for Data Science Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.