Statistics with R code