Thank you, but what about dissimilarity matrix objects?

Paul

On Thu, Oct 14, 2010 at 5:30 PM, Peter Langfelder <
peter.langfelder@gmail.com> wrote:

> On Thu, Oct 14, 2010 at 5:21 PM, Paul Rigor (ucla) <pryce@ucla.edu> wrote:
> > Hi all,
> >
> > I would like to use the fpc and cluster packages for clustering. However,
> I
> > would like to create a custom dissimilarity object using a library in
> > python.  Has anyone attempted or know of a work-around for creating a
> > dissimilarity object from a csv file containing pair-wise distance
> measures?
>
> It is simple. Put the distance matrix into a csv file, read it in as
>
> tab = read.csv(...)
>
> convert to a distance as
>
> dst = as.dist(as.matrix(tab))
>
> then call your favorite clustering method.
>
> Here's what as.dist does on a matrix:
>
> mat = matrix(c(1:9), 3, 3)
> mat
> as.dist(mat)
>
> HTH,
>
> Peter
>



-- 
Paul Rigor
http://www.ics.uci.edu/~prigor

	[[alternative HTML version deleted]]

