Week 8 R assignment