Quarto in 300 Seconds

Andrey Höglund

2026-06-29

Quarto is a software tool that . . .

  • Interactive reports
  • Computation inside the file!
  • Written in Markdown format
  • Inline code
  • Open-source

1. The Anatomy of a Quarto file

The Anatomy of a Quarto file

report_file.qmd
---
title: "Results!"
format: html
Author: "Andrey Höglund"
date: Today
---

# The results

The main results of the analysis were ...

```{r}
plot(1:10)
```

The Anatomy of a Quarto file

report_file.qmd
---
title: "Results!"
format: html
Author: "Andrey Höglund"
date: Today
---

# The results

The main results of the analysis were ...

```{r}
plot(1:10)
```


  • YAML header (file’s meta data)

The Anatomy of a Quarto file

report_file.qmd
---
title: "Results!"
format: html
Author: "Andrey Höglund"
date: Today
---

# The results

The main results of the analysis were ...

```{r}
plot(1:10)
```


  • YAML header (file’s meta data)
  • Markdown

The Anatomy of a Quarto file

report_file.qmd
---
title: "Results!"
format: html
Author: "Andrey Höglund"
date: Today
---

# The results

The main results of the analysis were ...

```{r}
plot(1:10)
```


  • YAML header (file’s meta data)
  • Markdown
  • code chunks

2. Running code inside a Quarto file

Running code inside a Quarto file

report_file.qmd

These code chucks will be executed with:

```{r}
# R
```

```{python}
# Python
```

```{julia}
# Julia
```

```{ojs}
# Observable
```

Running code inside a Quarto file

script.R
```{r}
# Air particle measurements in a vector
measurements <- c(10, 15, 20, 33, 50, 32, 49, 18, 30, 54, 23)
```

Quarto renders a file in the same manner as a jupyter notebook

Running code inside a Quarto file

script.R
```{r}
# Air particle measurements in a vector
measurements <- c(10, 15, 20, 33, 50, 32, 49, 18, 30, 54, 23)
length(measurements)
mean(measurements)
sum(measurements)
```
[1] 11

Quarto renders a file in the same manner as a jupyter notebook

Running code inside a Quarto file

script.R
```{r}
# Air particle measurements in a vector
measurements <- c(10, 15, 20, 33, 50, 32, 49, 18, 30, 54, 23)
length(measurements)
mean(measurements)
sum(measurements)
```
[1] 30.36364

Quarto renders a file in the same manner as a jupyter notebook

Running code inside a Quarto file

script.R
```{r}
# Air particle measurements in a vector
measurements <- c(10, 15, 20, 33, 50, 32, 49, 18, 30, 54, 23)
length(measurements)
mean(measurements)
sum(measurements)
```
[1] 334

Quarto renders a file in the same manner as a jupyter notebook

Running code inside a Quarto file

script.R

```{r}
# Air particle measurements in a vector
measurements <- c(10, 15, 20, 33, 50, 32, 49, 18, 30, 54, 23)
```

We collected `{r} length(measurements)` measurements.

The average was `{r} mean(measurements)`.

And the total sum was `{r} sum(measurements)`.

Inline code - do some calculation and present in the text

Running code inside a Quarto file

script.R

```{r}
# Air particle measurements in a vector
measurements <- c(10, 15, 20, 33, 50, 32, 49, 18, 30, 54, 23)
```

We collected `{r} length(measurements)` measurements.

The average was `{r} mean(measurements)`.

And the total sum was `{r} sum(measurements)`.

We collected 11 measurements.

The average was 30.3636364.

And the total sum was 334.

Inline code - do some calculation and present in the text

Running code inside a Quarto file

script.R

```{r}
# Air particle measurements in a vector
measurements <- c(10, 15, 20, 33, 50, 32, 49, 18, 30, 54, 23, 20, 54, 43, 23, 1, 3, 8, 83, 58, 58, 39)
```

We collected `{r} length(measurements)` measurements.

The average was `{r} mean(measurements)`.

And the total sum was `{r} sum(measurements)`.

Inline code - do some calculation and present in the text

Running code inside a Quarto file

script.R

```{r}
# Air particle measurements in a vector
measurements <- c(10, 15, 20, 33, 50, 32, 49, 18, 30, 54, 23, 20, 54, 43, 23, 1, 3, 8, 83, 58, 58, 39)
```

We collected `{r} length(measurements)` measurements.

The average was `{r} mean(measurements)`.

And the total sum was `{r} sum(measurements)`.

We collected 22 measurements.

The average was 32.9090909.

And the total sum was 724.

Inline code - do some calculation and present in the text

3. Version control - Git

Version control - Git

Version control is not track changes

Version control - Git

Since a Quarto file is plain text we can track all changes with version control

Conclusion

  • Webpages
  • Reports
  • Presentations (like this one)
  • Articles
  • Your kappa?!