Open hrdawson opened 3 months ago
It looks like if the data argument has not been specified, comp=TRUE
can't find the data. This is a bug I can work on fixing, in the meantime please use the data argument, e.g.
library(mvabund)
data("Tasmania")
tas.nb <- manyglm(copepods ~ block*treatment, family = "negative.binomial", composition = TRUE, data=Tasmania)
Also, attach
is generally frowned upon and best avoided for a few reasons, a couple are explained here
That's a very simple and easy workaround that works for me. Thank you!
Good to know about attach
. I think I was copy-pasting code from an old tutorial.
Hi,
I'm trying to set
composition = TRUE
inmanyglm()
but each time I do it returns the error message:Error in manyglm(copepods ~ block * treatment, family = "negative.binomial", : object 'data2' not found
I'm using a modification of the code in the original paper (doi: 10.1111/j.2041-210X.2012.00190.x).
I have this error both in the most recent CRAN version of
mvabund
and the GitHub dev version ofmvabund
. I'm running R v. 4.4.0.Any ideas on how to set
data2
or otherwise convincemanyglm
to work with relative compositions?Thanks for the useful package!