R Programming Week 4 Programming Assignment