Week 4 assignment for the R programming class from John Hopkins