Programming assignment 2 for Coursera's R Programming class