[R] How to assign membership after hierachical clustering(agnes{cluster})

Sarah Goslee sarah.goslee at gmail.com
Thu Feb 27 00:17:23 CET 2014


Did you look at the help for agnes.object as directed by the help file
that you yourself linked in your email?

If none of those components meet your needs, as.hclust() - also
pointed to by the agnes.object helpfile - might give you what you
want.

Sarah

On Wed, Feb 26, 2014 at 3:08 PM, Tianchen Wu <deathlypest at gmail.com> wrote:
> Dear list,
>
> My Problem Setting Looks as Follows:
>
> I have a list of object [O1,O2,O3,O4,......O6000], on which a pairwise
> distance matrix is defined, called dist.matrix.
>
> After that, a agnes has been conducted on the distance matrix.
>
> agn1<-agnes(dist.matrix,method="ward")
>
> even cutted
>
> agn1_cut<-cut(agn1,h=9000)         #something like this
>
> Now how can I get back the cluster membership?
>
> Another difficulty here is , is that possible that I can get back the
> cluster preserved in the order of original list of object.(my dist.matrix
> is showhow still order preserved)
>
>
>
> By the way, for a reproductive sample code, I will point to
>
> Examples in
> http://stat.ethz.ch/R-manual/R-patched/library/cluster/html/agnes.html
>
> How to get cluster label for agn1, for instance
>
>
>
>
> I have been googled for 2 hours. I am wondering why no one has question
> like that before
> thank you very much.
>
>


-- 
Sarah Goslee
http://www.functionaldiversity.org




More information about the R-help mailing list