[R] (no subject)

From: Salang Pan <hypan_at_scbit.org>
Date: Wed 07 Sep 2005 - 20:56:12 EST

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@scbit.org
>
> Tel: 021-64363311-123
> Shanghai Center for Bioinformatics Technology
> Floor 12th,100# QinZhou Road
> Shanghai,China,200235



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Sep 07 21:02:44 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 16:28:22 EST