-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappendix-c-conventions.qmd
84 lines (60 loc) · 2.09 KB
/
appendix-c-conventions.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Conventions
This book will use the following conventions:
* Generic code: `list(number = 1, letter = "A")`
* Highlighted code: `r hl(dplyr::slice_max())`
* File paths: `r path("data/sales.csv")`
* R Packages: <pkg>tidyverse</pkg> <pkg></pkg>
* Functions: `r hl(paste())`
* Strings: `r hl("psyTeachR")`
* Numbers: `r hl(100)`, `r hl(3.14)`
* Logical values: `r hl(TRUE)`, `r hl(FALSE)`
* Glossary items: `r glossary("ordinal")`
* Citations: @R-tidyverse
* Internal links: Chapter\ \@ref(intro)
* External links: [R for Data Science](https://r4ds.had.co.nz/){target="_blank"}
* Menu/interface options: **`New File...`**
* Quiz question: I am going to learn a lot: `r torf(TRUE)`
```{block, webex.hide="Hidden Solutions"}
You found it!
```
::: {.callout-note}
These boxes have little interesting - but not critical - bits of information.
:::
::: {.callout-important}
These boxes warn you about something important in R / R Studio, so you pay attention when you use it.
:::
::: {.callout-warning}
These boxes highlight where you need to be cautious when using or interpreting something, as it might be easy to make an error.
:::
::: {.callout-tip collapse="true"}
#### Try this
These boxes will invite you to try something yourself, like complete independent activities or answer questions.
:::
::: {.callout-caution collapse="true"}
#### Solution
These boxes will include small hints or solutions to check your understanding
:::
Image example
```{r load-tidyverse, echo=FALSE}
#| label: fig-img-load-tidyverse
#| fig.cap: "Example loading message from tidyverse."
knitr::include_graphics("images/tidyverse-loading.png")
```
Multiple pane image example
::: {#fig-img layout-ncol=2}
![](images/Image1)
![](images/Image2)
Caption
:::
Pop out link
[http://rmarkdown.rstudio.com](http://rmarkdown.rstudio.com){target="_blank"}
Glossary
**`r glossary("normal distribution", display = "Normal Distribution", def = "Definition")`**
```{r}
# code chunks
paste("Applied", "Data", "Skills", 1, sep = " ")
```
```{r, eval=FALSE, verbatim='r setup, message = FALSE'}
# code chunks with visible r headers
library(tidyverse)
```