A Building the book from source

The complete source of the book is available online. To build the book:

  1. Install the latest version of R

    • If you are using RStudio, make sure that’s up-to-date as well
  2. Install the book dependencies.

    # Make sure you are using the latest version of `devtools`
    # Older versions do not work.
    devtools::install_github("csgillespie/efficientR")
  3. Clone the efficientR repository

  • See the chapter 9 on Efficient collaboration for an introduction to git and github.
  1. If you are using RStudio, open index.Rmd and click Knit.
    • Alternatively (for mainly Linux users) you can use the bundled Makefile

A.1 Package dependencies

The book uses datasets stored in the efficient GitHub package, which can be installed (after devtools has been installed) as follows:

# Installs package dependencies shown below
devtools::install_github("csgillespie/efficient",
                         args = "--with-keep.source")

The book depends on the following CRAN packages:

Name Title version
assertive.reflection Assertions for Checking the State of R (Cotton 2016a) 0.0.4
benchmarkme Crowd Sourced System Benchmarks (Gillespie 2019) 1.0.3
bookdown Authoring Books and Technical Documents with R Markdown (Xie 2020a) 0.18
cranlogs Download Logs from the ‘RStudio’ ‘CRAN’ Mirror (Csárdi 2019) 2.1.1
data.table Extension of data.frame (Dowle and Srinivasan 2019) 1.12.8
dbplyr A ‘dplyr’ Back End for Databases (H. Wickham and Ruiz 2020) 1.4.3
devtools Tools to Make Developing R Packages Easier (H. Wickham, Hester, and Chang 2020) 2.3.0
DiagrammeR Graph/Network Visualization (Iannone 2020) 1.0.5
dplyr A Grammar of Data Manipulation (H. Wickham, François, et al. 2020) 0.8.5
drat ‘Drat’ R Archive Template (Carl Boettiger et al. 2019) 0.1.5
efficient Becoming an Efficient R Programmer (Gillespie and Lovelace 2020) 0.1.3
feather R Bindings to the Feather ‘API’ (Wickham 2019) 0.3.5
formatR Format R Code Automatically (Xie 2019) 1.7
fortunes R Fortunes (Zeileis et al. 2016) 1.5.4
geosphere Spherical Trigonometry (Hijmans 2019) 1.5.10
ggmap Spatial Visualization with ggplot2 (Kahle, Wickham, and Jackson 2019) 3.0.0
ggplot2 Create Elegant Data Visualisations Using the Grammar of Graphics (H. Wickham, Chang, et al. 2020) 3.3.0
ggplot2movies Movies Data (H. Wickham 2015a) 0.0.1
knitr A General-Purpose Package for Dynamic Report Generation in R (Xie 2020b) 1.28
lubridate Make Dealing with Dates a Little Easier (Spinu, Grolemund, and Wickham 2020) 1.7.8
maps Draw Geographical Maps (Richard A. Becker, Ray Brownrigg. Enhancements by Thomas P Minka, and Deckmyn. 2018) 3.3.0
microbenchmark Accurate Timing Functions (Mersmann 2019) 1.4.7
profvis Interactive Visualizations for Profiling R Code (Chang, Luraschi, and Mastny 2019) 0.3.6
pryr Tools for Computing on the Language (H. Wickham 2018) 0.1.4
Rcpp Seamless R and C++ Integration (Eddelbuettel et al. 2020) 1.0.4.6
readr Read Rectangular Text Data (H. Wickham, Hester, and Francois 2018) 1.3.1
reticulate Interface to ‘Python’ (Ushey, Allaire, and Tang 2020) 1.15
rio A Swiss-Army Knife for Data I/O (Chan and Leeper 2018) 0.5.16
RSQLite ‘SQLite’ Interface for R (Müller et al. 2020) 2.2.0
swirl Learn R, in R (Kross et al. 2020) 2.4.5
tibble Simple Data Frames (Müller and Wickham 2020) 3.0.1
tidyr Tidy Messy Data (H. Wickham and Henry 2020) 1.0.2

References

Carl Boettiger, Dirk Eddelbuettel with contributions by, Neal Fultz, Sebastian Gibb, Colin Gillespie, Jan Górecki, Matt Jones, Thomas Leeper, Steven Pav, Jan Schulz, and Christoph Stepper. 2019. Drat: ’Drat’ R Archive Template. http://dirk.eddelbuettel.com/code/drat.html.

Chan, Chung-hong, and Thomas J. Leeper. 2018. Rio: A Swiss-Army Knife for Data I/O. https://CRAN.R-project.org/package=rio.

Chang, Winston, Javier Luraschi, and Timothy Mastny. 2019. Profvis: Interactive Visualizations for Profiling R Code. https://rstudio.github.io/profvis/.

