This page contains the list of known typos and errors in the 2nd edition of “The R Primer” book. References in square brackets refer to the finder.
p. 8, line -1, “Also, the” Hanging sentence that should be deleted. [James Helmreich, Dec 28, 2017]
p. 135, lines 16-18, The sentence “In this case the coefficient for pulse…status.” should be removed altogether. It is a left-over from the example used in the 1st edition. [James Helmreich, Dec 28, 2017]
p. 164: This page contains some really annoying errors in particular that the odds of the 7 and 10 year olds have been swapped. The text should read
The odds ratio for wheezing for a random child aged 10 relative to a random child aged 7 are \(\exp(-0.3755) = 0.687\). Thus, the odds for wheezing at age 10 are 0.687 times the odds for wheezing at age 7 with a confidence interval that is \(\exp(-0.3755 \pm 1.96\times0.1467) = (0.515, 0.916).\)
Also, the naive standard errors in the last output box shows the eight standard errors from the first model, model, and not from model2 which was referenced in the text just above the box. The output from model2 can be seen below
sqrt(diag(model2$geese$vbeta.naiv))
## [1] 0.136 0.132 0.134 0.144 0.177
[James Helmreich, Dec 28, 2017]
p. 185: first line after code box: “statically” should be “statistically”. [James Helmreich, Dec 28, 2017]
Please let me know of any typos and errors that you find in the book.