Common hierarchical clustering methods are available through the function
hclust() of the stats package. You will now compute and illustrate
(Fig. 4.1) your first cluster analysis on the basis of an association matrix computed
in Chap. 3 and recomputed here for convenience:
# Compute matrix of chord distance among sites
spe.norm <- decostand(spe, "normalize")
spe.ch <- vegdist(spe.norm, "euc")
# Attach site names to object of class 'dist'
attr(spe.ch, "labels") <- rownames(spe)
# Compute single linkage agglomerative clustering
spe.ch.single <- hclust(spe.ch, method = "single")
# Plot a dendrogram using the default options
plot(spe.ch.single,
labels = rownames(spe),
main = "Chord - Single linkage")
spe.ch
hclust (*, "single")
2
9
5
1
19
30
20
21
22
29
26
27
28
17
18
16
15
10
11
13
14
12
3
7
4
6
25
23
24
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
Height
Chord - Single linkage
Fig. 4.1 Single linkage agglomerative clustering of a matrix of chord distances among sites
(species data)
4.3 Hierarchical Clustering Based on Links
63
Précédent

- 76/444

Suivant