[R] Bug in gplots::heatmap.2 symbreaks arg default (?)

Steve Lianoglou mailinglist.honeypot at gmail.com
Mon Nov 9 04:22:12 CET 2009


Hi all,

I think the code to calculate the default value of the symbreaks  
argument in the gplots::heatmap.2 function is wrong.

The documentation says symbreaks defaults to true if any negative  
values are detected in the data passed in.

The relevant code in the parameter list of this function definition  
(gplots 2.7.3) is this:

symbreaks = min(x < 0, na.rm = TRUE) || scale != "none"

When I'm pretty sure it should be:

symbreaks = min(x, na.rm = TRUE) < 0 || scale != "none"

Likewise for the symkey parameter.

Right?

Thanks,
-steve

--
Steve Lianoglou
Graduate Student: Computational Systems Biology
   |  Memorial Sloan-Kettering Cancer Center
   |  Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact




More information about the R-help mailing list