R installation for windows

In this tutorial, you will learn the entire installation process of R into your windows operating system. This tutorial is structured in a way that you will start by exploring how to install R into your system. Then you will learn to install the IDE for R Programming which is RStudio.  After that, I will help you to get familiar with RStudio and how to run R codes in RStudio. Last but not least you will look at how to install packages and update packages into RStudio.

HOW TO DOWNLOAD R 

  1. To install R to your windows operating system,  visit the official website of R programming either by clicking on this link - https://cran.r-project.org or by searching it on your favorite browser as shown below.
    Download R
  2. Now you will reach the official page of CRAN where you can find the download option for windows on the top left corner of the page.
    Download R
  3. Clicking on the download link will start downloading the R installer to your system. On the bottom left corner of your screen, you can find the download of the .exe file. It will take a few seconds to complete the download.
    Download R
  4. Now the R installer is downloaded to your system. It's time to set up the R installer. You can install it either right away after the download by opening the .exe file or you can install it later from the download folder in your system by double-clicking on the .exe file. 

HOW TO INSTALL R 

  1. The installation setup begins with the below dialogue box. You can choose your desired language for the installer and then click OK.
    R Installation for Windows
  2. The next window that appears contains the information of the GNU license, just click Next to proceed.
    R Installation for Windows
  3. Then, you can select the destination where you want the R to be installed and then click Next. Remember the path of the destination folder for later use if you are selecting a different folder.
    R Installation for Windows
  4. Now you can choose the components depending on the size of your OS and then click Next. By default, it will be in the customized option with all the checkboxes ticked. Here, we have chosen the 64-bit user installation.
    R Installation for Windows
  5. Next, you will be asked to customize the startup option as per your preference and then click Next. We kept it ideal here as shown below.
    R Installation for Windows
  6. In this step, you are asked to select the start menu folder by browsing a folder from your system or you can keep it as such like what we have done here.  Then click the Next button to proceed.
    R Installation for Windows
  7. Now you can select additional tasks that you would like to incorporate in the setup. You can select your preferences by ticking the checkboxes or can remove them by unticking the selected ones. Then click the Next button.
    R Installation for Windows
  8. Now the installation starts and a window showing the installation progress will appear on your screen.
    R Installation for Windows
  9. Finally, a window as shown will display on your screen. Click the Finish button to exit the setup.
    R Installation for Windows
  10. Now R is successfully installed in your system. To open the R console, follow the path C drive -> Program Files -> R -> R-4.1.0(as per your version)->bin folder -> R or directly open it from the desktop shortcut.  
    R Installation for Windows
  11. The R console window will be something like below.
    R Installation for Windows

To write small R codes you can rely on the R console however to write big codes in R you need more user-friendly and interactive options. The best option is to install an Integrated Development Environment like RStudio. So let’s check out how to install RStudio for free. 

How to install r studio

  1. To install RStudio into your system, visit the link - https://www.rstudio.com
    How to install r studio
  2. On hitting on download, you will be directed to the page as shown below.
    How to install r studio
  3. Now scroll down the above page to the location where all download options are listed. You can choose the free version to download it free or else can go for other options.
    How to install r studio
  4. Clicking the download button will take you to the page where all installers are listed. Based on your operating system you can use a new version or an old version of RStudio.
    How to install r studio
  5. Hitting on the version will allow you to download the RStudio installer to your system. Now open the RStudio installer to set it up in your system. A window like the below will appear on your screen. Click on the Next button to proceed.
    How to install r studio
  6. Now you can select the folder where you want to install the RStudio by browsing the location. Then click Next.
    How to install r studio
  7. Here, you can choose the start menu folder where you want to create the shortcut. Then hit the Install button.
    How to install r studio
  8. Hitting the Install button will begin the installation and on completion, you will get a screen with a window below. Finally, exit the Rstudio setup by clicking the Finish button.
    How to install r studio

FAMILIARISING WITH R STUDIO

Now R studio is successfully installed in your system and you can start using it to the R program. Before writing an R program in Rstudio, let’s familiarize ourselves with RStudio. Following steps by step will guide you. 

  1. To open a Rstudio application, you should remember the folder where rstudio is installed. Ideally, it will be in the bin folder. The path is as follows: C drive -> Program Files ->RStudio -> bin.
    How to install r studio
  2. Double-clicking on the rstudio will open the Rstudio application as below. You can see 3 different windows.
    How to install r studio
  3. How to install r studio
    How to install r studio