Errata: Second Edition

This page contains corrections to typos in Reproducible Research with R and RStudio. If you notice any corrections that should be made to the text please report them on the Book's GitHub Issues page.

Multiple mentions

  • source_DropboxData is no longer supported by the repmis package.

Front matter: Required R Packages

  • Installation of the ZeligBayesian package is no longer required. Due to changes in the Zelig package, a separate installation of this package is no longer necessary. Also due to changes in Zelig the example using the package is now broken (see Chapter 9).

Chapter 3

  • p. 60: "In this example it is located on the desktop." should be "In this example it is located on the Documents folder." Thank you to Dan Yavorsky for noticing this.

Chapter 4

  • p. 71: the directory name GatherSource should be Analysis. Thanks to Eduardo de Santana Medeiros Alexandre for noticing this.

Chapter 6

Chapter 9

  • Section 9.3.5: Due to changes in the Zelig package, the example in this section is broken.

Chapter 11

  • p. 219: See notes for Chapter 6 in this Errata for the updated URL to the UDS Democracy score data file.








Errata: First Edition

General

  • One of the reprints created defective copies with the print being too light to read. If you have purchased one of these copies please contact the publisher for a replacement and supply the ISBN:
  • Misspelling of Donoho as "Donohue". Thank you to David Scott.
  • Throughout the book if a URL is referred to with raw.githubusercontent.com, due to an update with the way that GitHub assigns URLs these should replaced by: raw.githubusercontent.com.

Front Matter

  • p. xvii: Missing comma after "digest" in the first code example.

Chapter 3

  • p. 46 (Figure 3.4): In the Markdown example, the first box should read "Website.Rmd" instead of "Website.Rnw". Thanks to Eric C. Anderson.
  • p. 49: In the second code chunk the comment is "Example of a non-evaluated code chunk". It should read "non-echoed" rather than "non-evaluated". Thanks to Jennifer Bryan.
  • p. 55: In the second paragraph "you first set us the" should be "you first use". Thanks to Jennifer Bryan.

Chapter 4

  • p. 67: The command name in "To copy the file to another directory use the file.rename command" should be file.copy.
  • p. 68: Pandoc is discussed in both chapters 12 and 13, not just chapter 12. Thanks to David Arnold for spotting these Chapter 4 issues.

Chapter 5

  • p. 77 and 79: Values, rather than rows are separated by tabs/commas. Thanks to Jennifer Bryan.
  • p. 86: In "into a sub-folder called Objects", Objects should begin with a lowercase letter o. Thanks to David Arnold for noticing this.
  • p. 88: The code example git checkout -- should be git checkout -- .. Note that there is a space between the two dashes and the period. Omitting the . will still restore text in files from the previous Git commit, but will not restore deleted files.

    This change should also be reflected in the second sentence following the example. Note that if you replace the -- with a commit reference, you should still include the . following the reference. Thanks to David Arnold.

  • p. 92: "Image that the URL" should be "Imagine that the URL". Thanks to David Arnold

Chapter 6

  • p. 103: The code examples:

    source("/GatherSource/IndvDataGather/Gather1.R")
    source("/GatherSource/IndvDataGather/Gather2.R")
    source("/GatherSource/IndvDataGather/Gather3.R")

    should be:

    source("GatherSource/Gather1.R")
    source("GatherSource/Gather2.R")
    source("GatherSource/Gather3.R")
    Thanks to David Arnold.
  • p. 104: "newer than its prerequisite. Make does not" should read "newer than its prerequisite, Make does not". Thanks to David Arnold.
  • p. 105: "called ROUT with a period" should read "called RDIR with a period"
  • p. 114-115: The URL has changed for the example downloading the compressed Unified Democracy Scores data set. It was http://www.unified-democracy-scores.org/files/uds_summary.csv.gz but is now http://www.unified-democracy-scores.org/files/20140312/z/uds_summary.csv.gz. The updated bit.ly link is http://bit.ly/1jXJgDh.

Chapter 7

  • p. 125 (footnote 3): "the code I used to reshape the data from wide to long format" should be "the code I used to reshape the data from long to wide format". Thanks to P. Roberto Bakker.
  • p. 141: value_var should be value.var. Thanks to P. Roberto Bakker.

Chapter 8

  • p. 157: The code chunk head should read Sample, cache=TRUE, instead of Sample, cahe=TRUE. Thank you to Ian Gow.

Chapter 9

  • p. 165: "center-right-right" should read "left-center-center".
  • p. 168: A note regarding the border="1" tag should be added that the default RStudio style sheet does not include table borders, so this markup will not add borders.
  • p. 169: "Just as read.csv turns . . ." should read "Just as write.csv turns . . .".
  • p. 169: In footnote 19 it should read: "In later examples we will see that individual explanatory variables are generally separated by plus signs". Thanks to David Arnold for highlighting these Chapter 9 issues.

Chapter 11

  • p. 208: See notes for Chapter 6 in this Errata for the updated URL to the UDS Democracy score data file.
  • p. 209: In the creation of the Mean UDS Score figure there is a redundant line ggplot(UDSData, aes(x = year, y = mean)) +.