An introduction to reproducible research and reports
Nicola Rennie
Consultancy
Training
R Community
Quarto is an open-source scientific and technical publishing system that allows you to combine text, images, code, plots, and tables in a fully-reproducible document. Quarto has support for multiple languages including R, Python, Julia, and Observable. It also works for a range of output formats such as PDFs, HTML documents, websites, presentations,…
That sounds a bit like R Markdown!
R Markdown isn’t going anywhere but…
Quarto has better multi-language support
More user-friendly
Better control of the output layouts
Within RStudio IDE: click Render (or Ctrl+Shift+K)
YAML header
Content
Text, links, images
Code, tables, plots
Equations, references
Documents: HTML, PDF, MS Word, Markdown
Presentations: Revealjs, PowerPoint, Beamer
Websites
Books
…
Code visibility options:
Figure options:
Output location:
Highlight code:
We can also include code inline, rather than as a separate chunk.
The total number of lemurs is `r sum(lemurs$n)`
.
The total number of lemurs is 21859.
Templates: github.com/quarto-journals
---
title: "A very cool title"
format: html
---
\begin{equation}
\hat{e}_i = Y_i - \hat{Y}_i
\end{equation}
\[\begin{equation} \hat{e}_i = Y_i - \hat{Y}_i \end{equation}\]
::: .columns
::: {.column width = "60%"}
The content for the first column goes here.
:::
::: {.column width = "40%"}
The content for the second column goes here.
:::
:::
```{dot}
graph G {
qmd -- Knitr;
qmd -- Jupyter;
Knitr -- md;
Jupyter -- md;
md -- pandoc;
pandoc -- HTML;
pandoc -- PDF;
pandoc -- Word;
pandoc -- more;
}
```
Oxford R User Group