R problem set solutions for An Introduction to Statistical Learning