Communicate: Rmd -> Quarto (#1107)

* Rename file: rmarkdown to quarto

* Rmd -> quarto conversion

* Fix typos, cross-refs, knitr opts_chunk

* Fix titles + add status
This commit is contained in:
Mine Cetinkaya-Rundel
2022-10-21 18:12:48 -04:00
committed by GitHub
parent 9730eebbfd
commit c5b7cda1bd
30 changed files with 768 additions and 614 deletions

1
quarto/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/.quarto/

2
quarto/_quarto.yml Normal file
View File

@@ -0,0 +1,2 @@
project:
type: default

20
quarto/chunk-labels.qmd Normal file
View File

@@ -0,0 +1,20 @@
---
title: "Code chunks"
editor: visual
---
```{r}
#| label: setup
```
# Quarto
```{r}
#| label: cars
```
# Including plots
```{r}
#| label: pressure
```

42
quarto/dashboard.Rmd Normal file
View File

@@ -0,0 +1,42 @@
---
title: "Diamonds distribution dashboard"
output: flexdashboard::flex_dashboard
---
```{r setup, include = FALSE}
library(ggplot2)
library(dplyr)
knitr::opts_chunk$set(fig.width = 5, fig.asp = 1/3)
```
## Column 1
### Carat
```{r}
ggplot(diamonds, aes(carat)) + geom_histogram(binwidth = 0.1)
```
### Cut
```{r}
ggplot(diamonds, aes(cut)) + geom_bar()
```
### Colour
```{r}
ggplot(diamonds, aes(color)) + geom_bar()
```
## Column 2
### The largest diamonds
```{r}
diamonds |>
arrange(desc(carat)) |>
head(100) |>
select(carat, cut, color, price) |>
DT::datatable()
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

28
quarto/diamond-sizes.qmd Normal file
View File

@@ -0,0 +1,28 @@
---
title: "Diamond sizes"
date: 2022-09-12
format: html
---
```{r}
#| label: setup
#| include: false
library(tidyverse)
smaller <- diamonds |>
filter(carat <= 2.5)
```
We have data about `r nrow(diamonds)` diamonds.
Only `r nrow(diamonds) - nrow(smaller)` are larger than 2.5 carats.
The distribution of the remainder is shown below:
```{r}
#| label: plot-smaller-diamonds
#| echo: false
smaller |>
ggplot(aes(carat)) +
geom_freqpoly(binwidth = 0.01)
```

10
quarto/example-site.yml Normal file
View File

@@ -0,0 +1,10 @@
name: "my-website"
navbar:
title: "My Website"
left:
- text: "Home"
href: index.html
- text: "Viridis Colors"
href: 1-example.html
- text: "Terrain Colors"
href: 3-inline.html

24
quarto/fuel-economy.qmd Normal file
View File

@@ -0,0 +1,24 @@
---
output: html_document
params:
my_class: "suv"
---
```{r}
#| label: setup
#| include: false
library(tidyverse)
class <- mpg |> filter(class == params$my_class)
```
# Fuel economy for `r params$my_class`s
```{r}
#| message: false
ggplot(class, aes(displ, hwy)) +
geom_point() +
geom_smooth(se = FALSE)
```

43
quarto/markdown.qmd Normal file
View File

@@ -0,0 +1,43 @@
## Text formatting
*italic* **bold** [underline]{.underline} ~~strikeout~~ [small caps]{.smallcaps} `code` superscript^2^ and subscript~2~
## Headings
# 1st Level Header
## 2nd Level Header
### 3rd Level Header
## Lists
- Bulleted list item 1
- Item 2
- Item 2a
- Item 2b
1. Numbered list item 1
2. Item 2.
The numbers are incremented automatically in the output.
## Links and images
<http://example.com>
[linked phrase](http://example.com)
![optional caption text](quarto.png){fig-alt="Quarto logo and the word quarto spelled in small case letters"}
## Tables
| First Header | Second Header |
|--------------|---------------|
| Content Cell | Content Cell |
| Content Cell | Content Cell |
/

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

23
quarto/quarto.Rproj Normal file
View File

@@ -0,0 +1,23 @@
Version: 1.0
RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default
EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8
RnwWeave: knitr
LaTeX: XeLaTeX
AutoAppendNewline: Yes
StripTrailingWhitespace: Yes
UseNativePipeOperator: Yes
MarkdownWrap: Sentence
MarkdownCanonical: Yes
SpellingDictionary: en_US

BIN
quarto/quarto.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
quarto/screenshot-editing.key Executable file

Binary file not shown.