R assignment 2