Week 5 R assignment