Re: [R] Compare two distance matrices

From: Jari Oksanen <>
Date: Fri 07 Oct 2005 - 17:56:17 EST

On Fri, 2005-10-07 at 09:31 +0200, Mattias de Hollander wrote:
> Hi all,
> Thanks for the quick response. I see the ade4 package in not needed
> for distance matrix computation, but as far i can see you need it for
> comparing two distance matrices. In the stats package i can't find any
> similiar functions like mantel.randtest or RVdist.randtest of the ade4
> package. So i think this package is still needed if i would like to
> make a scatter plot of the matrices. Or should i manualy compare these
> matrices with a loop for example and make a plot of this?

To plot two dissimilarity structures d1 and d2 in base R, you can use command

plot(d1, d2)

For a plot() command, the dissimilarity structure looks like a vector.

Dissimilarity structure means a result that you can get from as.dist() or directly from dist() function or any other alternative implementation of dissimilarity functions giving compliant results.

For Mantel tests you may need ade4 (or some other package that has the same test).

cheers, jari oksanen

Jari Oksanen -- Dept Biology, Univ Oulu, 90014 Oulu, Finland
email, homepage

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Fri Oct 07 18:12:45 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 18:27:30 EST