[R] hclust question

Prof Brian D Ripley ripley at stats.ox.ac.uk
Fri Feb 23 08:22:43 CET 2001


On Thu, 22 Feb 2001, Ranjan Maitra wrote:

> Dear all,
>
> I have a question with regard to the use of hclust. I would like to be
> able to specify my own distance matrix instead of asking R to compute
> the distance matrix for me. It is computationally easier for me this
> way. My question is: How can I get hclust to accept this?

I am puzzled:

?hclust

Arguments:

       d: a dissimilarity structure as produced by `dist'.

So hclust accepts a dissimilarity matrix as its first argument, and does
not compute a distance matrix.

Just supply `d'.  The `Value' section of ?dist tells you how to specify it.
For hclust only the `Size' and `Labels' attributes are needed, I believe.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list