Source: https://www.webpages.uidaho.edu/~stevel/517/RDM-slides-clustering-with-r.pdf