Example R code for clustering analysis