Skip to content
Prev 17286 / 398513 Next

plot.hclust: strange behaviour with "manufactured"

Andy:

That's a great idea.  And it's certainly part of the problem.  I
verified this by changing the type of the "merge" element of a valid
hclust object to be double.  As you suggest, it doesn't plot.  

What's interesting is that if I change it back to integer again,
plot.hclust still gives an error.  Moreover, the object.size of the
"merge" component that was transformed integer to double to integer is
different from the object.size of the original integer component.  Is
there something that I am missing about integer types?

The original integer type was produced by the interal (C or Fortran)
code, so maybe I am corrupting it in some way.  

An example below gives the details...
----------------------------------------------------------------------
merge      height       order      labels      method        call
  "integer"    "double"   "integer"      "NULL" "character"  "language"
dist.method
"character"
merge      height       order      labels      method        call
        152          60          52           0          44         324
dist.method
         52
Error in plot.hclust(x.hc) : invalid dendrogram
merge      height       order      labels      method        call
   "double"    "double"   "integer"      "NULL" "character"  "language"
dist.method
"character"
merge      height       order      labels      method        call
         92          60          52           0          44         324
dist.method
         52
Error in plot.hclust(x.hc) : invalid dendrogram
merge      height       order      labels      method        call
  "integer"    "double"   "integer"      "NULL" "character"  "language"
dist.method
"character"
merge      height       order      labels      method        call
         60          60          52           0          44         324
dist.method
         52

  
    
Message-ID: <200202202232.RAA10244@icarus.math.uwaterloo.ca>
In-Reply-To: <51F9C42DA15CD311BD220008C707D81903DC85D1@usrymx10.merck.com> from "Liaw, Andy" at Feb 20, 2002 02:19:22 PM