[R] problem with maptree

From: Hector Villalobos Ortiz <hvillalo_at_ipn.mx>
Date: Wed 08 Feb 2006 - 20:56:27 EST


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

	agnes(x = daisy(vars.cluster), diss = TRUE, method = 
	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 <hvillalo@ipn.mx>
  IPN-CICIMAR. A.P. 592. Col. Centro
  La Paz, Baja California Sur, MÉXICO. 23000

R-help@stat.math.ethz.ch mailing list
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Wed Feb 08 21:12:33 2006

This archive was generated by hypermail 2.1.8 : Fri 10 Feb 2006 - 19:55:36 EST