-
Notifications
You must be signed in to change notification settings - Fork 17
/
index.Rmd
217 lines (155 loc) · 7.38 KB
/
index.Rmd
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
---
title: "Glossary<br><a href='https://zenodo.org/badge/latestdoi/176944576'><img src='https://zenodo.org/badge/176944576.svg' alt='DOI:10.5281/zenodo.6619215'></a>"
author: "psyTeachR Team"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
documentclass: book
classoption: oneside # for PDFs
geometry: margin=1in # for PDFs
bibliography: [book.bib, packages.bib]
csl: include/apa.csl
link-citations: yes
description: |
Definitions of technical terms
url: https://psyteachr.github.io/glossary
github-repo: psyteachr/glossary
cover-image: images/logos/logo.png
apple-touch-icon: images/logos/apple-touch-icon.png
apple-touch-icon-size: 180
favicon: images/logos/favicon.ico
---
```{r cite-packages, include = FALSE}
# automatically create a bib database for R packages
# add any packages you want to cite here
knitr::write_bib(c(
.packages(), 'bookdown', 'tidyverse'
), 'packages.bib')
#library(glossary)
source("R/glossary_functions.R")
```
# Overview {-}
The glossary defines common jargon you might encounter while learning R. This specialised vocabulary can help you to communicate more efficiently about coding and statistics and to search for solutions to problems.
The glossary was developed to link to the [PsyTeachR books](https://psyteachr.github.io/){target="_blank"}, but you can link to it from any resource. Suggest additions or changes at the [github issues page](https://github.com/PsyTeachR/glossary/issues){target="_blank"}.
## Cite
Contents are made available under a CC-BY-SA license. To cite:
```{r, results='asis', echo = FALSE}
cite <- citation(package = "glossary")
print(cite, style = "text")
```
```{r, echo = FALSE, eval = FALSE}
contrib <- jsonlite::read_json("https://api.github.com/repos/psyTeachR/glossary/contributors") |>
sapply(`[[`, "login")
issues <- jsonlite::read_json("https://api.github.com/repos/psyTeachR/glossary/issues?per_page=100") |>
lapply(`[[`, "user") |>
sapply(`[[`, "login")
gh_contrib <- c(contrib, issues) |> unique() |> sort()
dput(gh_contrib)
```
```{r, echo = FALSE, results='asis'}
gh_contrib <- c("AnnaWysocki" = "Anna Wysocki",
"ASarafoglou" = "Alexandra Sarafoglou",
"BartlettJE" = "James Bartlett",
#"dalejbarr" = "Dale Barr",
#"debruine" = "Lisa DeBruine",
"EvaRubinova" = "Eva Rubinova",
"franzenr" = "Rose Franzen",
"JackEdTaylor" = "Jack Taylor",
"JeffreyRStevens" = "Jeffrey R Stevens",
"jhrudey" = "Jessica Hrudey",
"JulianeKloidt" = "Juliane Kloidt",
"nbdutra" = "Natalia Dutra",
"nthun" = "Tamás Nagy",
"philmcaleer" = "Phil McAleer",
"RobbyTi" = "Robert Thibault",
"SCgeeker" = "Su-Chin Chen")
ct <- glue::glue("[{gh_contrib}](https://github.com/PsyTeachR/glossary/issues?q=author:{names(gh_contrib)})") |>
paste0(sep = ", ")
cat("Thanks to the [glossary hackathon](https://docs.google.com/document/d/1FOohcEbWTAXB7OWSvMZzwMI3F--pNNRT3_3DSB6KeB8/edit) contributors: ", ct, ".")
```
## Offline Access
You can download the glossary for offline access (although we update it frequently).
``` r
# install.packages("devtools")
devtools::install_github("psyteachr/glossary")
glossary::open_glossary() # open a local copy
```
## Using the glossary
```{r, include = FALSE}
reset_glossary()
```
You can use the glossary in your own R Markdown resources. The main function is `glossary()`. It has several arguments for controlling the display.
* term: The glossary term to link to, can contain spaces
```{verbatim, lang="md"}
The first `r glossary("argument")` is `term`.
```
The first `r glossary("argument")` is `term`.
* display: The display (if different than the term)
```{verbatim, lang="md"}
The `r glossary("dependent variable", "DV")` here is score.
```
The `r glossary("dependent variable", "DV")` here is score.
* def: The short definition to display on hover and in the glossary table; if NULL, this will be looked up from https://psyteachr.github.io/glossary/; if "", there will be no tooltip on hover
```{verbatim, lang="md"}
Here, we see a `r glossary("thingamabob", def = "Nobody knows what this is")`.
```
Here, we see a `r glossary("thingamabob", def = "Nobody knows what this is")`.
* link: whether to include a link to the glossary when clicked
```{verbatim, lang="md"}
Numbers are `r glossary("numeric", link = FALSE)`.
```
Numbers are `r glossary("numeric", link = FALSE)`.
* show_def: whether to show the definition in text (instead of on hover)
```{verbatim, lang="md"}
The `show_def` argument is `r glossary("logical", show_def = TRUE)`.
YAML: `r glossary("YAML", show_def = TRUE, link = FALSE)`
```
The `show_def` argument is `r glossary("logical", show_def = TRUE)`
YAML: `r glossary("YAML", show_def = TRUE, link = FALSE)`
* add_to_table: whether to add to the table created by glossary_table()
```{verbatim, lang="md"}
PsyTeachR books use the `r glossary("tidyverse", add_to_table = FALSE)`.
```
PsyTeachR books use the `r glossary("tidyverse", add_to_table = FALSE)`.
You can display a table of all previously defined words (except those exempted with `add_to_table = FALSE`) with the function `glossary_table()`.
```{r}
glossary_table()
```
Reset the glossary table between sections with `reset_glossary()`.
```{r}
reset_glossary()
```
# Symbols
| Symbol | psyTeachR Term | Also Known As |
|:------:|:------------------|:------------------|
| () | (round) brackets | parentheses |
| [] | square brackets | brackets |
| {} | curly brackets | squiggly brackets |
| <> | chevrons | angled brackets / guillemets |
| < | less than | |
| > | greater than | |
| & | ampersand | "and" symbol |
| # | hash | pound / octothorpe|
| / | slash | forward slash |
| \\ | backslash | |
| - | dash | hyphen / minus |
| _ | underscore | |
| * | asterisk | star |
| ^ | caret | power symbol |
| ~ | tilde | twiddle / squiggle|
| = | equal sign | |
| == | double equal sign | |
| . | full stop | period / point |
| ! | exclamation mark | bang / not |
| ? | question mark | |
| ' | single quote | quote / apostrophe|
| " | double quote | quote |
| %>% | pipe | magrittr pipe |
| \| | vertical bar | pipe |
| , | comma | |
| ; | semi-colon | |
| : | colon | |
| @ | "at" symbol | [various hilarious regional terms](https://www.theguardian.com/notesandqueries/query/0,5753,-1773,00.html){target="_blank"} |
| ... | [ellipsis](e.html#ellipsis)| dots |
```{r img-soundimals-hash, echo=FALSE, fig.cap="[Image by James Chapman/Soundimals](https://soundimals.tumblr.com/post/167354564886/chapmangamo-the-symbol-has-too-many-names){target='_blank'}"}
knitr::include_graphics("images/soundimals_hash.png")
```