Completed R programming assignment for week 3.