Skip to content
Prev 2550 / 7420 Next

interpreting adonis results

On Sun, 2011-11-20 at 02:24 +0100, Gian Maria Niccol? Benucci wrote:
Nothing more than that which comes with vegan in the help or is
contained in the Vegan tutorial, which can be accessed via:

http://vegan.r-forge.r-project.org/
Yes, I think you did...
...your code for defining groups is fundamentally flawed; you are
including the labels vector inside the c(....) statement and so R thinks
these are just some more elements of the vector:

groups <- factor(c(rep(1,12), rep(13,24), rep(25,36), rep(37,48), 
                   rep(49,60), rep(61,72), rep(73,84), rep(25,36), 
                   rep(37,48), rep(49,60), rep(61,72), rep(73,84),
                 labels=c("SIG","BA","SIMa","SIMb","SZV","BM","BRE")))
labels2 labels3 labels4 labels5 labels6 labels7 
     BA    SIMa    SIMb     SZV      BM     BRE 
Levels: 1 13 25 37 49 61 73 BA BM BRE SIG SIMa SIMb SZV
[1] 14

I think you want this:

groups <- factor(c(rep(1,12), rep(13,24), rep(25,36), rep(37,48), 
                   rep(49,60), rep(61,72), rep(73,84), rep(25,36), 
                   rep(37,48), rep(49,60), rep(61,72), rep(73,84)),
                 labels=c("SIG","BA","SIMa","SIMb","SZV","BM","BRE"))
[1] "SIG"  "BA"   "SIMa" "SIMb" "SZV"  "BM"   "BRE"

Do check that code you use creates the expected results!

HTH

G