# Create a distance matrix
distance_matrix <- dist(matrix(rnorm(20), nrow = 5))
# Perform hierarchical clustering and plot the dendrogram
cluster_elements(distance_matrix, method = "complete", plot = TRUE)
Run the code above in your browser using DataLab