R and R-Studio Setup

In this article, you will learn to install R software and R Studio to get started with R programming.

Advertisements

The R software is a free software which you can install to write your programs and R-Studio is an IDE that helps to manage your workspace (you will learn about workspace later) and debugging, syntax highlighting, etc.

To learn R you don’t need R-Studio, however, we recommend installing it because it will make things little easier. Also, throughout this tutorial, we have used R-Studio for R programming examples.

In the next few sections, you will learn how to install R and R-Studio. If you already familiar with the step, simply skip this part and move to next article.

Download R and R-Studio

The first step to install R is download the required software from the following links.

  1. Download R-3.X.X for windows
  2. Download R-Studio

Before downloading the software check the system requirements such as disk space, Windows operating system 10/8/7/XP and 32/64 bit system. The best way to know this in advance is to read the product documentation for R and R-studio.

Installing R

Once you have downloaded the R and R-studio in a separate folder and click R-3.x.x to start installing it. See the figure below.

Click R-3.6.x to start installing R software
Click R-3.6.x to start installing R software

Click run to continue the installation.

The R setup will ask you to select the language. If you want a different language other than English, click the drop down and select your language.

Select you preferred language
Select your language

Click OK to continue with he installation.

In the next screen, you will be asked to accept the license agreement. R software is free with GNU license means you do not need to pay for anything.

You may read the license and click Next to continue
You may read the license and click Next to continue

Click Next to continue with the installation of R.

Next step is to choose a installation directory for R. By default, R tries to install in C:/Program Files/R/R-3.x.x, however, you can click on the Browse button and navigate to a location of your choice.

Make sure that the destination drive has enough disk space.

Choose a different directory to install or click Next
Choose a different directory to install or click Next

Choose a different directory using Browse or click Next to continue with the installation.

Now, in the next screen, you have to select the required components that you want to install for R. If you have a 64 bit system you can select 32 bit files or 64 bit files. Otherwise, for 32 bit system only select 32 bit files.

Select the required components to install
Select the required components to install

Since, we are using a 64-bit Windows 8.1 system, 32-bit files are not selected for this installation. You can select rest of the components to install. Click Next to continue the installation.

The next screen is about startup options. R provides with two startup options.

  1. customized startup environment
  2. default startup

In a fresh installation, a site-wide environment or user specific environment configuration file does not exist.

Advertisements

If available, this file will be located in the installation directory (C:/program files/R/..).

The file is called Rprofile.site, if not than R will try to start the environment from current working directory. A working directory is directory where R command line works. It means whatever R command you give to console is executed here.

If nothing is found site-wide , then R tries to load the environment from user-home directory. It look for a file called .rprofile.

If you are not using a customized startup , select NO
If you are not using a customized startup , select NO

Select No, if you are not using RProfile.site or any .rprofile configuration. Click Next to continue with the installation.

Click Next to continue if you want R in start menu
Click Next to continue if you want R in start menu

In the next screen, select if you want R to be in the Start Menu folder. if not, then select ”Don’t create a Start Menu folder” and click Next.Otherwise, simply click Next to continue.

Select additional tasks and shortcuts and click Next
Select additional tasks and shortcuts and click Next

You can select to create shortcuts for R on desktop here or a quick launch shortcut in windows taskbar. Since, we are going to use R-Studio, no need to select quick launch shortcuts.

Data from R workspace is stored in .RData files. You choose the registry options. Click Next to continue.

The setup will install the R
The setup will install the R

You have to wait for few minutes while setup installs R on your computer.

Setup Finished Installation of R
Setup Finished Installation of R

Once the setup completes the installation of R, you can click Finish.

Installing R-Studio

R-Studio is an Integrated Development Environment (IDE). It highlights the R syntax, help in debugging R codes, and so on.

You have already downloaded the R studio and saved it in the same directory as R.

Click the setup for R-studio and start the installation.

Start the installation by right-clicking the setup for RStudio
Start the installation by right-clicking the setup for RStudio

First right-click the RStudio setup and select Run As Administrator.

Click Next to continue
Click Next to continue

Click on the RStudio setup and click Next.

Choose the installation directory, by default, it will install it in the C:/Program files/RStudio. However, you can change the installation directory by clicking the Browse button.

Select the installation directory
Select the installation directory

Click Next to continue with the installation.

RStudio will install the files
RStudio will install the files

The setup will continue to install the files which will take few minutes.

Click Finish to complete the installation
Click Finish to complete the installation

Once the setup is complete the installation click on Finish.

Congratulations ! you have installed R and RStudio successfully. Try to open the RStudio and verify your installation.

Advertisements

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.