How to install RStudio and setup RMarkdown

How to use RGeostats package step-by-step.
Direct access to Tutorial index and Frequently Asked Questions

How to install RStudio and setup RMarkdown

Postby Didier Renard » Wed Nov 07, 2018 1:58 pm

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 235 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 235 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 235 times


rstudio4.png
Default RMarkdown template
rstudio4.png (24.86 KiB) Viewed 235 times
Didier Renard
 
Posts: 289
Joined: Thu Sep 20, 2012 4:22 pm

Return to Tutorials and FAQ

Who is online

Users browsing this forum: No registered users and 0 guests

cron