[R] Dendrogram for agglomerative hierarchical clustering result

noorpiilur noorpiilur at yahoo.com
Mon Feb 11 17:15:02 CET 2008


Thank you for your reply Wolfgang
I've seen these examples but my problem is that I don't know how to
make the input data out of my given data. According to the example
below hclust is making the clustering and will result in hclust object
hc. In my case the clustering is already done and I need to create the
hclust object out of my clustering result. So I probably have to study
how to create the hclust object first..

dndrgr> hc <- hclust(dist(USArrests), "ave")
dndrgr> (dend1 <- as.dendrogram(hc))

Risto

On 11 veebr, 19:18, Wolfgang Huber <hu... at ebi.ac.uk> wrote:
> Hi Risto,
> You could try
>
>    example("dendrogram")
>
> best wishes
>         Wolfgang
>
> noorpiilur scripsit:
>
>
>
> > Hey group,
>
> > I have a problem of drawing dendrogram as the result of my program
> > written in C. My algorithm is a approximation algorithm for single
> > linkage method. AS a result I will get the following data:
>
> > [Average distance] [cluster A] [cluster B]
>
> > For example:
> > 42.593141  1       26
> > 42.593141  4       6
> > 42.593141  123     124
> > 42.593141  4       113
> > 74.244206  1       123
> > 74.244206  4       133
> > 74.244206  1       36
>
> > So far I have used C to generate a bitmap output but I would like to
> > use the computed result as an input for R to just draw the dendrogram.
>
> > As I'm new to R any help is appreciated.
>
> > Thanks,
> > Risto
>
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list