problem with maptree

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

problem with maptree

Héctor Villalobos-2
Hello,

I'm trying to draw a simplified tree of a cluster object
with maptree, but I get an error message:

        > class(vars.agn)
        [1] "agnes" "twins"

        > draw.clust (clip.clust (vars.agn, k=5))
        Error in "names<-.default"(`*tmp*`, value = c("merge",
"height", "order",'names' attribute [8] must be the same
length as the vector [7]

Trying converting first to object of class "hclust":

        > draw.clust (clip.clust (as.hclust(vars.agn), k=5))
        Error in split(x, f) : first argument must be a vector

But conversion seems to work fine:

        > vars.hclust=as.hclust(vars.agn)
        > vars.hclust

        Call:
        agnes(x = daisy(vars.cluster), diss = TRUE, method =
"ward")

        Cluster method   : ward
        Number of objects: 295


        > draw.clust (clip.clust (vars.hclust, k=5))
        Error in split(x, f) : first argument must be a vector


A previous version of maptree successfully clipped the
three from the same data. Any orientation will be greatly
appreciated.
Thank you in advance.

--
Héctor Villalobos <[hidden email]>
  IPN-CICIMAR. A.P. 592. Col. Centro
  La Paz, Baja California Sur, MÉXICO. 23000

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html