From maechler@stat.math.ethz.ch  Wed May 15 10:54:47 2002
From: maechler@stat.math.ethz.ch (maechler@stat.math.ethz.ch)
Date: Wed, 15 May 2002 11:54:47 +0200 (MET DST)
Subject: [Rd] RE: cut.dendrogram (PR#1552)
Message-ID: <200205150954.LAA27417@pubhealth.ku.dk>

>>>>> "MM" == Martin Maechler <maechler@stat.math.ethz.ch> writes:

>>>>> "MikG" == M GRUM <M.GRUM@CGIAR.ORG> writes:
    MikG> I'm resending this bug report with a new example.  As
    MikG> seen below, cut.dendrogram gives an error message for
    MikG> some heights, but not for others and with some
    MikG> datasets adn not others.  I can't see why.

    MikG> Last time I unwittingly sent my message with HTML
    MikG> formatting.  This time I'm travelling and using an
    MikG> e-mail system that I am unfamiliar with.  As far as I
    MikG> can see, I am not using HTML.

    MM> <...example deleted..>

    MM> yes, this time your message has been very useful;
    MM> thank you, Mikkel!

    MM> Indeed, there is a (at least one!) problem in the  "dendrogram"
    MM> class/methods, currently --- which might not be so astonishing,
    MM> given the following excerpt from its documentation :

    <......>

    MM> Really, it has been on my todo list to look into this, and at least
    MM> provide a few more methods, e.g. print(), str(), and maybe "[", "[[".
    MM> Also, as.dendrogram.<class> for "tree" and/or "rpart" and "VLMC"
    MM> objects.

several of these will be in R-devel (to become 1.6 in fall)

    MM> As you may have read above, we have not even settled about
    MM> several details. {suggestions are welcome!}

    MM> BTW, in your example, even the first cut() result couldn't be
    MM> plotted any more.

{nonsense; cut() does not produce a dendrogram but a list
	   containing them!}

    MM> We will look into this.
done.

The fix (now in R-patched which will become 1.5.1) is very easy:

--- src/library/mva/R/dendrogram.R.~1~	13 Aug 2001 21:41:50
+++ src/library/mva/R/dendrogram.R	15 May 2002 09:47:50
@@ -136,7 +136,7 @@
 
 cut.dendrogram <- function(x, h, ...)
 {
-    LOWER <- NULL
+    LOWER <- list()
     X <- 1
 
--------
Martin Maechler <maechler@stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] RE: cut.dendrogram (PR#1552)
maechler@stat.math.ethz.ch