[BioC] heatmap{mva}

Martin Maechler maechler at stat.math.ethz.ch
Wed Aug 13 17:05:57 MEST 2003


>>>>> "Ivan" == Ivan Borozan <ivan at ebi.ac.uk>
>>>>>     on Wed, 13 Aug 2003 14:54:14 +0100 (BST) writes:

    Ivan> Hi all,
    Ivan> In heatmap{mva} would it be possible to use (in
    Ivan> distfun=dist) a different distance measure from the one provided as
    Ivan> default (i.e. "euclidean")? Also would it be
    Ivan> possible to use (in hclustfun) a different agglomeration method from that
    Ivan> provided as default i.e. ("complete") ?

    Ivan> if i do:


    Ivan> heatmap(mattest,distfun=dist(method="manhattan"),hclustfun=hclust(method="average")
    Ivan> ,scale=c("none"))   

    Ivan> i get

    Ivan> Error in as.integer(attr(d, "Size")) : Argument "d" is missing, with no
    Ivan> default


    Ivan> also if i do

    Ivan> heatmap(mattest,distfun=dist(mattest,method="manhattan"),hclustfun=hclust(dist(mattest),
    Ivan> method="average"),scale="none")

    Ivan> i get 

    Ivan> Error in heatmap(mattest, distfun = dist(mattest, method = "manhattan"),
    Ivan> : 
    Ivan> couldn't find function "hclustfun"


If you *either* read the documentation "help(heatmap)" 
*or* the error message, then you should find that these must be 
*function* s -- whereas you passed *result objects* of function
calls.

Maybe reread the "Details" section of that help page.

Finally, one solution for the `distfun' part :
Use
   heatmap(mattest, distfun = function(m) dist(m, method="manhattan"))

or equivalently, but maybe easier for beginners:

   mydist <- function(m) dist(m, method = "manhattan")
   heatmap(mattest, distfun = mydist)
   
Regards,

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><



More information about the Bioconductor mailing list