heatmap{mva}
1
0
Entering edit mode
Ivan Borozan ▴ 20
@ivan-borozan-398
Last seen 10.3 years ago
Hi all, In heatmap{mva} would it be possible to use (in distfun=dist) a different distance measure from the one provided as default (i.e. "euclidean")? Also would it be possible to use (in hclustfun) a different agglomeration method from that provided as default i.e. ("complete") ? if i do: heatmap(mattest,distfun=dist(method="manhattan"),hclustfun=hclust(meth od="average") ,scale=c("none")) i get Error in as.integer(attr(d, "Size")) : Argument "d" is missing, with no default also if i do heatmap(mattest,distfun=dist(mattest,method="manhattan"),hclustfun=hcl ust(dist(mattest), method="average"),scale="none") i get Error in heatmap(mattest, distfun = dist(mattest, method = "manhattan"), : couldn't find function "hclustfun" best regards, ivan
• 1.2k views
ADD COMMENT
0
Entering edit mode
@martin-maechler-2
Last seen 5.3 years ago
Switzerland
>>>>> "Ivan" == Ivan Borozan <ivan@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=h clust(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"),hcl ustfun=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@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 <><
ADD COMMENT

Login before adding your answer.

Traffic: 751 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6