Updated R file includes step 5 and readme is complete