A First Course in Statistical Programming with R: Errata

This is a textbook by W. John Braun and Duncan J. Murdoch, published by Cambridge University Press.

If you notice additional errors besides what is listed below, please send them to murdoch@stats.uwo.ca.

pp. 69-70
In the mergesort function, everywhere that "len / 2" appears, it should be replaced by integer division "len %/% 2", or the mergesort function fails on odd-length vectors.
p. 153
The last line of Example 7.12 should have d = XTy.
p. 154
The last paragraph of note after Example 7.13: Here D is a symmetric matrix, not a diagonal matrix. To get a diagonal matrix use `x - mean(x)` in place of `x`. (Thanks to Julian Stander for this and the previous correction.)