[R] Package cclust error

Stephane DRAY dray at biomserv.univ-lyon1.fr
Tue Mar 9 16:14:34 CET 2004


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.
>
>______________________________________________
>R-help at stat.math.ethz.ch 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 : stephane.dray at umontreal.ca
-------------------------------------------------------------------------------------------------- 

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




More information about the R-help mailing list