In **Section 5.6.1 Coding Sample** (line `347` of `04_least_squares.tex`) there is a typo in the `solve` invocation. It should be changed from ``` > ex2 = x2 - x1 %*% solve(t(x1) %*% x1) %*% t(x1) %*% x2 ``` to ``` > ex2 = x2 - x1 %*% solve(t(x1) %*% x1, t(x1) %*% x2) ```
In Section 5.6.1 Coding Sample (line
347of04_least_squares.tex) there is a typo in thesolveinvocation. It should be changed fromto