Skip to content

In vegan package: running adonis (or similar) on a distance matrix

2 messages · Roey Angel, Jari Oksanen

#
Hi,
Using Vegan package I was wondering if there's a way to use a distance 
matrix as an input for adonis (or any of the other similar hypothesis 
testing functions) instead of the usual species by sample table.
Working in the field of microbial ecology, what I'm trying to do is to 
overcome the problem of having to use discrete units such as species or 
OTUs, which are problematic in microbial ecology (if not outright 
theoretically false).
What I have instead is a phylometric distance matrix between all my 
samples based on a phylogenetic tree.

Some people have apparently made such a python implementation 
<http://qiime.org/scripts/compare_categories.html>, but I'd rather use R.

Thanks in advance,
Roey
#
Roey Angel <angel <at> mpi-marburg.mpg.de> writes:
Dear Roye Angel,

According to the documentation, this can be done. See description of the first
argument ('formula') in ?adonis. Your distances (dissmilarities) must be in
standard R form and inherit from class "dist". If they are in some other form,
you should change them to "dist" class. This may succeed with command as.dist().

Cheers, Jari Oksanen