Week 3 assignment for the R programming class from John Hopkins