[R-gregmisc-users] SF.net SVN: r-gregmisc:[1887] trunk/gplots
Brought to you by:
warnes
From: <wa...@us...> - 2014-09-16 18:08:50
|
Revision: 1887 http://sourceforge.net/p/r-gregmisc/code/1887 Author: warnes Date: 2014-09-16 18:08:39 +0000 (Tue, 16 Sep 2014) Log Message: ----------- - Correct statement of default color for 'notecol' argumemt to 'heatmap.2'. - Modify default arguments to 'symbreaks' and 'symkey' to make the logic more evident by replacing min() with any(). (The previous code executed properly, but relied on implicit coercion of logicals to numeric, obscuring the intent.) Modified Paths: -------------- trunk/gplots/R/heatmap.2.R trunk/gplots/man/heatmap.2.Rd Modified: trunk/gplots/R/heatmap.2.R =================================================================== --- trunk/gplots/R/heatmap.2.R 2014-09-13 01:17:27 UTC (rev 1886) +++ trunk/gplots/R/heatmap.2.R 2014-09-16 18:08:39 UTC (rev 1887) @@ -21,7 +21,7 @@ ## mapping data to colors breaks, - symbreaks=min(x < 0, na.rm=TRUE) || scale!="none", + symbreaks=any(x < 0, na.rm=TRUE) || scale!="none", ## colors col="heat.colors", @@ -65,7 +65,7 @@ keysize = 1.5, density.info=c("histogram","density","none"), denscol=tracecol, - symkey = min(x < 0, na.rm=TRUE) || symbreaks, + symkey = any(x < 0, na.rm=TRUE) || symbreaks, densadj = 0.25, key.title = NULL, key.xlab = NULL, @@ -555,7 +555,7 @@ if( dendrogram %in% c("both","column") ) { - plot(ddc, axes = FALSE, xaxs = "i", leaflab = "none") + plot.dendrogram(ddc, axes = FALSE, xaxs = "i", leaflab = "none") } else plot.new() Modified: trunk/gplots/man/heatmap.2.Rd =================================================================== --- trunk/gplots/man/heatmap.2.Rd 2014-09-13 01:17:27 UTC (rev 1886) +++ trunk/gplots/man/heatmap.2.Rd 2014-09-16 18:08:39 UTC (rev 1887) @@ -33,7 +33,7 @@ # mapping data to colors breaks, - symbreaks=min(x < 0, na.rm=TRUE) || scale!="none", + symbreaks=any(x < 0, na.rm=TRUE) || scale!="none", # colors col="heat.colors", @@ -77,7 +77,7 @@ keysize = 1.5, density.info=c("histogram","density","none"), denscol=tracecol, - symkey = min(x < 0, na.rm=TRUE) || symbreaks, + symkey = any(x < 0, na.rm=TRUE) || symbreaks, densadj = 0.25, key.title = NULL, key.xlab = NULL, @@ -126,7 +126,7 @@ warning is issued and Rowv (or Colv) arguments are honoured.} \item{reorderfun}{\code{function(d, w)} of dendrogram and weights for reordering the row and column dendrograms. The default uses - \code{\link{stats}{reorder.dendrogram}}. + \code{\link{stats}{reorder.dendrogram}} }. \item{symm}{logical indicating if \code{x} should be treated \bold{symm}etrically; can only be true when \code{x} is a square matrix.} % data scaling @@ -162,7 +162,7 @@ \item{notecex}{(optional) numeric scaling factor for \code{cellnote} items.} \item{notecol}{(optional) character string specifying the color for - \code{cellnote} text. Defaults to "green".} + \code{cellnote} text. Defaults to "cyan".} \item{na.color}{Color to use for missing value (\code{NA}). Defaults to the plot background color.} % level trace This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |