--- title: "Introduction to Quarto" description: R Workshop author: - name: "Katia Bulekova" url: https://www.bu.edu/tech/support/research/ affiliation: Boston University date: "`r Sys.Date()`" editor: visual format: html: fig-width: 8 fig-height: 4 code-fold: true --- ## Quarto Quarto documentation and gallery can be found on their [website](https://quarto.org/). Below are some examples of the features that were added to RMarkdown notebooks. ## Automatic Figure labeling @fig-airquality explores the impact of temperature on ozone level. ```{r} #| label: fig-airquality #| fig-cap: Temperature and ozone level. #| warning: false library(ggplot2) data(airquality) ggplot(airquality, aes(Temp, Ozone)) + geom_point() + geom_smooth(method = "loess" ) ``` ## 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: ```{mermaid} %%| label: fig-mermaid %%| fig-width: 6 %%| fig-cap: Mermaid Diagrams 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} ``` ## Graphviz Diagrams ```{dot} //| label: fig-dot //| fig-width: 3 //| fig-cap: Graphviz diagrams graph G { layout=neato qmd -- Knitr; qmd -- Jupyter; Knitr -- md; Jupyter -- md; md -- pandoc; pandoc -- HTML; pandoc -- PDF; pandoc -- Word; pandoc -- more; } ```