Added code

Added full R code for Programming Assignment 2 - Jack Wright