Dynamic & Reproducible reporting with Quarto
June 10, 2025
80’s idea from D. Knuth:
write code for humans, not for computer
One document to rule them all with both text & code
⇒ export to different formats:
source: Posit Quarto cheatsheet
Is most scientific research false ? Ioanidis et al.
have you had to redo a whole analysis with just slightly different data
(e.g. 1 patient added or removed ?)
French book on reproducible research:
Vers une recherche reproductible : faire évoluer ses pratiques, Desquilbet et al.
.qmd (“Quarto markdown”)markdown: lightweight structured text
qmd = (or Python, Julia, …) + markdown
Quarto + pandoc
⇒ output in many formats (.docx, .pdf, .html, etc…)
source: Quarto cheatsheet
Note
these materials have been prepared in Quarto
.qmd structure---
title: "SAVOR: Part II"
subtitle: "Dynamic & Reproducible reporting with Quarto"
author: "Boris Hejblum"
date: 06/10/2025
format: revealjs
---results (default: 'markup')
'asis' – passthrough results'hide' – do not display results'hold' – put all results below all codeeval – Run code in chunk (default: true)
echo – Display code in output document (default: true)
message – display code messages in document (default: true)
error – Display error messages in output document (true) or stop render when errors occur (default: false)
tidy – tidy code for display (default: false)warning – display code warnings in document (default: true)collapse – collapse all output into single block (default: false)highlight – highlight source code (default: true)include – include chunk in doc after running (default: true)comment – prefix for each line of results (default: ##)fig-align – figure postion: 'left' (default), 'right', or 'center'fig-cap – figure caption as character string (default is NULL)fig-cap-location – caption position: 'top' (default), 'bottom' or 'margin'fig-height, fig-width – Dimensions of plots in inchesLong running code chunks
cache – cache results for future knits (default: false)dependson – optional chunk dependencies for cachingchild – list offile(s) to knit and then include (default is NULL)engine – code language used in chunk (default in RStudio )*italic* — italic**bold** — bold~~no~~ — verbatim code^2^ — superscript2~2~ — subscript2$\alpha = \beta^2$ — LaTeX equations: \(\alpha = \beta^2\)# Header1 {#anchor}
## Header 2
Jump to [Header 1](#anchor)
A footnote [^1]
[^1]: Here is the footnote.

| Right | Left | Default | Center |
|------:|:-----|---------|:------:|
| 12 | 12 | 12 | 12 |
| 123 | 123 | 123 | 123 |
| 1 | 1 | 1 | 1 |
| Right | Left | Default | Center |
|---|---|---|---|
| 12 | 12 | 12 | 12 |
| 123 | 123 | 123 | 123 |
| 1 | 1 | 1 | 1 |
---
bibliography: refs.bib
csl: style.csl
---
Smith cited [@smith04].
Smith cited without author [-@smith04].
@smith04 cited in line.
Quarto documentation: comprehensive
.qmd practical👉 Your turn !
.qmd