Skip to content
Prev 313121 / 398506 Next

tool for cluster analysis

First, you are using a very old version of R. The current version is 2.15.2. The version you are using was released in summer 2005 so you should upgrade as soon as possible. 

Second, there are many tools available for cluster analysis. You should tell us exactly what you trying to do, not give us examples of the kind of thing you want. You are confused by the dendrogram and ask for a matrix with different numbers for each group. That suggests you may not understand how hierarchical clustering works. The program (agnes() in cluster or hclus() in base R) begins with as many clusters as observations and then combines observations or clusters at each stage until there is only one cluster. The entire process is displayed in the dendrogram.

To get cluster assignments, you need to specify where the clustering process should stop and then use the cutree() function to give you the cluster assignments at that stage (?cutree to get the help page).

----------------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352