Installing R on Windows and Ubuntu

R Installation

In this guide you will learn how to install R on windows and Ubuntu platforms. Step by step tutorial for installing R.

https://cran.r-project.org/ is your one stop solution to download R for any operating system. This tutorial will guide you to how to set up R on Windows and Ubuntu.

Installing on Ubuntu 14.04

We will install R on Ubuntu in two parts. First will be to set up the Advanced Packaging Tool and second will be installing R.

1 – Setting up APT

To install R, we’re going to use the APT (Advanced Packaging Tool) tool.

$ sudo sh -c ‘echo “deb http://cran.rstudio.com/bin/linux/ubuntu trusty/” >> /etc/apt/sources.list’

To authenticate packages using Advanced Packaging Tool, we will add a public key. The Ubuntu on CRAN have a key with ID E084DAB9. Adding this key to your system with the following.

$ gpg –keyserver keyserver.ubuntu.com –recv-key E084DAB9

Adding the key to Advanced Packaging Tool.

2 – Installing R

Now, we are ready to use APT to install R. We will update the list of available packages.

$ sudo apt-get update

Installing R with this command. -y flag to answer Yes when asked if we are sure we want to download the package(s).

$ sudo apt-get -y install r-base

Voila! R is up and running on your system. Run it by,

$ R

Installing on windows

Windows the installation is pretty straight forward. You can download the .exe from https://cran.r-project.org/bin/windows/base/ and run the installation wizard.

After in installation your R console should look like this.

R console

Search

Shortcodes Ultimate

 
Follow Us
 
BGP