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
- 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.
- 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.
- 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.
- 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
- The installation setup begins with the below dialogue box. You can choose your desired language for the installer and then click OK.
- The next window that appears contains the information of the GNU license, just click Next to proceed.
- 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.
- 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.
- 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.
- 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.
- 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.
- Now the installation starts and a window showing the installation progress will appear on your screen.
- Finally, a window as shown will display on your screen. Click the Finish button to exit the setup.
- 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.
- The R console window will be something like below.
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
- To install RStudio into your system, visit the link - https://www.rstudio.com
- On hitting on download, you will be directed to the page as shown below.
- 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.
- 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.
- 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.
- Now you can select the folder where you want to install the RStudio by browsing the location. Then click Next.
- Here, you can choose the start menu folder where you want to create the shortcut. Then hit the Install button.
- 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.
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.
- 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.
- Double-clicking on the rstudio will open the Rstudio application as below. You can see 3 different windows.