Page 1 of 1

How to install RStudio and setup RMarkdown

PostPosted: Wed Nov 07, 2018 1:58 pm
by Didier Renard
Here is the procedure for installing RStudio and generating HTML files from RMarkdown scripts :

Prerequisite:
- Install R platform

1- Download the Free version of RStudio Desktop installer for your operating system from here:
https://www.rstudio.com/products/rstudio/download/

2- Install RStudio by executing the downloaded setup program.

3- Open RStudio:

rstudio1.png
Getting started with RStudio
rstudio1.png (32.35 KiB) Viewed 7133 times


4- Create your first R Markdown document:
    - Click on File / New File / R Markdown top menu
    - If RStudio needs to install new packages, click on "Yes"
    - In the popup window, define the Title (set to Test), the Author and the Default Output Format (set to HTML).
    - Finally, press the OK button.
rstudio2.png
Initiating a R Markdown document
rstudio2.png (10.53 KiB) Viewed 7133 times


5- Launch the knit option:
    - Define the file name where the newly created R Markdown document will be stored (for example: test.rmd).
    - Click on knit option and Knit to HTML to produce a HTML file.
rstudio3.png
Launch knit for creating the HTML output document
rstudio3.png (30.95 KiB) Viewed 7133 times


rstudio4.png
Default RMarkdown template
rstudio4.png (24.86 KiB) Viewed 7133 times