[R] cluster analysis
James Foadi
foadi at ysbl.york.ac.uk
Fri Oct 15 11:19:12 CEST 2004
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
More information about the R-help
mailing list