Upload R code and discussion