[R-gregmisc-users] SF.net SVN: r-gregmisc:[1940] trunk/gplots/R/heatmap.2.R
Brought to you by:
warnes
From: <wa...@us...> - 2015-04-23 18:49:30
|
Revision: 1940 http://sourceforge.net/p/r-gregmisc/code/1940 Author: warnes Date: 2015-04-23 18:49:23 +0000 (Thu, 23 Apr 2015) Log Message: ----------- In heatmap.2() split calls to distfun() and hclustfun() into separate steps to make debugging easier Modified Paths: -------------- trunk/gplots/R/heatmap.2.R Modified: trunk/gplots/R/heatmap.2.R =================================================================== --- trunk/gplots/R/heatmap.2.R 2015-04-23 17:40:13 UTC (rev 1939) +++ trunk/gplots/R/heatmap.2.R 2015-04-23 18:49:23 UTC (rev 1940) @@ -198,7 +198,8 @@ else if (is.integer(Rowv)) { ## Compute dendrogram and do reordering based on given vector browser() - hcr <- hclustfun(distfun(x)) + distr <- distfun(x) + hcr <- hclustfun(distr) ddr <- as.dendrogram(hcr) ddr <- reorderfun(ddr, Rowv) @@ -209,7 +210,8 @@ else if (isTRUE(Rowv)) { ## If TRUE, compute dendrogram and do reordering based on rowMeans Rowv <- rowMeans(x, na.rm = na.rm) - hcr <- hclustfun(distfun(x)) + distr <- distfun(x) + hcr <- hclustfun(distr) ddr <- as.dendrogram(hcr) ddr <- reorderfun(ddr, Rowv) @@ -240,7 +242,8 @@ colInd <- rowInd } else if(is.integer(Colv)) {## Compute dendrogram and do reordering based on given vector - hcc <- hclustfun(distfun(if(symm)x else t(x))) + distc <- distfun(if(symm)x else t(x)) + hcc <- hclustfun(distc) ddc <- as.dendrogram(hcc) ddc <- reorderfun(ddc, Colv) @@ -251,7 +254,8 @@ else if (isTRUE(Colv)) {## If TRUE, compute dendrogram and do reordering based on rowMeans Colv <- colMeans(x, na.rm = na.rm) - hcc <- hclustfun(distfun(if(symm)x else t(x))) + distc <- distfun(if(symm)x else t(x)) + hcc <- hclustfun(distc) ddc <- as.dendrogram(hcc) ddc <- reorderfun(ddc, Colv) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |