Submission of programming assignment 2 for R programming course on Coursera