Displaying 1 result from an estimated 1 matches for "clsize".
Did you mean:
lsize
2008 Oct 21
4
subscripting a one column matrix drops dimension
...9600812
> cov(x[20:30])
Erreur dans cov(x[20:30]) : fournir 'x' et 'y' ou bien 'x' en matrice
And this behavior is braking function clustIndex (when used with
unidimensional data),
from the package cclust, file Rindexes.R, lines 137-147:
ttww <- function(x, clsize, cluster)
{
n <- sum(clsize)
k <- length(clsize)
w<-0
tt <- cov(x)*n
for (l in 1:k)
w<- w+cov(x[cluster==l,])*clsize[l]
zttw <- list(tt=tt, w=w)
return(zttw)
}
Any way around it?
Thank you.
Moacir Ped...