[R] cluster analysis
Christian Hennig
fm3a004 at math.uni-hamburg.de
Fri Oct 15 11:43:53 CEST 2004
Dear James,
sorry, this is not really an answer.
I use cutree to obtain clusters from an hclust object.
I do not get from the identify help page that identify should do anything
like what you expect it to do... I tried it out and to my surprise it
behaved as you said, i.e., it indeed does something at least similar to what
you want it to do, and that might be useful also for me. However, I wonder
where you got the information that identify could be suitable to obtain the
hclust clusters.
Puzzled,
Christian
PS: It seems that each value is typed twice because classi is named, and
each value is also a name. Try as.vector(classi). (Perhaps a little useful
help in the end?)
On Fri, 15 Oct 2004, James Foadi wrote:
> Hello. I wonder if anyone can help me with this.
>
> I'm performing cluster analysis by using hclust in stats package.
> My data are contained in a data frame with 10 columns, named "drops".
>
> Firs I create a distance matrix using dist:
>
> distanxe <- dist(drops)
>
> Then I perform cluster analysis via hclust:
>
> clusters <- hclust(distanze)
>
> At this point I want to view the tree plot, and use plot:
>
> plot(clusters)
>
> Then, once decided which clusters to select, I start identify:
>
> classi <- identify(clusters)
>
> and click on all clusters to be selected; I then finish by right-clicking.
>
> My understanding is that "classi" is now a list containing all individual
> data, grouped in clusters. In my case "classi" contained 10 objects,
> simply named [1], [2], etc.
>
> To obtain all individual data belonging to one object I thought that
> would have sufficed to type for instance:
>
> classe_01 <- classi[[1]]
>
> Unfortunately, rather than obtaining a vector, I obtain a "numeric" where
> each value is typed twice.
>
> Can anyone explain why, or what I've done wrong?
>
> Many thanks,
>
> james
> --
> Dr James Foadi
> Structural Biology Laboratory
> Department of Chemistry
> University of York
> YORK YO10 5YW
> UK
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
***********************************************************************
Christian Hennig
Fachbereich Mathematik-SPST/ZMS, Universitaet Hamburg
hennig at math.uni-hamburg.de, http://www.math.uni-hamburg.de/home/hennig/
#######################################################################
ich empfehle www.boag-online.de
More information about the R-help
mailing list