I am using R to generate a pairwise distance matrix of a large dataset (3000 grid cells) and I am interested in grouping cells into ten clusters.

I have successfully used the "cutree" function in the CLUSTER package in R to get 10 clusters; but I got stuck on how to create a new matrix based on mean of all pairwise grid cell values for the new clusters defined by my cutree function. What I am interested in is to use a summary (i.e. mean) of the new clusters to get a new dendrogram based ONLY on the means. I only want to show a dendrogram of the means of the summarized clusters (i.e. the 10 clusters) which I retrieved using the cutree function so that I can further do some analyses e.g. metaMDS in vegan.

I have looked up different R help pages to see whether I can get a new "summary" dendrogram based on the "mean of all pairwise grid cells observed between the clusters", but unsuccessful.

I attached a picture as an example of what I hope to represent.

Any help especially in the form of R code will be highly appreciated.

Similar questions and discussions