[BioC] hclust-how to get the subject name, not its cluster number

michael watson (IAH-C) michael.watson at bbsrc.ac.uk
Mon Nov 15 20:29:37 CET 2004


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



More information about the Bioconductor mailing list