An introduction to Quarto
BIO 8940
2026-01-19
Credit: Ignasi Bartomeus, PhD
R, Python, etcmulti-language, next generation version of R Markdown
include many new new features and capabilities
Like R Markdown, Quarto uses knitr to execute R code, and is therefore able to render most existing Rmd files without modification.


| header A | header B | header C |
|---|---|---|
| left | center | right |
A bit of a hassle…
Wait for next section to learn how to generate tables from R
https://rstudio.com/wp-content/uploads/2015/03/rmarkdown-reference.pdf
R codeRmd (R markdown) and qmd (quarto) differ:
echo = FALSE or #| echo: false hides code.eval = FALSE or #| eval: false prevents code from being runmessage = FALSE or #| meassage: falseprevents messages from appearing in outputRepeating chunk options can be painful
If you have echo = FALSE in every single chunk, how to set the default chunk option to echo = FALSE ?
Use knitr::opts_chunk$set(echo = FALSE)
You may overwrite the default for each chunk
For chunk options, check out https://yihui.name/knitr/options/
| speed | dist |
|---|---|
| 4 | 2 |
| 4 | 10 |
| 7 | 4 |
| 7 | 22 |
kable package is often used with the kableExtra packagegt using similar approach to table that ggplot has to figureshttps://rstudio.com/wp-content/uploads/2015/03/rmarkdown-reference.pdf
Contains the metadata of the document
Starts and ends by three dashes
Comes first in the document
Rmd
In HTML output, you can use theme or a custom .css style sheet
theme options (bootswatch.com) : “cerulean”, “journal”, “flatly”, “darkly”, “readable”, “spacelab”, “united”, “cosmo”, “lumen”, “paper”, “sandstone”, “simplex”, “yeti”
You may also use LaTeX templates with R Markdown, and write reproducible scientific paper
qmd
this is were Quarto is leaps beyong R markdown
excellent doc on the website
betterbibtex extension for dynamic file)Blah blah [@Shea2014; @xie2015].
Blah blah (Shea and Boldt 2014, Xie 2015).
Blah blah @Shea2014; @xie2015.
@Shea2014 says blah.
Blah blah [see @Shea2014, pp. 33-35; also @xie2015, ch. 1].
Blah blah (Shea and Boldt 2014, Xie 2015).
Shea and Boldt (2014) says blah.
Blah blah (see Shea and Boldt 2014 pp. 33–35, also Xie 2015, ch. 1).
For an easy way to insert citations, try the citr RStudio add-in.
If you are using Zotero, then RStudio can link directly for both Rmd and qmd files (same for VScode)
In Rstudio, Rmarkdown file = notebook
Meaning that R output:
If you don’t like the notebook and want the console, add to YAML header
editor_options:
chunk_output_type: console
https://rstudio.com/wp-content/uploads/2015/03/rmarkdown-reference.pdf
Most of what works for R markdown works for Quarto

BIO 8940