add R code and images