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

1 message Options
Embed this post
Permalink
Steve Lianoglou-6

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

Reply Threaded More More options
Print post
Permalink
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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.