week 6 R assignment