Completed programming assignment 2 for the R programming course.