# NOT RUN {
## count peaks on joint histogram, this suggests number of clusters
histdata <- hist(apply(scale(iris[, -5]), 1, function(.x) sum(abs(.x))), breaks=10, plot=FALSE)
sum(Peaks(histdata$counts)) # 3 is the first value after 1 and does not change when 8 < breaks < 22
# }
Run the code above in your browser using DataCamp Workspace