O'Reilly logo

Apache Spark for Data Science Cookbook by Padma Priya Chitturi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 
           keyserver.ubuntu.com --recv-keys   
           E084DAB9
    
  2. Add the CRAN repository to the end of /etc/apt/sources.list:
       deb https://cran.cnr.berkeley.edu/bin/linux/ubuntu 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required