## How this book was made

This book was made using **R** (R Core Team 2018), and the **bookdown** package (Xie 2016), based on
Markdown syntax,
using **knitr** (Xie 2015).
Numerous other **R** packages were used, including:

- The diagrams were made in base
**R**, or using the**diagram**package (Soetaert 2017). - The
**kableExtra**package was used for nicer tables (Zhu 2018). - Interactive online maps (e.g., Sect. 2.7.1) use the
**leaflet**package (Cheng et al. 2018). - Some data tables in the online version are displayed using the
**DT**package (Xie et al. 2018). - Some plots use the
**plotrix**package (Lemon 2006). - The NHANES data is provided by the
**NHANES**package (Pruim 2015). - Some data are from the
**GLMsData**package (Dunn and Smyth 2017). - The
**viridis**package is used for some colour specifications (Garnier 2018) to make colours easier for those with colour-blindness to distinguish colours, and for better greyscale printing. - The
**webexercises**package was used to create the interactive web exercises (Barr and DeBruine 2021) (i.e., Quick Revision questions).

All of this software is *free* and open source.
Other resources used include:

- The online quizzes are embedded using H5P, iframes.
- Icons are from
**iconmonstr**, and are freely available. - The text folding (in the online version) was implemented by adapting advice from StackOverflow.,
- The polling in the online book is provided by Ferendum.
- The cover for the book was made using a free image with Canva.

### References

Barr D, DeBruine L. Webexercises: Create interactive web exercises in ’r markdown’ (formerly ’webex’) [Internet]. 2021. Available from: https://github.com/psyteachr/webexercises.

Cheng J, Karambelkar B, Xie Y. leaflet: Create interactive web maps with the JavaScript ’leaflet’ library [Internet]. 2018. Available from: https://CRAN.R-project.org/package = leaflet.

Dunn PK, Smyth GK. GLMsData: Generalized linear model data sets [Internet]. 2017. Available from: https://CRAN.R-project.org/package=GLMsData.

Garnier S. viridis: Default color maps from ’matplotlib’ [Internet]. 2018. Available from: https://CRAN.R-project.org/package=viridis.

Lemon J. plotrix: A package in the red light district of r. R-News. 2006;6(4):8–12.

Pruim R. NHANES: Data from the US National Health and Nutrition Examination Study [Internet]. 2015. Available from: https://CRAN.R-project.org/package=NHANES.

R Core Team. R: A language and environment for statistical computing [Internet]. Vienna, Austria: R Foundation for Statistical Computing; 2018. Available from: https://www.R-project.org/.

Soetaert K. Diagram: Functions for visualising simple graphs (networks), plotting flow diagrams [Internet]. 2017. Available from: https://CRAN.R-project.org/package=diagram.

Xie Y. Dynamic documents with R and knitr [Internet]. 2nd ed. Boca Raton, Florida: Chapman; Hall/CRC; 2015. Available from: https://yihui.name/knitr/.

Xie Y. Bookdown: Authoring books and technical documents with R markdown [Internet]. Boca Raton, Florida: Chapman; Hall/CRC; 2016. Available from: https://github.com/rstudio/bookdown.

Xie Y, Cheng J, Tan X. DT: A wrapper of the JavaScript library ’DataTables’ [Internet]. 2018. Available from: https://CRAN.R-project.org/package=DT.

Zhu H. kableExtra: Construct complex table with ’kable’ and pipe syntax [Internet]. 2018. Available from: https://CRAN.R-project.org/package=kableExtra.