How this book was made

This book was made using R (R Core Team 2018), and the bookdown package (Xie 2016), which is based on Markdown syntax, using knitr (Xie 2015).

Numerous other R packages were used too:

  • The diagrams were made in base R, or using the diagram package (Soetaert 2017).
  • The animations in the html version were made using the animation package (Xie 2013), and the stills for the PDF version captured by the webshot package (Chang 2018).
  • The gifski package was used to create animations in the online version (Ooms 2018).
  • The map in Exercise 5.2 (interactive in the online version) is made using the leaflet package (Cheng et al. 2018).
  • The kableExtra package was used for nicer tables (Zhu 2018).
  • The maps of Australia were generated using the oz package (Venables and Hornik 2016) and plotted using the ggplot2 package (Wickham 2016).
  • The display of some data tables in the online version use 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 scales package is used to rescale data (Wickham 2018).
  • The carousels in the online version (for example, Sect. 33.3) are made using the slickR package (Sidi 2018).
  • The dygraphs package (Vanderkam et al. 2018) is used to make interactive graphs (for example, Sect. 12.8.4) for the online version.
  • The plotly package (Sievert 2018) is used to make some interactive graphs (for example, in Sect. 12.2.3) for the online version.
  • The dplyr package is used in some data manipulations (Wickham et al. 2019).
  • The viridis package is used for some colour specifications (Garnier 2018) to make colours easier for those with colour-blindess to distinguish colours, and for better greyscale printing.
  • The webex package was used to create the interactive web exercises (Barr and DeBruine 2019).
  • The plotfunctions package was used to add images to existing plots (van Rij 2020)

All of this software is free and open source.

Other resources used include:

  • The quizzes are embedded using H5P iframes.
  • Icons are from iconmonstr and are freely available.
  • The images of the cards used in Sect. 15.2 are from https://code.google.com/archive/p/vector-playing-cards/, and are in the public domain.
  • The text folding (in the html version) was implemented by adapting advice from StackOverflow.
  • The images of dice used in, for example, Sect. 16.2, are from https://www.clipartkey.com/, and are free.
  • The cover for the book was made using a free image using Canva.
  • The images used in the online book are free (and used according to their guidelines), as listed in Appendix F.

References

Barr D, DeBruine L. webex: Create interactive web exercises in ’R Markdown’ [Internet]. 2019. Available from: https://CRAN.R-project.org/package=webex.
Chang W. webshot: Take screenshots of web pages [Internet]. 2018. Available from: https://CRAN.R-project.org/package=webshot.
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.
Ooms J. gifski: Highest quality GIF encoder [Internet]. 2018. Available from: https://CRAN.R-project.org/package=gifski.
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/.
Sidi J. slickR: Create interactive carousels with the JavaScript ’slick’ library [Internet]. 2018. Available from: https://CRAN.R-project.org/package=slickR.
Sievert C. Plotly for R [Internet]. 2018. Available from: https://plotly-r.com.
Soetaert K. Diagram: Functions for visualising simple graphs (networks), plotting flow diagrams [Internet]. 2017. Available from: https://CRAN.R-project.org/package=diagram.
van Rij J. Plotfunctions: Various functions to facilitate visualization of data and analysis [Internet]. 2020. Available from: https://CRAN.R-project.org/package=plotfunctions.
Vanderkam D, Allaire JJ, Owen J, Gromer D, Thieurmel B. Dygraphs: Interface to ’dygraphs’ interactive time series charting library [Internet]. 2018. Available from: https://CRAN.R-project.org/package=dygraphs.
Venables B, Hornik K. oz: Plot the australian coastline and states [Internet]. 2016. Available from: https://CRAN.R-project.org/package=oz.
Wickham H. ggplot2: Elegant graphics for data analysis [Internet]. Springer-Verlag New York; 2016. Available from: http://ggplot2.org.
Wickham H. scales: Scale functions for visualization [Internet]. 2018. Available from: https://CRAN.R-project.org/package=scales.
Wickham H, François R, Henry L, Müller K. dplyr: A grammar of data manipulation [Internet]. 2019. Available from: https://CRAN.R-project.org/package=dplyr.
Xie Y. animation: An R package for creating animations and demonstrating statistical methods. Journal of Statistical Software [Internet]. 2013;53(1):1–27. Available from: http://www.jstatsoft.org/v53/i01/.
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.