R scripts for data science toolbox