Programming Assignment 2 for the R programming course from Coursera and John Hopkins Univ