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, but you can link to it from any resource. Suggest additions or changes at the github issues page.
0.1 Cite
Contents are made available under a CC-BY-SA license. To cite:
DeBruine L (2023). glossary: Glossaries for Markdown and Quarto Documents. R package version 1.0.0, https://CRAN.R-project.org/package=glossary.
Thanks to the glossary hackathon contributors: Anna Wysocki, Alexandra Sarafoglou, James Bartlett, Eva Rubinova, Rose Franzen, Jack Taylor, Jeffrey R Stevens, Jessica Hrudey, Juliane Kloidt, Natalia Dutra, Tamás Nagy, Phil McAleer, Robert Thibault, Su-Chin Chen, .
0.2 Offline Access
You can download the glossary for offline access (although we update it frequently).
# install.packages("devtools")
devtools::install_github("psyteachr/glossary")
glossary::open_glossary() # open a local copy
0.3 Using the 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
The first argument is
term
. -
display: The display (if different than the term)
The 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
Here, we see a thingamabob.
-
link: whether to include a link to the glossary when clicked
Numbers are numeric.
-
show_def: whether to show the definition in text (instead of on hover)
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 logical (A data type representing TRUE or FALSE values.)YAML: A structured format for information
-
add_to_table: whether to add to the table created by glossary_table()
PsyTeachR books use the tidyverse.
You can display a table of all previously defined words (except those exempted with add_to_table = FALSE
) with the function glossary_table()
.
glossary_table()
term | definition |
---|---|
argument|A variable that provides input to a function. | |
dependent variable|The target variable that is bein | |
logical|A data type representing TRUE or FALSE values. | |
numeric|A data type representing a real decimal number or inte | |
thingamabob|Nobody knows what this is | |
yaml|A structured format for information |
Reset the glossary table between sections with reset_glossary()
.
reset_glossary()