Scientific workflows: Tools and Tips 🛠️
2023-05-11
📅 Every 3rd Thursday 🕓 4-5 p.m. 📍 Webex
Quarto is an open-source scientific and technical publishing system
Basic idea: Create documents with dynamic content and text
Examples of document types that can be created with Quarto:
Quarto is a huge topic and there are so many possibilities!
Different options, depending on your workflow:
install.packages("quarto"))Check out the Quarto website for download and tutorials for all options.
“Artwork from”Hello, Quarto” keynote by Julia Lowndes and Mine Çetinkaya-Rundel, presented at RStudio Conference 2022. Illustrated by Allison Horst.”
An HTML example
.qmd documentQuartoMarkdown is a simple markup language to create formatted text, you can e.g.
Make italic text with *text* or bold text with **text**
Generate headers of different levels
You can also do more complex things like:
Inline code starts and ends with 1 backtick
`{r} `
Example
Rendered output
The mean of the values 1, 2 and 3 is 2.
Code chunks starts and ends with 3 backticks
```{r}
library(ggplot2)
ggplot(penguins, aes(flipper_len, body_mass)) +
geom_point() +
geom_smooth(method = "lm")
```Run code chunk
Code chunk have special comments that start with #| and that control the behaviour of the chunk.
```{r}
#| label: fig-penguins
#| fig-cap: Temperature and ozone level.
#| echo: false
library(ggplot2)
ggplot(penguins, aes(flipper_len, body_mass)) +
geom_point() +
geom_smooth(method = "lm")
```label: Figure and chunk label that can be referred to in textfig-cap: Figure captionecho: Include the output (i.e. the plot) in the document but don’t show the codeFor document output formats
or other formats like pdf, docx, revealjs, powerpoint, …
For document options
---
title: "My first document"
author: "Selina Baldauf"
date: today
format:
html:
number-sections: true
toc: true
toc-location: left
---Execute options
---
title: "My first document"
author: "Selina Baldauf"
date: today
format: html
execute:
message: false
warning: false
---Many different options:
Ctrl/Cmd + Shift + K)quarto render my_document.qmdquarto package: quarto::quarto_render("my_document.qmd")What happens during rendering?
Artwork from “Hello, Quarto” keynote by Julia Lowndes and Mine Çetinkaya-Rundel,presented at RStudio Conference 2022. Illustrated by Allison Horst.
You can also define parameters to be used in your document
R (knitr engine): Add parameters to the YAML header
Use params$species to access.
Render your document with different parameter inputs:
In R:
In the console:
Benefits
“Artwork from”Hello, Quarto” keynote by Julia Lowndes and Mine Çetinkaya-Rundel, presented at RStudio Conference 2022. Illustrated by Allison Horst.”
📅 20th November 🕓 4-5 p.m. 📍 Webex
🔔 Subscribe to the mailing list
📧 For topic suggestions and/or feedback send me an email