cluster
              Define clusters from an agglomerative hierarchical cluster tree.
 Given a hierarchical cluster tree Z generated by the linkage
 function, cluster defines clusters, using a threshold value C to
 identify new clusters (’Cutoff’) or according to a maximum number of desired
 clusters N (’MaxClust’).
 criterion is used to choose the criterion for defining clusters, which
 can be either "inconsistent" (default) or "distance". When using
 "inconsistent", cluster compares the threshold value C to the
 inconsistency coefficient of each link; when using "distance", cluster
 compares the threshold value C to the height of each link.
 D is the depth used to evaluate the inconsistency coefficient, its
 default value is 2.
 cluster uses "distance" as a criterion for defining new clusters when
 it is used the ’MaxClust’ method.
See also: clusterdata, dendrogram, inconsistent, kmeans, linkage, pdist
Source Code: cluster