Welcome to this tutorial on Installing R and RStudio on Windows.
In this tutorial, we will learn how to:
Install R version 3.6.1
Install RStudio version 1.1.463 on Windows 10
Open RStudio interface
Install packages
To install R and RStudio, we will use
Windows 10 ,
A working Internet connection.
Now we will learn how to install R on the Windows 10.
Open an Internet browser. I am using Firefox for browsing.
In the address bar, type the following address and press Enter.
Under the tab Getting Started, click on Download R link.
A page named CRAN Mirrors opens.
Under the mirror 0-Cloud, click on the given link.
A new page The Comprehensive R Archive Network opens.
Under the section Download and Install R, click on Download R for Windows.
A new page R for Windows opens.
Under Subdirectories heading we have a list of subdirectories.
In the subdirectory named as Base, click on the link Install R for the first time.
A new page R-3.6.1 for Windows opens.
Click on the link Download R 3.6.1 for Windows.
A Save file dialog box opens.
Click on the Save File button.
The exe file is being downloaded.
We will wait until the downloading is complete.
By default, the exe file will be downloaded to the Downloads folder.
The downloading is now complete.
We will go to the Downloads folder.
Double click on the downloaded exe file for R 3.6.1.
It will open a prompt seeking your permission to begin the installation of R.
Click Yes to continue.
Select Setup Language window opens.
By default, the language is set to English.
Click on OK button to continue.
A window with important information opens.
Read the information about the license and click Next button to continue.
Select Destination Location window to install R opens.
We will keep the default location and click Next to continue.
Select Components window to install R opens.
We will keep the default options.
Click Next button to continue.
Startup options window opens.
We will leave the default option, No as it is.
Then click Next to continue.
Select Start Menu Folder window opens.
We will keep the default options.
Then click Next button to continue.
Select Additional Tasks window opens.
In the window click on the checkbox for Create a desktop shortcut.
Click Next to continue.
We will wait until the installation of R is complete.
Completing the R for Windows 3.6.1 Setup Wizard message appears.
The installation of R is now complete.
Click Finish to exit the setup.
Now, we will verify whether R has been installed successfully.
We can see that the shortcuts to launch R have been created on the Desktop
There are two different icons, which refer to 32-bit and 64-bit installations.
Double click on the 64-bit icon.
The command line interface for R opens.
We can see that R Version 3.6.1 has been installed.
Here we can run the commands using the command-line interface.
Let us perform some mathematical operations using R.
We will compute the value of mathematical constant e.
Remember e is the base of the natural logarithm.
Type exp followed by 1 in parentheses and press Enter.
The required value is displayed.
It means that R has been installed successfully.
Now we will proceed to install Rstudio.
For this we need to quit the current session of R.
Type q followed by parentheses and press Enter.
It asks whether you want to save the workspace image.
As we have nothing to save click No to continue.
Now, we will install RStudio version 1.1.463.
Open an Internet browser. I am using Firefox for browsing.
Type the following address in the address bar and press Enter.
RStudio home page opens.
Click on Download RStudio button.
A page named Download RStudio opens.
Scroll down and locate the RStudio Desktop Open Source License.
Under this license, click on the DOWNLOAD button.
You will be directed to Installers for Supported Platforms section.
Above this section, click on the link Older versions of RStudio.
Older Versions of RStudio page opens.
Scroll down and locate the section RStudio Desktop 1.1.463.
Locate the operating system Windows and click on the Installer link next to it.
A Save file dialog box opens.
Click on the Save File button.
The exe file for RStudio 1.1.463 is being downloaded.
By default the exe file will be downloaded in the Downloads folder.
We will wait until the downloading is complete.
The downloading is now complete.
We will go to the Downloads folder.
Double click on the downloaded exe file for RStudio 1.1.463.
It will open a prompt seeking your permission to begin the installation of Rstudio.
Click Yes to continue.
Welcome to the RStudio Setup Wizard window to begin the installation opens.
Click Next to continue.
Choose Install Location window to install RStudio opens.
We will keep the default location and click Next to continue.
A Choose Start Menu folder window opens.
We will keep the default options.
Then click Install to continue.
We will wait until the installation of RStudio is complete.
Completing the RStudio Setup Wizard message opens.
The installation of RStudio is complete.
Click Finish to close the setup.
Now, we will verify whether RStudio has been installed successfully.
Go to the Start menu of your computer and search for RStudio.
Once the RStudio appears, click on it.
RStudio is launched.
We will clear the Console before moving further.
Click in the Console window and press Ctrl and L keys together.
Now, we will run a plot command.
In the Console window, type plot and in parentheses 1:5 and press Enter.
The required plot is generated.
In the right lower side of RStudio, click on Packages.
Now, we will install a few packages, which will be required later in this series.
We will install plyr, MASS, ggplot2 and dplyr
Let us switch to RStudio.
Make sure that you are connected to the Internet.
In the Console window, type the following command and press Enter.
We will wait until the installation is complete.
plyr package is now installed.
I will clear the Console before moving further.
Click in the Console window and press Ctrl and L keys together.
Now, we will install another package named as MASS.
Type the following command and press Enter.
We will wait until the installation is complete.
MASS package is now installed.
I will clear the Console window again.
Click in the Console window and press Ctrl and L keys together.
Now, we will install ggplot2 package.
In the Console window, type the following command and press Enter.
We will wait until the installation is complete.
Depending upon your speed of the Internet, it may take 4 to 5 minutes.
ggplot2 package is now installed.
I will clear the Console window again.
Click in the Console window.
Press Ctrl and L keys together.
Now, we will install dplyr package.
In the Console window, type the following command and press Enter.
We will wait until the installation is complete.
Depending upon the speed of the Internet, it may take 4 to 5 minutes.
dplyr package is now installed.
Let us summarize what we have learnt.
In this tutorial, we have learnt how to,
Install R version 3.6.1
Install RStudio version 1.1.463 on Windows 10
Open RStudio interface
Install packages
The video at the following link summarises the Spoken Tutorial project.
Please download and watch it.
We conduct workshops using Spoken Tutorials and give certificates.
Please contact us.
Please post your timed queries in this forum.
Do you have any general/technical questions?
Please visit the forum given in the link.
The FOSSEE team coordinates coding of solved examples of popular books.
We give honorarium and certificates to those who do this.
For more details, please visit these sites.
The Spoken Tutorial project is funded by MHRD, Govt. of India
This tutorial is contributed by Madhuri Ganapathi and Sudhakar Kumar from IIT Bombay.
Thank you for watching.