[R] cclust - cindex - binary data

Bruno Giordano bruno at speech.kth.se
Mon Dec 1 16:55:29 CET 2003


If anybody had the same problem I had in calculating the cindex with the
clustIndex function (binary data),
replace this line of code:

if (length(unique(x))==2)

with this one:

if (length(unique(as.vector(x)))==2)

located in the call to the procedure for calculating the cindex, in the
cclust file, in the library/cclust/R folder.

    Bruno


----- Original Message ----- 
From: <bruno.giordano at unipd.it>
To: <r-help at stat.math.ethz.ch>
Sent: Friday, November 28, 2003 12:10 PM
Subject: [R] cclust - cindex - binary data


> Hi,
> I'm trying to debug a function I wrote to calculate the cindex for a
> hierarchical tree.
> For this it is useful to compare my calculations with those in output from
> the clustindex function, in the cclust library.
> There's no way, however, to have the cindex value for a given output of
the
> cclust function, as a NA value is always returned.
> This happens almost surely because the cindex in clustIndex is calculated
> only for binary data, but, in turn, I can't find a way to specify either
> with the cclust function or with the clustIndex function, that an eventual
> input data set is binary.
>
> Thanks a lot
>     Bruno
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Bruno L. Giordano - Ph. D. student
> Dipartimento di Psicologia Generale
> Via Venezia 8 - 35131 Padova, Italy
>
> currently hosted by
>
> KTH - Royal Institute of Technology
> TMH - Department of Speech, Music and Hearing
> Drottning Kristinas v. 31
> SE-100 44 Stockholm, Sweden
>
> -------------------------------------------------
> This mail sent through IMP: webmail.unipd.it




More information about the R-help mailing list