Completed code

Sync to update completed R code for coursework project