Initial commit of R code