Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upmethods for betadisper objects fail when bias.adjust=TRUE #219
Comments
With bias.adjust=TRUE we used table() to get the counts for groups, and the result had class "table" with special as.data.frame() method. We used data.frame as the internal structure to pass data to anova and permutest, and this was distorted with as.data.frame.table(). Fixes issue #219 in github.
|
This is a subtle issue: R objects are not always what they look like. We needed counts of observations for groups, and we used I have a fix for this (commit a0e16ea), but we got to see that this fix does not break anything else before merging this. Thanks for reporting this problem. We are going to have this fix in vegan release 2.4-2 before northern winter solstice. (cc @adrianstier @bbolker) |
|
OK, I was surprised by this (thought it was an evaluation-environment problem), but I see it's just a renaming issue. Sorry about the trouble. |
|
Fixed with commit e70050e |
With bias.adjust=TRUE we used table() to get the counts for groups, and the result had class "table" with special as.data.frame() method. We used data.frame as the internal structure to pass data to anova and permutest, and this was distorted with as.data.frame.table(). Fixes issue #219 in github. (cherry picked from commit a0e16ea)
Using the sample code from the permutest.betadisper help text, if the bias.adjust=TRUE is included when building the betadisper object "mod", downstream anova and permutest methods fail, giving this error:
Error in eval(expr, envir, enclos) : object 'Distances' not found