[Rd] R bug in cluster package (PR#1580)

dhitchco@stat.ufl.edu dhitchco@stat.ufl.edu
Mon, 20 May 2002 20:34:12 +0200 (MET DST)


I have apparently found an error in the "pam" function of the "cluster"
library package.  Please pardon me if this error has been pointed out or
if this e-mail should be directed to someone else.

The problem only started occurring with R version 1.5.0, which I started
using about a week ago.  The problem occurs when you try to use "pam"
with the input being a dissimilarity matrix instead of a data matrix;
the results when using the dissimilarity matrix are very strange and not
at all like those obtained when using the data matrix.

For example, try this code:

library(cluster)
data(ruspini)
#the clustering using a data matrix as the input:
pam(ruspini,4)
#the clustering using a dissimilarity matrix as input:
pam(daisy(ruspini),4,diss=T)

The clustering results should be the same but are wildly different.
Again, this problem started happening with the upgrade to R 1.5.0.
Thank you for any help you can provide.

David Hitchcock


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._