Introduction to Quarto

R Workshop
Author
Affiliation

Boston University

Published

February 2, 2023

Quarto

Quarto documentation and gallery can be found on their website.

Below are some examples of the features that were added to RMarkdown notebooks.

Automatic Figure labeling

Figure 1 explores the impact of temperature on ozone level.

Code
library(ggplot2)
data(airquality)

ggplot(airquality, aes(Temp, Ozone)) + 
  geom_point() + 
  geom_smooth(method = "loess"
)

Figure 1: Temperature and ozone level.

Mermaid Diagrams

Quarto has native support for embedding Mermaid and Graphviz diagrams. This enables you to create flowcharts, sequence diagrams, state diagrams, gantt charts, and more using a plain text syntax inspired by markdown:

flowchart LR
  A[qmd] --> B(Knitr)
  A[qmd] --> C(Jupyter)
  B(Knitr) --> D[md]
  C(Jupyter) --> D[md]
  D[md] --> E(pandoc)
  E(pandoc) --> F(HTML)
  E(pandoc) --> G(PDF)
  E(pandoc) --> H(Word)
  E(pandoc) --> I{and more}

Figure 2: Mermaid Diagrams

Graphviz Diagrams

G qmd qmd Knitr Knitr qmd–Knitr Jupyter Jupyter qmd–Jupyter md md Knitr–md Jupyter–md pandoc pandoc md–pandoc HTML HTML pandoc–HTML PDF PDF pandoc–PDF Word Word pandoc–Word more more pandoc–more

Figure 3: Graphviz diagrams