坐山雕

导航

pheatmap in R. How to get clusters

res=RES$i
DF<-data.frame("A","B",stringsAsFactors = FALSE)
for (i in 1:length(res$tree_row$order)){
ROW_CLUSTER_ORDER=i
ROW_CLUSTER_NAME=res$tree_row$labels[res$tree_row$order[i]]
DF[ROW_CLUSTER_ORDER,] <- list(ROW_CLUSTER_ORDER,ROW_CLUSTER_NAME)
}
# head(DF)
colnames(DF)<-c("related_plot_line_num","GEMNUMID")
# head(AIN2)

#print("422")
MIN<-merge(AIN2,DF,by = "GEMNUMID")

posted on 2021-01-11 13:43  坐山雕  阅读(71)  评论(0)    收藏  举报