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.3
benchmarkme Crowd Sourced System Benchmarks (Gillespie 2016) 0.3.0
bookdown Authoring Books and Technical Documents with R Markdown (Xie 2016a) 0.3
cranlogs Download Logs from the ‘RStudio’ ‘CRAN’ Mirror (Csardi 2015) 2.1.0
data.table Extension of Data.frame (Dowle et al. 2016) 1.9.8
devtools Tools to Make Developing R Packages Easier (H. Wickham and Chang 2016a) 1.12.0
DiagrammeR Create Graph Diagrams and Flowcharts Using R (Sveidqvist et al. 2016) 0.8.4
dplyr A Grammar of Data Manipulation (Wickham and Francois 2016) 0.5.0
drat Drat R Archive Template (Carl Boettiger et al. 2016) 0.1.2
efficient Becoming an Efficient R Programmer (Gillespie and Lovelace 2016) 0.1.1
feather R Bindings to the Feather ‘API’ (H. Wickham 2016a) 0.3.1
formatR Format R Code Automatically (Xie 2016b) 1.4
fortunes R Fortunes (Zeileis and R community 2016) 1.5.3
geosphere Spherical Trigonometry (Hijmans 2016) 1.5.5
ggmap Spatial Visualization with ggplot2 (Kahle and Wickham 2016) 2.6.1
ggplot2 Create Elegant Data Visualisations Using the Grammar of Graphics (H. Wickham and Chang 2016b) 2.2.0
ggplot2movies Movies Data (H. Wickham 2015a) 0.0.1
knitr A General-Purpose Package for Dynamic Report Generation in R (Xie 2016c) 1.15.1
lubridate Make Dealing with Dates a Little Easier (Grolemund, Spinu, and Wickham 2016) 1.6.0
microbenchmark Accurate Timing Functions (Mersmann 2015) 1.4.2.1
profvis Interactive Visualizations for Profiling R Code (Chang and Luraschi 2016) 0.3.2.9000
pryr Tools for Computing on the Language (H. Wickham 2015b) 0.1.2
Rcpp Seamless R and C++ Integration (Eddelbuettel et al. 2016) 0.12.8
readr Read Tabular Data (Wickham, Hester, and Francois 2016) 1.0.0
rio A Swiss-Army Knife for Data I/O (Chan and Leeper 2016) 0.4.16
RSQLite ‘SQLite’ Interface for R (Müller et al. 2016) 1.1
swirl Learn R, in R (Kross et al. 2016) 2.4.2
tibble Simple Data Frames (Wickham, Francois, and Müller 2016) 1.2
tidyr Easily Tidy Data with spread() and gather() Functions (H. Wickham 2016b) 0.6.0

References

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

Gillespie, Colin. 2016. Benchmarkme: Crowd Sourced System Benchmarks. https://CRAN.R-project.org/package=benchmarkme.

Xie, Yihui. 2016a. Bookdown: Authoring Books and Technical Documents with R Markdown. https://CRAN.R-project.org/package=bookdown.

Csardi, Gabor. 2015. Cranlogs: Download Logs from the Rstudio ’Cran’ Mirror. https://CRAN.R-project.org/package=cranlogs.

Dowle, M, A Srinivasan, T Short, S Lianoglou with contributions from R Saporta, and E Antonyan. 2016. Data.table: Extension of Data.frame. https://CRAN.R-project.org/package=data.table.

Wickham, Hadley, and Winston Chang. 2016a. Devtools: Tools to Make Developing R Packages Easier. https://CRAN.R-project.org/package=devtools.

Sveidqvist, Knut, Mike Bostock, Chris Pettitt, Mike Daines, Andrei Kashcha, and Richard Iannone. 2016. DiagrammeR: Create Graph Diagrams and Flowcharts Using R. https://CRAN.R-project.org/package=DiagrammeR.

Wickham, Hadley, and Romain Francois. 2016. Dplyr: A Grammar of Data Manipulation. https://CRAN.R-project.org/package=dplyr.

Carl Boettiger, Dirk Eddelbuettel with contributions by, Sebastian Gibb, Colin Gillespie, Jan Górecki, Matt Jones, Thomas Leeper, Steven Pav, and Jan Schulz. 2016. Drat: Drat R Archive Template. https://CRAN.R-project.org/package=drat.

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

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

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

Zeileis, Achim, and the R community. 2016. Fortunes: R Fortunes. https://CRAN.R-project.org/package=fortunes.

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

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

Wickham, Hadley, and Winston Chang. 2016b. Ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics. https://CRAN.R-project.org/package=ggplot2.

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

Xie, Yihui. 2016c. Knitr: A General-Purpose Package for Dynamic Report Generation in R. https://CRAN.R-project.org/package=knitr.

Grolemund, Garrett, Vitalie Spinu, and Hadley Wickham. 2016. Lubridate: Make Dealing with Dates a Little Easier. https://CRAN.R-project.org/package=lubridate.

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

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

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

Eddelbuettel, Dirk, Romain Francois, JJ Allaire, Kevin Ushey, Qiang Kou, Nathan Russell, Douglas Bates, and John Chambers. 2016. Rcpp: Seamless R and C++ Integration. https://CRAN.R-project.org/package=Rcpp.

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

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

Müller, Kirill, Hadley Wickham, David A. James, and Seth Falcon. 2016. RSQLite: ’SQLite’ Interface for R. https://CRAN.R-project.org/package=RSQLite.

Kross, Sean, Nick Carchedi, Bill Bauer, and Gina Grdina. 2016. Swirl: Learn R, in R. https://CRAN.R-project.org/package=swirl.

Wickham, Hadley, Romain Francois, and Kirill Müller. 2016. Tibble: Simple Data Frames. https://CRAN.R-project.org/package=tibble.

Wickham, Hadley. 2016b. Tidyr: Easily Tidy Data with ‘Spread()‘ and ‘Gather()‘ Functions. https://CRAN.R-project.org/package=tidyr.