# Clustering of the Crabs data set
data(Crabs)
prms = hddc(Crabs[,-1], K=1:10)
slope = slopeHeuristic(prms)
plot(slope$crit) # The best model is indeed for 4 clusters
prms$all_results[[slope$best_model]] # we extract the best model
Run the code above in your browser using DataLab