R for Regression and Machine Learning in Investment