Introduction to R Markdown
Paula Moraga · 2019
R Markdown uses to easily turn our analysis into fully reproducible documents that can be shared with others to communicate our analysis quickly and effectively. This chapter provides an introduction to R Markdown and show how to use it to generate a report that shows the results of a simple analysis of data from the package gapminder by means of several plots, tables and narrative text. The YAML below specifies an HTML document with font size 12pt, and includes a table of contents where two is the lowest level of headings. The text in an R Markdown file is written with Markdown syntax. Markdown is a lightweight markup language that creates styled text using a lightweight plain text syntax. Figures can be created by writing the R code that generates them inside an R code chunk. In the R chunk we can write the option fig.