The problem is with this line of clustIndex
zttw <- ttww(x, clres$size, clres$cluster) because it use cov function which can not be used on only one value


And the problem is that some indexes (e.g. "calinsky") do not use this value.
replace this line by #zttw <- ttww(x, clres$size, clres$cluster)
and it will work.
However, some indexes used this quantity ("scott", "marriot"...)
I think that the author must modify the function because it stops the function although the statistic could be computed



Sincerely,


At 09:09 09/03/2004, Sebastien Durand wrote:
Hello, here is my problem,

After looking at the mail archives, I found a description of the error I get when I use this package. At first I even tought that they were showing how to solve it.

But the thing is that by saying "the programmer forgot drop=FALSE" doesn't show me how I should get rid of the problem
I have looked inside the package very quickly and I found three files, I am not sure what to do to fix this (the problem is describe bellow)


I would be very happy to have someone show me how to solve my problem....

Thanks a lot

S�bastien Durand



On Wed, 20 Feb 2002, David Wartel wrote:


I have to solve a clustering problem.
My first step is to determinate the number of clusters, that's why I 'm using
...snip...
... number of clusters.
 A function is already implemented in R to calculate this index :

clustIndex(cl,x, index="calinski")

Where is that from? It's not part of R -- package cclust, perhaps?


where cl is the result of a clustering method , for instance:

cclust(x,k,itermax,verbose=TRUE,method="kmeans")

 My probleme is that I can't calculate the Calinski's index when a cluster
 contains only one datapoint :

Error in cov(x[cluster == l, ]) : supply both x and y or a matrix-like x

The programmer forgot drop=FALSE, it would seem.


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

St�phane DRAY
--------------------------------------------------------------------------------------------------


D�partement des Sciences Biologiques
Universit� de Montr�al, C.P. 6128, succursale centre-ville
Montr�al, Qu�bec H3C 3J7, Canada

Tel : 514 343 6111 poste 1233
E-mail : [EMAIL PROTECTED]
--------------------------------------------------------------------------------------------------


Web http://www.steph280.freesurf.fr/

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

Reply via email to