create clustering

R code for clustering