[Rd] heatmap.2 in gplots (PR#8587)

From: <dasnicht_at_mac.com>
Date: Sat 11 Feb 2006 - 14:51:37 GMT


Full_Name: Shane Neph
Version: 2.2.1
OS: mac os x
Submission from: (NULL) (71.113.43.247)

While I found the names of the package authors and maintainer, I was unsuccessful in finding any contact information.

The preliminary documentation for heatmap.2 is inconsistent in at least a couple of places when discussing the suppression of one or more dendrograms (and column/row ordering in general).
In the Details section, in regards to the Rowv and Colv parameters, "If either is NULL, no reordering will be done for the corresponding side." The default value for these parameters is NULL. With NULL, the dendrograms are computed (and hence reordering is done).
In the Arguments section, Rowv shows "determines if and how the row dendrogram should be reordered. Either a dendrogram or a vector of values to reorder the row dendrogram of FALSE to suppres reordering or by default, NULL, ...". In particular, the portion about FALSE should be contrasted with the portion about NULL in the Details section.

Finally, it is my belief that part of the intention or using FALSE (or whatever is supposed to suppress the reordering) is to suppress the actual dendrogram drawing as well. This is similar to how NA works for the same argument names in the heatmap function. Achieving this behavior is straightforward. Assuming FALSE is the argument for suppression, the column dendrogram/reordering can be achieved by modifying heatmap.2 near line 78-80:

FROM:
    else {

        colInd <- order(Colv)
    }

TO:

    else if ( isTRUE(Colv) ) {

        colInd <- order(Colv)
    }
    else

        colInd <- 1:nc

This does suppress the automatic column ordering/dendrogram as desired. Similar fixes for the Rowv argument are needed.

R is great - keep up the work.
Shane



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sun Feb 12 01:53:57 2006

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:41 GMT