R Code for StatLearning Course