R scripts for datamining