A small comment on Lantz's book. The author does explain some R basics, just enough to get you through excersises in the book. However, you'll feel MUCH more comfortable after this compact intro:
Impatient R

Sphin is right, no examples in the book are about trading. So keep in mind while reading about out-of-sample testing, ten-fold CV, and so on - with trading as purpose of machine learning (or any time series prediction), never peek into the future (a BAD example: train a learner on 2015 data and test on 2014. This is surely out-of-sample but worthless)

After seeing all the details in Lantz's book, you might want to get a higher level overview (only 9 pages):
Pedro Domingos - A Few Useful Things to Know about Machine Learning