Initial commit of R script