R code for Data Mining