Update for Quiz3

Updated R code