Programming Assignment 3 for Coursera R Programming Course