3rd programming assignment for the R Programming class