2023-10-31
Quarto® is an open-source scientific and technical publishing system built on Pandoc.
Quarto is the next-generation of RMarkdown, which is a platform that allows users to combine plain text and code in a single document and output to a variety of sources.
This means we can weave together narrative text and code to produce elegantly formatted output as documents, web pages, blog posts, books and more.
Collaboration with other colleagues in other languages - shared format, choose your editor and your native language
No more copy-paste, no more manually rebuilding analyses from disparate components, no more dread when the data is updated and you need to run an analysis.
Source
Output
Source
Output
---
title: "ggplot2 demo"
author: "Norah Jones"
date: "5/22/2021"
format:
html:
fig-width: 8
fig-height: 4
code-fold: true
---
## Air Quality
@fig-airquality further explores the impact of temperature
on ozone level.
```{r}
#| label: fig-airquality
#| fig-cap: Temperature and ozone level.
#| warning: false
library(ggplot2)
ggplot(airquality, aes(Temp, Ozone)) +
geom_point() +
geom_smooth(method = "loess"
)
```
We will be using RStudio. But this also works with Jupyter notebooks (python users), among other platforms.
A Quarto document i.e. a
.qmd
is a plain text file, like a.rmd
, that can be rendered to many different formats
---
title: "ggplot2 demo"
author: "Norah Jones"
date: "5/22/2021"
format:
html:
code-fold: true
embed-resources: true
---
The title of the document; title: “ggplot2 demo”
Who wrote it: author: “Norah Jones”
Date: “5/22/2021”
The output type: html_document
Option to display code; code-fold: true
Option to bundle all files into a single .html
file; embed-resources: true
Source: Code chunks
Now that we have a report with a header and some code, we need to explain what the code is doing and why.
This is where the plain text comes in.
Outside of a code chunk, type anything you want. You can even include pictures and tables.
We can also Cross Reference.
Markdown Syntax | Output |
---|---|
|
italics and bold |
|
superscript2 / subscript2 |
|
|
|
verbatim code |
Source: Getting Started with Quarto
Markdown Syntax | Output |
---|---|
|
Header 1 |
|
Header 2 |
|
Header 3 |
|
Header 4 |
|
Header 5 |
|
Header 6 |
Source: Getting Started with Quarto
Inside your text you can include executable code with the syntax:
For example:
There are 344 rows in the penguins data set.
Save your report and…
Look at your console while it renders: