RepData assignment1: code written for last two parts. Needs tidying and better text