project 2 r code