Using R to cluster based on euclidean distance and a complete linkage metric, too many vectors?

后端 未结 3 1297
渐次进展
渐次进展 2021-01-24 01:37

I am trying to figure out how to read in a counts matrix into R, and then cluster based on euclidean distance and a complete linkage metric. The original matrix has 56,000 rows

3条回答
  •  不要未来只要你来
    2021-01-24 01:50

    In case anybody was wondering, the answer to my second question is below. I was calling as.matrix on a matrix, and it was screwing up the data. The following code works now!

    exprs <- as.matrix(read.table("small_RMA_table.txt", header=TRUE, sep = "\t", row.names = 1, as.is=TRUE))
    eucl_dist=dist(exprs,method = 'euclidean')
    hie_clust=hclust(eucl_dist,method = 'complete')
    plot(hie_clust)
    

提交回复
热议问题