Difference between revisions of "R/C2/Installing-R-and-RStudio-on-Windows/English"
Nancyvarkey (Talk | contribs) |
|||
(One intermediate revision by the same user not shown) | |||
Line 25: | Line 25: | ||
|- | |- | ||
− | || Show | + | || Show Slide |
+ | |||
+ | System Specifications | ||
|| To install '''R''' and '''RStudio''', we will use | || To install '''R''' and '''RStudio''', we will use | ||
* '''Windows 10''' | * '''Windows 10''' | ||
Line 35: | Line 37: | ||
|- | |- | ||
|| Highlight '''Firefox '''on the machine | || Highlight '''Firefox '''on the machine | ||
− | || Open an '''Internet browser'''. I am using '''Firefox '''for browsing. | + | || Open an '''Internet browser'''. I am using '''Firefox ''' for browsing. |
|- | |- | ||
|| Highlight the address bar of the '''firefox browser. ''' | || Highlight the address bar of the '''firefox browser. ''' | ||
Line 78: | Line 80: | ||
|| Click on the link '''Download R 3.6.1 for Windows'''. | || Click on the link '''Download R 3.6.1 for Windows'''. | ||
|- | |- | ||
− | || | + | || Point to the dialog box. Click on the '''Save File''' button. |
|| A '''Save file''' dialog box opens. Click on the '''Save File''' button. | || A '''Save file''' dialog box opens. Click on the '''Save File''' button. | ||
|- | |- | ||
Line 86: | Line 88: | ||
We will wait until the downloading is complete. | We will wait until the downloading is complete. | ||
− | By default, the '''exe file''' will be downloaded | + | By default, the '''exe file''' will be downloaded to the '''Downloads''' folder. |
|- | |- | ||
||Go to '''Downloads''' folder | ||Go to '''Downloads''' folder | ||
Line 92: | Line 94: | ||
|- | |- | ||
|| Highlight '''Downloads folder''' on the machine. | || Highlight '''Downloads folder''' on the machine. | ||
− | || Double click on the downloaded''' exe file''' for '''R 3.6.1 | + | || Double click on the downloaded''' exe file''' for '''R 3.6.1'''. |
|- | |- | ||
− | || Highlight''' User Account Control''' window on the machine. | + | || Highlight '''User Account Control''' window on the machine. |
Click '''Yes''' to continue. | Click '''Yes''' to continue. | ||
Line 103: | Line 105: | ||
|| Highlight '''Select Setup Language''' window on the machine | || Highlight '''Select Setup Language''' window on the machine | ||
− | Point to English. | + | Point to '''English'''. |
Click on the '''OK''' button. | Click on the '''OK''' button. | ||
Line 123: | Line 125: | ||
>> click '''Next''' to continue. | >> click '''Next''' to continue. | ||
− | || '''Select Destination Location''' window to install '''R '''opens. | + | || '''Select Destination Location''' window to install '''R ''' opens. |
We will keep the default location and click '''Next''' to continue. | We will keep the default location and click '''Next''' to continue. | ||
Line 156: | Line 158: | ||
We will keep the default options. | We will keep the default options. | ||
− | Then click '''Next''' to continue. | + | Then click '''Next''' button to continue. |
|- | |- | ||
|| Highlight '''Select Additional Tasks''' on the machine | || Highlight '''Select Additional Tasks''' on the machine | ||
Line 180: | Line 182: | ||
||Click '''Finish''' to exit the '''setup'''. | ||Click '''Finish''' to exit the '''setup'''. | ||
|- | |- | ||
− | || | + | ||Cursor on Windows Desktop. |
||Now, we will verify whether '''R''' has been installed successfully. | ||Now, we will verify whether '''R''' has been installed successfully. | ||
|- | |- | ||
|| Highlight both '''R''' icons on the '''Desktop''' | || Highlight both '''R''' icons on the '''Desktop''' | ||
− | || We can see that the '''shortcuts''' to launch''' R''' have been created on the '''Desktop''' | + | || 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. | There are two different icons, which refer to '''32-bit''' and '''64-bit''' installations. | ||
Line 198: | Line 200: | ||
Here we can run the '''commands''' using the '''command-line interface'''. | Here we can run the '''commands''' using the '''command-line interface'''. | ||
|- | |- | ||
− | || | + | ||Cursor on the command line interface. |
||Let us perform some mathematical operations using '''R.''' | ||Let us perform some mathematical operations using '''R.''' | ||
− | We will compute the value of '''mathematical constant e | + | We will compute the value of '''mathematical constant e'''. |
Remember '''e''' is the base of the '''natural logarithm'''. | Remember '''e''' is the base of the '''natural logarithm'''. | ||
Line 208: | Line 210: | ||
Highlight '''[1] 2.718282 '''in the '''R command line interface''' | Highlight '''[1] 2.718282 '''in the '''R command line interface''' | ||
− | || Type '''exp''' followed by '''1''' in parentheses and press '''Enter | + | || Type '''exp''' followed by '''1''' in parentheses and press '''Enter'''. |
The required value is displayed. | The required value is displayed. | ||
Line 215: | Line 217: | ||
|- | |- | ||
|| '''q()''' | || '''q()''' | ||
− | || Now we will proceed to install '''RStudio | + | || Now we will proceed to install '''RStudio'''. |
For this we need to quit the current session of '''R. ''' | For this we need to quit the current session of '''R. ''' | ||
− | Type '''q''' followed by parentheses and press '''Enter | + | Type '''q''' followed by parentheses and press '''Enter'''. |
|- | |- | ||
|| Highlight''' Save workspace image '''window | || Highlight''' Save workspace image '''window | ||
Line 226: | Line 228: | ||
As we have nothing to save click '''No''' to continue. | As we have nothing to save click '''No''' to continue. | ||
|- | |- | ||
− | || | + | || Cursor on the Windows Desktop. |
|| Now, we will install '''RStudio version 1.1.463'''. | || Now, we will install '''RStudio version 1.1.463'''. | ||
|- | |- | ||
|| Highlight '''Firefox '''on the machine | || Highlight '''Firefox '''on the machine | ||
− | || Open an '''Internet browser'''. I am using '''Firefox '''for browsing. | + | || Open an '''Internet browser'''. I am using '''Firefox''' for browsing. |
|- | |- | ||
|| Highlight the '''address bar''' of the '''Google Chrome ''' | || Highlight the '''address bar''' of the '''Google Chrome ''' | ||
Line 242: | Line 244: | ||
|| '''RStudio home page''' opens. | || '''RStudio home page''' opens. | ||
− | Click on '''Download RStudio '''button. | + | Click on '''Download RStudio''' button. |
|- | |- | ||
|| Highlight '''Choose your version of RStudio''' on the webpage | || Highlight '''Choose your version of RStudio''' on the webpage | ||
Line 267: | Line 269: | ||
|- | |- | ||
|| Highlight '''Windows''' on the webpage | || Highlight '''Windows''' on the webpage | ||
− | || Locate the operating system '''Windows''' and click on the '''Installer '''link next to it. | + | || Locate the operating system '''Windows''' and click on the '''Installer''' link next to it. |
|- | |- | ||
− | || | + | || Point to the dialog box. Click on the '''Save File''' button. |
|| A '''Save file''' dialog box opens. Click on the '''Save File''' button. | || A '''Save file''' dialog box opens. Click on the '''Save File''' button. | ||
|- | |- | ||
|| Highlight the '''Downloading icon''' in the upper pane of the browser | || Highlight the '''Downloading icon''' in the upper pane of the browser | ||
− | || The '''exe file''' for '''RStudio 1.1.463 '''is being downloaded. | + | || The '''exe file''' for '''RStudio 1.1.463''' is being downloaded. |
By default the '''exe file''' will be downloaded in the '''Downloads''' folder. | By default the '''exe file''' will be downloaded in the '''Downloads''' folder. | ||
Line 283: | Line 285: | ||
|- | |- | ||
|| Highlight Downloads folder on the machine | || Highlight Downloads folder on the machine | ||
− | || Double click on the downloaded '''exe file''' for '''RStudio 1.1.463 | + | || Double click on the downloaded '''exe file''' for '''RStudio 1.1.463'''. |
|- | |- | ||
|| Highlight''' User Account Control''' window on the machine | || Highlight''' User Account Control''' window on the machine | ||
Line 318: | Line 320: | ||
|- | |- | ||
|| Highlight '''RStudio has been installed '''on the machine. | || Highlight '''RStudio has been installed '''on the machine. | ||
− | |||
|| '''Completing the RStudio Setup Wizard''' message opens. | || '''Completing the RStudio Setup Wizard''' message opens. | ||
Line 357: | Line 358: | ||
|| In the right lower side of '''RStudio''', click on '''Packages'''. | || In the right lower side of '''RStudio''', click on '''Packages'''. | ||
|- | |- | ||
− | || | + | || Show slide |
+ | |||
+ | Installing Packages | ||
|| Now, we will install a few '''packages''' which will be required later in this series. | || Now, we will install a few '''packages''' which will be required later in this series. | ||
|- | |- | ||
Line 370: | Line 373: | ||
|- | |- | ||
− | || | + | || [RStudio] |
|| Let us switch to '''RStudio'''. | || Let us switch to '''RStudio'''. | ||
Line 391: | Line 394: | ||
'''Ctrl + L''' | '''Ctrl + L''' | ||
− | || Click in the '''Console''' window | + | || Click in the '''Console''' window and press''' Ctrl''' and '''L '''keys together. |
− | + | ||
− | + | ||
|- | |- | ||
|| [RStudio] | || [RStudio] | ||
Line 413: | Line 414: | ||
'''Ctrl + L''' | '''Ctrl + L''' | ||
− | || Click in the '''Console''' window | + | || Click in the '''Console''' window and press''' Ctrl''' and '''L '''keys together. |
− | + | ||
− | + | ||
|- | |- | ||
|| [RStudio] | || [RStudio] | ||
Line 440: | Line 439: | ||
|| Click in the '''Console''' window. | || Click in the '''Console''' window. | ||
− | Press''' Ctrl''' and '''L '''keys together. | + | Press '''Ctrl''' and '''L '''keys together. |
|- | |- | ||
|| [RStudio] | || [RStudio] | ||
Line 463: | Line 462: | ||
Summary | Summary | ||
|| In this tutorial, we have learnt how to, | || In this tutorial, we have learnt how to, | ||
− | * Install''' R '''version 3.6.1 | + | * Install''' R''' version 3.6.1 |
* Install '''RStudio''' version 1.1.463 on '''Windows 10''' | * Install '''RStudio''' version 1.1.463 on '''Windows 10''' | ||
* Open '''RStudio''' interface | * Open '''RStudio''' interface | ||
Line 499: | Line 498: | ||
Textbook Companion | Textbook Companion | ||
− | || The '''FOSSEE '''team coordinates coding of solved examples of popular books. | + | || The '''FOSSEE ''' team coordinates coding of solved examples of popular books. |
We give honorarium and certificates to those who do this. | We give honorarium and certificates to those who do this. |
Latest revision as of 10:54, 4 November 2019
Title of the script: Installing R and RStudio on Windows
Author: Madhuri Ganapathi and Sudhakar Kumar (IIT Bombay)
Keywords: R, RStudio, Windows, packages, ggplot2, dplyr, video tutorial
Visual Cue | Narration |
Show slide
Opening Slide |
Welcome to this tutorial on Installing R and RStudio on Windows. |
Show slide
Learning Objective |
In this tutorial, we will learn how to:
|
Show Slide
System Specifications |
To install R and RStudio, we will use
|
Now we will learn how to install R on the Windows 10. | |
Highlight Firefox on the machine | Open an Internet browser. I am using Firefox for browsing. |
Highlight the address bar of the firefox browser. | In the address bar, type the following address and press Enter. |
Highlight Getting Started on the homepage of R Project | Under the tab Getting Started, click on Download R link. |
Highlight CRAN Mirrors on the webpage | A page named CRAN Mirrors opens. |
Highlight the mirror 0-Cloud on the webpage | Under the mirror 0-Cloud, click on the given link. |
Highlight The Comprehensive
R Archive Network on the webpage |
A new page The Comprehensive R Archive Network opens. |
Highlight Download and Install R on the webpage | Under the section Download and Install R, click on Download R for Windows. |
Highlight R for Windows on the webpage.
Point to the subdirectories. |
A new page R for Windows opens.
Under Subdirectories heading we have a list of subdirectories. |
Highlight base on the webpage | In the subdirectory named as Base, click on the link Install R for the first time. |
Highlight R-3.6.1 for Windows on the webpage | A new page R-3.6.1 for Windows opens. |
Highlight Download R 3.6.1 for Windows on the webpage | Click on the link Download R 3.6.1 for Windows. |
Point to the dialog box. Click on the Save File button. | A Save file dialog box opens. Click on the Save File button. |
Highlight the Downloading icon in the upper pane of the browser | 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. |
Go to Downloads folder | The downloading is now complete. We will go to the Downloads folder. |
Highlight Downloads folder on the machine. | Double click on the downloaded exe file for R 3.6.1. |
Highlight User Account Control window on the machine.
Click Yes to continue. |
It will open a prompt seeking your permission to begin the installation of R.
Click Yes to continue. |
Highlight Select Setup Language window on the machine
Point to English. Click on the OK button. |
Select Setup Language window opens.
By default, the language is set to English. Click on OK button to continue. |
Highlight Setup - R for Windows 6.1 window on the machine
Scroll the License information. |
A window with important information opens.
Read the information about the license and click Next button to continue. |
Highlight Select Destination Location on the machine.
>> click Next to continue. |
Select Destination Location window to install R opens.
We will keep the default location and click Next to continue. |
Highlight Select Components on the machine
Point to the default options. Click Next button to continue. |
Select Components window to install R opens.
We will keep the default options. Click Next button to continue. |
Highlight Startup options on the machine
Point to No radio button. click Next to continue. |
Startup options window opens.
We will leave the default option, No as it is. Then click Next to continue. |
Highlight Select Start Menu folder on the machine.
click Next to continue. |
Select Start Menu Folder window opens.
We will keep the default options. Then click Next button to continue. |
Highlight Select Additional Tasks on the machine
Click on Create a desktop shortcut the checkbox. click Next to continue. |
Select Additional Tasks window opens.
In the window click on the checkbox for Create a desktop shortcut. Click Next to continue. |
Highlight Installing on the machine | We will wait until the installation of R is complete. |
Highlight Setup has finished installing R on the machine | Completing the R for Windows 3.6.1 Setup Wizard message appears.
The installation of R is now complete. |
Click Finish button | Click Finish to exit the setup. |
Cursor on Windows Desktop. | Now, we will verify whether R has been installed successfully. |
Highlight both R icons on the Desktop | 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. |
Highlight R 64-bit icon | Double click on the 64-bit icon. |
Highlight Version 3.6.1 (2019-07-05) in the command line interface for R | 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. |
Cursor on 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. |
exp(1)
Highlight [1] 2.718282 in the R command line interface |
Type exp followed by 1 in parentheses and press Enter.
The required value is displayed. It means that R has been installed successfully. |
q() | 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. |
Highlight Save workspace image window | It asks whether you want to save the workspace image.
As we have nothing to save click No to continue. |
Cursor on the Windows Desktop. | Now, we will install RStudio version 1.1.463. |
Highlight Firefox on the machine | Open an Internet browser. I am using Firefox for browsing. |
Highlight the address bar of the Google Chrome | Type the following address in the address bar and press Enter. |
Point to the page.
Highlight Download RStudio on the webpage |
RStudio home page opens.
Click on Download RStudio button. |
Highlight Choose your version of RStudio on the webpage | A page named Download RStudio opens. |
Highlight RStudio Desktop Open Source License on the webpage.
Click on the DOWNLOAD link. |
Scroll down and locate the RStudio Desktop Open Source License.
Under this license, click on the DOWNLOAD button. |
Highlight Installers for Supported Platforms on the webpage | You will be directed to Installers for Supported Platforms section. |
Highlight older version of RStudio on the webpage | Above this section, click on the link Older versions of RStudio. |
Highlight Older Versions of RStudio on the webpage | Older Versions of RStudio page opens. |
Highlight RStudio Desktop 1.1.463 on the webpage | Scroll down and locate the section RStudio Desktop 1.1.463. |
Highlight Windows on the webpage | Locate the operating system Windows and click on the Installer link next to it. |
Point to the dialog box. Click on the Save File button. | A Save file dialog box opens. Click on the Save File button. |
Highlight the Downloading icon in the upper pane of the browser | 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. |
Go to Downloads folder | The downloading is now complete. We will go to the Downloads folder. |
Highlight Downloads folder on the machine | Double click on the downloaded exe file for RStudio 1.1.463. |
Highlight User Account Control window on the machine | It will open a prompt seeking your permission to begin the installation of RStudio.
Click Yes to continue. |
Highlight RStudio Setup on the machine
Click Next to continue. |
Welcome to the RStudio Setup Wizard window to begin the installation opens.
Click Next to continue. |
Highlight Choose Install Location on the machine.
Click Next to continue. |
Choose Install Location window to install RStudio opens.
We will keep the default location and click Next to continue. |
Highlight Choose Start Menu folder on the machine
Click Install to continue. |
A Choose Start Menu folder window opens.
We will keep the default options. Then click Install to continue. |
Highlight Installing on the machine | We will wait until the installation of RStudio is complete. |
Highlight RStudio has been installed on the machine. | Completing the RStudio Setup Wizard message opens.
The installation of RStudio is complete. |
Click Finish button. | Click Finish to close the setup.
Now, we will verify whether RStudio has been installed successfully. |
Highlight Search on the machine | Go to the Start menu of your computer and search for RStudio.
Once the RStudio appears, click on it. |
Highlight RStudio window | RStudio is launched. |
[RStudio]
Ctrl + L |
We will clear the Console before moving further.
Click in the Console window and press Ctrl and L keys together. |
Highlight the greater than symbol in the Console window | Now, we will run a plot command. |
[RStudio]
plot(1:5) |
In the Console window, type plot and in parentheses 1:5 and press Enter. |
Highlight the plot in the Plots window | The required plot is generated. |
Highlight Packages in the interface of RStudio | In the right lower side of RStudio, click on Packages. |
Show slide
Installing Packages |
Now, we will install a few packages which will be required later in this series. |
Show slide
Installing Packages |
We will install
|
[RStudio] | Let us switch to RStudio.
Make sure that you are connected to the Internet. |
[RStudio]
install.packages("plyr") |
In the Console window, type the following command and press Enter.
We will wait until the installation is complete. |
Highlight DONE (plyr) in RStudio | plyr package is now installed. |
Cursor in the Console window of RStudio | I will clear the Console before moving further. |
[RStudio]
Ctrl + L |
Click in the Console window and press Ctrl and L keys together. |
[RStudio]
install.packages("MASS") |
Now, we will install another package named as MASS.
Type the following command and press Enter. We will wait until the installation is complete. |
Highlight DONE (MASS) in RStudio | MASS package is now installed. |
Cursor in the Console window of RStudio | I will clear the Console window again. |
[RStudio]
Ctrl + L |
Click in the Console window and press Ctrl and L keys together. |
[RStudio]
install.packages("ggplot2") |
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. |
Highlight DONE (ggplot2) in RStudio | ggplot2 package is now installed. |
Cursor in the Console window of RStudio | I will clear the Console window again. |
[RStudio]
Ctrl + L |
Click in the Console window.
Press Ctrl and L keys together. |
[RStudio]
install.packages("dplyr") |
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. |
Highlight DONE (dplyr) in RStudio | dplyr package is now installed. |
Let us summarize what we have learnt. | |
Show slide
Summary |
In this tutorial, we have learnt how to,
|
Show slide
About the Spoken Tutorial Project |
The video at the following link summarises the Spoken Tutorial project.
Please download and watch it. |
Show slide
Spoken Tutorial Workshops |
We conduct workshops using Spoken Tutorials and give certificates.
Please contact us. |
Show Slide
Forum to answer questions |
Please post your timed queries in this forum. |
Show Slide
Forum to answer questions |
Do you have any general/technical questions?
Please visit the forum given in the link. |
Show Slide
Textbook Companion |
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. |
Show Slide
Acknowledgment |
The Spoken Tutorial project is funded by NMEICT, MHRD, Govt. of India |
Show Slide
Thank You |
This tutorial is contributed by Madhuri Ganapathi and Sudhakar Kumar from IIT Bombay. Thank you for watching. |