I'm working with vacation student Jack Simpson and colleague Lauren Bragg on exploring data from the Human Microbiome Project. We've been using heatmap.2() from the gplots package in R to look at the data in all its glory...
...or horror. Like many ecological data sets, the arch-enemy of the logarithm (zero) is present (absent?) in abundance.
To show where the zeroes are lurking, we log-transformed the data and converted the resulting -Inf values to NA, thinking that these should appear as blanks, as indeed they do on this summary:
...but things got interesting when we looked at a much more detailed heatmap. At 100% zoom, the PDF output looks like:
Keep your eye on the blue rectangle that we've added to the plot as we go to 800% zoom on the PDF:
Just to be clear: we can see data at 800% zoom that appears to be missing (i.e., NA) at 100% zoom of the PDF.
Is this a bug? Is it a feature? Does the issue lie with heatmap.2() or the PDF conversion? I'm loathe to say.
It is certainly a surprise and, I think, something to be wary of.