Skip to content
Prev 43430 / 398506 Next

How to create own distance measure in cluster ?

The simplest way, if you have a function that returns the distance matrix,
is to use as.dist().  E.g.,

myDist <- function(...) {
    ## compute distance matrix dmat.
    ...
    return(as.dist(dmat))
}

I believe most clustering algorithms in R will accept dist objects.

If that doesn't do it, you can download the source for the `cluster' package
from CRAN.

Andy
------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments,...{{dropped}}