Submission R code for Peer Assignment