mauede at alice.it
2009-Aug-18 13:58 UTC
[R] Help with identify() points on a PAM clusplot
I created a clusplot from PAM results. It represents how signals have been
classified.
Signals are identified by a numerical label.
My trial distance matrix is made up of 10 rows, one for eacjh signal.
I assigned the signals iidentifiers as rownames of the distance matrix.
rwn
[1] "1104" "1332" "2057" "2425"
"2483" "2530" "2649" "2881"
"3044" "877"
The rownames order correspond to the ordering of signal features used in the
distance matrix.
This way I can click on each point of the clusplot and make the signal
identifier pop up on the canvas using the following
commands sequence:
yy <- as.matrix(dist.mat)
rownames(yy) <- rwn
cl <- pam(dist.mat,2,diss=TRUE)
x11(width=22,height=20)
if(interactive()) {
clusplot(yy, cl$cluster,
diss=FALSE,shade=TRUE,color=TRUE,labels=5,col.p="orangered3",
main="G1-INDEX Clusters Best
Layout",col.main="coral4",
col.txt="black",font.main=2,font.lab=4,font.axis=2,font.lab=4)
}
## WAIT FOR MOUSE INPUT TO DELETE CURRENT SCREEN PLOT
coord <- locator(n=1)
graphics.off()
I cannot get the signal identifier returned to a script variable besides being
printed on the plot.
Any help is more than welcome.
Thank you in advance,
Maura
tutti i telefonini TIM!
[[alternative HTML version deleted]]
