Exporting hclust cluster membership

断了今生、忘了曾经 提交于 2019-12-12 08:14:44

问题


I am new to R. I am trying to do hclust and export the cluster membership. I have used the following. Is this correct or is there a better way?

FCtable1<-as.matrix(read.delim("table1.txt", row.names=1, header=TRUE, sep="\t"))
Disttab1<-dist(FCtable1, method="euclidean")
Hclustout1<-hclust(Disttab1, method="average")
clustnumber<- cutree(Hclustout1, h=1000)
tab1clustn <-data.frame(FCtable1, clustnumber)
write.table(tab1clustn,  file=" tab1clustn.xls", row.names=T, sep="\t")

Thanks R

来源:https://stackoverflow.com/questions/12826552/exporting-hclust-cluster-membership

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!