Update R code for Cluster Analysis (Beta)