lecture 15
R code