Added some embedded R code