[R] (no subject)

Salang Pan hypan at scbit.org
Wed Sep 7 12:56:12 CEST 2005


hi,
   when I use bclust in R,   bclust(dat,centers=5,minsize=3,base.centers=4)
dat has 25 rows, there is an error as following:
    Error in knn1(object$allcenters, x, factor(1:nrow(object$allcenters))) : 
        train and class have different lengths
when I debug this function , I found the error is in the prune.bclust function. But I can not search the help doc of this function.
which package is this function in?

Meanwhile I think there is a  bug in blcust:   bclust(x, centers=2, iter.base=10, minsize=0,
            dist.method="euclidian",
            hclust.method="average", base.method="kmeans",
            base.centers=20, verbose=TRUE,
            final.kmeans=FALSE, docmdscale=FALSE,
            resample=TRUE, weights=NULL, maxcluster=base.centers, ...)

if the centers is larger than base.centers, maxcluster is default,ie is equal to base.centers, then it will occur  an error as following:
	Error in clusters.bclust(object, centers) : subscript out of bounds
because this line object$members <- cutree(object$hclust, 2:maxcluster) in hclust.bclust function denotes that object$members has (maxcluster-1) columns, it will occur subscript out of bounds.

I think the maxcluster may be setted as max(base.centers, centers), is it right?
Thanks you very much!
>
>	
>
>	
>
>			 
>=====================================================¡¡
> Salang
> hypan at scbit.org
>
> Tel: 021-64363311-123
> Shanghai Center for Bioinformatics Technology
> Floor 12th,100# QinZhou Road
> Shanghai,China,200235




More information about the R-help mailing list