Cotton, Richard. 2016a. Assertive.reflection: Assertions for Checking the State of R. https://CRAN.R-project.org/package=assertive.reflection.

Csárdi, Gábor. 2019. Cranlogs: Download Logs from the Rstudio ’Cran’ Mirror. https://CRAN.R-project.org/package=cranlogs.

Dowle, Matt, and Arun Srinivasan. 2019. Data.table: Extension of ‘Data.frame‘.

Eddelbuettel, Dirk, Romain Francois, JJ Allaire, Kevin Ushey, Qiang Kou, Nathan Russell, Douglas Bates, and John Chambers. 2020. Rcpp: Seamless R and C++ Integration.

Gillespie, Colin. 2019. Benchmarkme: Crowd Sourced System Benchmarks. https://github.com/csgillespie/benchmarkme.

Gillespie, Colin, and Robin Lovelace. 2020. Efficient: Becoming an Efficient R Programmer.

Hijmans, Robert J. 2019. Geosphere: Spherical Trigonometry. https://CRAN.R-project.org/package=geosphere.

Iannone, Richard. 2020. DiagrammeR: Graph/Network Visualization. https://github.com/rich-iannone/DiagrammeR.

Kahle, David, Hadley Wickham, and Scott Jackson. 2019. Ggmap: Spatial Visualization with Ggplot2. https://CRAN.R-project.org/package=ggmap.

Kross, Sean, Nick Carchedi, Bill Bauer, and Gina Grdina. 2020. Swirl: Learn R, in R. http://swirlstats.com.

Mersmann, Olaf. 2019. Microbenchmark: Accurate Timing Functions. https://CRAN.R-project.org/package=microbenchmark.

Müller, Kirill, and Hadley Wickham. 2020. Tibble: Simple Data Frames.

Müller, Kirill, Hadley Wickham, David A. James, and Seth Falcon. 2020. RSQLite: ’SQLite’ Interface for R.

Richard A. Becker, Original S code by, Allan R. Wilks. R version by Ray Brownrigg. Enhancements by Thomas P Minka, and Alex Deckmyn. 2018. Maps: Draw Geographical Maps. https://CRAN.R-project.org/package=maps.

Spinu, Vitalie, Garrett Grolemund, and Hadley Wickham. 2020. Lubridate: Make Dealing with Dates a Little Easier.

Ushey, Kevin, JJ Allaire, and Yuan Tang. 2020. Reticulate: Interface to ’Python’. https://github.com/rstudio/reticulate.

Wickham, Hadley. 2015a. Ggplot2movies: Movies Data. https://CRAN.R-project.org/package=ggplot2movies.

Wickham, Hadley. 2018. Pryr: Tools for Computing on the Language. https://CRAN.R-project.org/package=pryr.

Wickham, Hadley. 2019. Feather: R Bindings to the Feather ’Api’. https://CRAN.R-project.org/package=feather.

Wickham, Hadley, Winston Chang, Lionel Henry, Thomas Lin Pedersen, Kohske Takahashi, Claus Wilke, Kara Woo, Hiroaki Yutani, and Dewey Dunnington. 2020. Ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics. https://CRAN.R-project.org/package=ggplot2.

Wickham, Hadley, Romain François, Lionel Henry, and Kirill Müller. 2020. Dplyr: A Grammar of Data Manipulation.

Wickham, Hadley, and Lionel Henry. 2020. Tidyr: Tidy Messy Data.

Wickham, Hadley, Jim Hester, and Winston Chang. 2020. Devtools: Tools to Make Developing R Packages Easier.

Wickham, Hadley, Jim Hester, and Romain Francois. 2018. Readr: Read Rectangular Text Data. https://CRAN.R-project.org/package=readr.

Wickham, Hadley, and Edgar Ruiz. 2020. Dbplyr: A ’Dplyr’ Back End for Databases.

Xie, Yihui. 2019. FormatR: Format R Code Automatically. https://CRAN.R-project.org/package=formatR.

Xie, Yihui. 2020a. Bookdown: Authoring Books and Technical Documents with R Markdown. https://github.com/rstudio/bookdown.

Xie, Yihui. 2020b. Knitr: A General-Purpose Package for Dynamic Report Generation in R. https://yihui.org/knitr/.

Zeileis, Achim, the R community. Contributions (fortunes and/or code) by Torsten Hothorn, Peter Dalgaard, Uwe Ligges, Kevin Wright, Martin Maechler, Kjetil Brinchmann Halvorsen, et al. 2016. Fortunes: R Fortunes. https://CRAN.R-project.org/package=fortunes.