```
# NOT RUN {
require(utils)
# }
# NOT RUN {
<!-- %% FIXME: Do something more sensible (non-random data) !! -->
# }
# NOT RUN {
set.seed(129)
n <- 7 ; p <- 2
X <- matrix(rnorm(n * p), n, p) # no intercept!
y <- rnorm(n)
w <- rnorm(n)^2
str(lmw <- lm.wfit(x = X, y = y, w = w))
str(lm. <- lm.fit (x = X, y = y))
# }
# NOT RUN {
if(require("microbenchmark")) {
mb <- microbenchmark(lm(y~X), lm.fit(X,y), .lm.fit(X,y))
print(mb)
boxplot(mb, notch=TRUE)
}
# }
# NOT RUN {
<!-- %% do an example which sets 'tol' and gives a difference! -->
# }
```

Run the code above in your browser using DataCamp Workspace