Hello Quarto


Tom Mock, Posit PBC

thomasmock.quarto.pub/r-pharma-quarto/

2022-11-09

What’s in a name?

R Markdown -> Quarto

Quarto is the next generation of R Markdown, and has been re-built from the ground up to support more languages and environments, as well as to take what we’ve learned from 10 years of R Markdown and weave it into a more complete, cohesive whole. - JJ Allaire

Quarto is focused on collaboration within and across data science languages (R, Python, Julia, JavaScript) as well as between scientists and non-technical domain experts via the Visual Editor and common output formats.

What is Quarto?

Quarto® is an open-source scientific and technical publishing system built on Pandoc

  • quarto is a language agnostic command line interface (CLI)
thomasmock$ quarto --help
Usage:   quarto
Version: 1.2.262

Commands:
  render  [input] [args...] - Render input file(s) to various document types.            
  preview [file] [args...]  - Render and preview a document or website project.          
  publish [provider] [path] - Publish a document or project.

RMarkdown for literate programming

Quarto for literate programming

Quarto, unified document layout

quarto render boston-terrier.qmd --to html
quarto render boston-terrier.qmd --to pdf

A screenshot of a HTML article about Boston Terriers, the document has an image in the right hard margin, a floating table of contents, and different sections split up by headers

HTML

A screenshot of a PDF article about Boston Terriers, the document has an image in the right hard margin, a floating table of contents, and different sections split up by headers

PDF

A .qmd is a plain text file

Metadata (YAML)

format: html
engine: knitr
format: html
engine: jupyter

Code

```{r}
library(dplyr)
mtcars |> 
  group_by(cyl) |> 
  summarize(mean = mean(mpg))
```
```{python}
from siuba import *
(mtcars
  >> group_by(_.cyl)
  >> summarize(avg_mpg = _.mpg.mean()))
```

Text

# Heading 1
This is a sentence with some **bold text**, some *italic text* and an 
![image](image.png){fig-alt="Alt text for this image"}.

One install, “Batteries included”

  • Quarto is bundled and comes pre-installed with RStudio v2022.07.1 and beyond!

RStudio 2022.07.1+554 'Spotted Wakerobin', July 25th, 2022 New: Update Quarto to 1.0.36

Feature R Markdown Quarto
Cross References
Websites & Blogs
Books
Interactivity Shiny Documents Quarto Interactive Documents
Paged HTML pagedown Coming Soon!
Journal Articles rticles Summer 2022
Dashboards flexdashboard Coming Soon!

Comfort of your own workspace

A screenshot of a Quarto document rendered inside RStudio

An R Markdown document opened in the R Studio Visual Editor. There is a cursor on at the end of the text '@R-htm', which is in brackets and comes after the text 'htmltools'. There is a dropdown menu underneath this text with search results that all begin '@R-htm'. Each of the search results has a title of the form '@R-htm' in bold, an icon to the left, the title of the cited reference underneath it in gray, and the citation in gray to the right.

A screenshot of a Quarto document rendered inside JupyterLab

A screenshot of a Quarto document rendered inside VSCode

Quarto Projects + Freeze

Freeze is generally used when you have either a large number of collaborators or many computational documents created over a longer period of time.

execute:
  freeze: true  # never re-render during project render

execute:
  freeze: auto  # re-render only when source changes

Stores output of computation in a dedicated freeze folder as JSON.

Quarto resources

General Quarto