November 2018
Beginner to intermediate
420 pages
10h 4m
English
There are couple of ways where you can perform the same task. Sometimes in this book, I may do it more efficiently and sometimes not. There are mainly two reasons that will prevent me from trying a more efficient way:
There is always room for improvement. I encourage the reader to look for it every single time. It's okay if you don't succeed or if you find people with more skills than you. Next, you can see the code that I would have pulled if it weren't for reason#1:
# set.seed(5)# n <- sample(dim(dt)[1], size = 40)reg <- lm(infantMortality ~ log(ppgdp), data = dt[-n,])out <- predict(reg, newdata = dt[n,])
Instead of creating ...
Read now
Unlock full access