Added R code and HTML template