Made changes to the file and added code for 2 functions as part of
 programming assignment 2 for week 3 of R programming course