Quarto - open-source publishing system designed for creating dynamic, reproducible documents, including reports, presentations, and websites.
It supports multiple formats like HTML, PDF, Word, and slides.
Why Use Quarto?
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
---
# Introduction
This is an example.
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
---
# Introduction
This is an example.
To generate an HTML file, specify format: html
in the YAML header.
Use quarto render
in R to generate the output.
Enabling TOC:
Add toc: true
in the YAML header to automatically generate a table of contents.
Control depth with toc-depth
(e.g., 2 for two levels of headings).
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
toc: true
---
# Introduction
This is an example.
toc-title: "Contents".
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
toc: true
toc-title: "Contents"
---
# Introduction
This is an example.
You can easily add inline equations in the following way
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
toc: true
toc-title: "Contents"
---
# Introduction
This is an example.
This is an equation: $E=mc^{2}$
You can easily add inline equations in the following way
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
toc: true
toc-title: "Contents"
---
# Introduction
This is an example.
This is an equation: $E=mc^{2}$
This is also an equation:
$$E=mc^{2}$$
You can easily add inline equations in the following way
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
toc: true
toc-title: "Contents"
---
# Introduction
This is an example.
This is an equation: $E=mc^{2}$
This is also an equation:
$$E=mc^{2}$$
For more advanced equations, check: https://qmd4sci.njtierney.com/math
This is how we include code in our documents.
This is how we include code in our documents.
This is how we only include code output in our documents.
This is how we only include code without output in our documents.
Many times you might have seen annoying library messages:
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
toc: true
toc-title: "Contents"
---
# Introduction
This is an example.
This is an equation: $E=mc^{2}$
This is also an equation:
$$E=mc^{2}$$
```{r echo=TRUE, eval=FALSE}
summary(mtcars)
```
```{r}
library(dplyr)
```
To avoid them in printing, you should do:
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
toc: true
toc-title: "Contents"
---
# Introduction
This is an example.
This is an equation: $E=mc^{2}$
This is also an equation:
$$E=mc^{2}$$
```{r echo=TRUE, eval=FALSE}
summary(mtcars)
```
```{r warning=FALSE, message=FALSE}
library(dplyr)
```
What is Self-Contained HTML?:
An HTML document that includes all dependencies (images, CSS, JavaScript) within a single file.
Why Use It?
Easy to share and view without requiring external resources.
This means that you will only see an html document being produced.
This a complicated document (with formulae, graphs) without resource-embedding.
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
toc: true
toc-title: "Contents"
---
# Introduction
This is an example.
This is an equation: $E=mc^{2}$
This is also an equation:
$$E=mc^{2}$$
```{r echo=TRUE, eval=FALSE}
summary(mtcars)
```
```{r}
library(dplyr)
```
This a complicated document (with formulae, graphs) with resource-embedding.
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
toc: true
toc-title: "Contents"
embed-resources: true
---
# Introduction
This is an example.
This is an equation: $E=mc^{2}$
This is also an equation:
$$E=mc^{2}$$
```{r echo=TRUE, eval=FALSE}
summary(mtcars)
```
```{r}
library(dplyr)
```
This is how we format text within our document.
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
toc: true
toc-title: "Contents"
---
# Introduction
```{r echo=TRUE, eval=FALSE}
summary(mtcars)
```
*This is italic text.*
**This is bold text.**
***This is bold and italic.***
This is reference to a `qmd` document.
This is how we add headings and subheadings.
This is how we can automatically number the headers.
This is how we can remove some headers from being numbered.
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
toc: true
toc-title: "Contents"
number-sections: true
---
# Introduction
```{r echo=TRUE, eval=FALSE}
summary(mtcars)
```
The following are headers:
# Header
## Subheader {.unnumbered}
### Sub-subheader {.unnumbered}
This is how we can remove some headers from being numbered and from the Table of Contents
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
toc: true
toc-title: "Contents"
number-sections: true
---
# Introduction
```{r echo=TRUE, eval=FALSE}
summary(mtcars)
```
The following are headers:
# Header
## Subheader {.unnumbered .unlisted}
### Sub-subheader {.unnumbered .unlisted}
This is how we add links.
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
toc: true
toc-title: "Contents"
---
# Introduction
This is how we can include links:
<https://quarto.org>
Another way is: [Quarto](https://quarto.org)
This is how we add pictures.
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
toc: true
toc-title: "Contents"
---
# Introduction
This is how we can include pictures:
![](figures/elephant.png){width="50%"}
This is how we add lists.
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
toc: true
toc-title: "Contents"
---
# Introduction
* unordered list
+ sub-item 1
+ sub-item 2
- sub-sub-item 1
1. ordered list
2. item 2
i) sub-item 1
A. sub-sub-item 1
This is how we add tables.
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
toc: true
toc-title: "Contents"
---
# Introduction
This is a table.
| Right | Left | Default | Center |
|------:|:-----|---------|:------:|
| 12 | 12 | 12 | 12 |
| 123 | 123 | 123 | 123 |
| 1 | 1 | 1 | 1 |
Quarto has native support for embedding Mermaid and Graphviz diagrams.
This enables you to create flowcharts, sequence diagrams, state diagrams.
---
title: "Statistical Analysis Report"
author: "Your Name"
date: "2024-11-05"
format: html
toc: true
toc-title: "Contents"
---
# Introduction
This is a diagram.
```{mermaid}
%%| echo: fenced
flowchart LR
A[Hard edge] --> B(Round edge)
B --> C{Decision}
C --> D[Result one]
C --> E[Result two]
```
You can include videos in documents using the {{< video >}}
shortcode. For example, here we embed a YouTube video:
Videos can refer to video files (e.g. MPEG) or can be links to videos published on YouTube, Vimeo, or Brightcove.
:::{.callout-note}
Note that there are five types of callouts, including:
`note`, `tip`, `warning`, `caution`, and `important`.
:::
Note
Note that there are five types of callouts, including note
, tip
, warning
, caution
, and important
.
In order to create Word docs you will need to install:
In order to create Word docs you will need to install:
In order to create Word docs you will need to install: