[R-sig-eco] [Fwd: Component merge in hclust objects]

Agustin Lobo aloboaleu at gmail.com
Tue Nov 4 14:18:53 CET 2008


-------- Original Message --------
Subject: Component merge in hclust objects
Date: Mon, 03 Nov 2008 10:39:57 +0100
From: Agustin Lobo <aloboaleu at gmail.com>
Reply-To: Agustin.Lobo at ija.csic.es
To: r-help at r-project.org <r-help at r-project.org>

Having a non-standard problem of clustering, I'm making an "ad-hoc"
procedure in R but would like my object to be a list like
the one produced by hclust. I have a doubt regarding component
merge:

While the meaning of the negative elements is clear, I'm
confused about the next sentence in the hclust help page:
"If j is positive then the merge was with the cluster formed at the
(earlier) stage j of the algorithm"

As an example, I've made:

> hc <- hclust(dist(USArrests[1:10,]), "ave")
> hc$merge
       [,1] [,2]
  [1,]   -1   -8
  [2,]   -3   -5
  [3,]   -6  -10
  [4,]   -4    3
  [5,]    1    4
  [6,]   -2    2
  [7,]   -9    6
  [8,]    5    7
  [9,]   -7    8
And would like to confirm:

Row [4,] means: element 4 merges with cluster made
by elements 6 and 10

Row [5,] means: cluster made by elements 1 and 8 merges
with cluster made by elements 6,10 and 4

Is this right? Am I understanding correctly?

Thanks

Agus
Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: Agustin.Lobo at ija.csic.es
http://www.ija.csic.es/gt/obster


-- 
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: Agustin.Lobo at ija.csic.es
http://www.ija.csic.es/gt/obster



More information about the R-sig-ecology mailing list