Week 4 R assignment