Automate All the Things

Erin M. Buchanan

2023-04-15

Outline

What is Markdown?

Flavors? Is this Ice Cream?

Why should I use it?

Why should I use it?

Why should I use programming markdown?

How it works

What do I need?

install.packages("tinytex")
tinytex::install_tinytex()

Other Packages

install.packages(c("rmarkdown", "knitr", "flextable", "dplyr", 
                   "rio", "ggplot2", "ggthemes", "treemapify"))

Let’s Get Started!

Let’s Get Started!

Rmd Document Parts - YAML

---
title: "Untitled" 
author: "Erin M. Buchanan"
date: "2023-04-15"
output: html_document
---

Rmd Document Parts - YAML

Knitting

HTML - YAML

output:
  html_document:
    toc: true
    toc_depth: 2

HTML - YAML

output:
  html_document:
    toc: true
    toc_float: true
output:
  html_document:
    toc: true
    toc_float:
      collapsed: false
      smooth_scroll: false

HTML - YAML

output:
  html_document:
    number_sections: true

HTML - YAML

output:
  html_document:
    theme: united
    highlight: tango

PDF - YAML

Word - YAML

output:
  word_document:
    reference_docx: my-styles.docx

Rmd Document Parts - Narrative

## R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

Rmd Document Parts - Narrative

Narrative - Headers/Blocks

# First-level header

## Second-level header

### Third-level header

Narrative - Text Styles

Narrative - Lists

- one item
- one item
- one item
    - one more item
    - one more item
    - one more item

Narrative - Citations

@Manual{R-base,
  title = {R: A Language and Environment for Statistical
    Computing},
  author = {{R Core Team}},
  organization = {R Foundation for Statistical Computing},
  address = {Vienna, Austria},
  year = {2017},
  url = {https://www.R-project.org/},
}

Narrative - Citations

Narrative - Citations

Narrative - Citations