[BioC] hclust-how to get the subject name, not its cluster number
Liu, Xin
Xin.Liu at arradx.com
Tue Nov 16 11:46:39 CET 2004
USArrests is a frame and the following code worked!
rownames(USArrests[memb==1,])[1]
Xin
-----Original Message-----
From: michael watson (IAH-C) [mailto:michael.watson at bbsrc.ac.uk]
Sent: 15 November 2004 19:30
To: Liu, Xin; bioconductor at stat.math.ethz.ch
Subject: RE: [BioC] hclust-how to get the subject name, not its cluster
number
Is USArrests a matrix or data.frame?
Anyway, try something like:
USArrests[memb==1,]
to get the rows of USArrests that correspond to group/cluster "1".
M
-----Original Message-----
From: Liu, Xin [mailto:Xin.Liu at arradx.com]
Sent: Mon 11/15/2004 5:53 PM
To: bioconductor at stat.math.ethz.ch
Cc:
Subject: [BioC] hclust-how to get the subject name, not its cluster number
Dear all,
> hc <- hclust(dist(USArrests)^2, "cen")
> memb <- cutree(hc, k = 3)
> memb[1:3]
Alabama Alaska Arizona
1 1 1
how to get the first subject in memb "Alabama", not "1"? Thanks!
Xin LIU
This e-mail is from ArraDx Ltd
The e-mail and any files transmitted with it are confidentia...{{dropped}}
_______________________________________________
Bioconductor mailing list
Bioconductor at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/bioconductor
This e-mail is from ArraDx Ltd
The e-mail and any files transmitted with it are confidentia...{{dropped}}
More information about the Bioconductor
mailing list