Assignment 3 for R-Programming course on Coursera