[R] error running mvabund package

andres.holz andres.holz at utas.edu.au
Fri Jun 7 05:19:36 CEST 2013


Dear All,

This is my first post, and probably (and hence apologies that) my question
is very silly!
 
I'm having issues with a the mvabund package
(http://cran.r-project.org/web/packages/mvabund/index.html), 
and would be great to get some help!

Here is the code (and files are attached):

library(mvabund)
##visualizing data
florabund <- read.csv("CPL_floristics_abund_v1d.csv", header=TRUE)
vegtype <- read.csv("CPL_vegtype_all_v1b.csv", header=TRUE)
transect <- read.csv("CPL_transect_all_v1b.csv", header=TRUE)

cplflorabund <-mvabund(florabund, check.rows=FALSE, check.names=TRUE)
vegtype=as.factor(vegtype$vegtype)
plot(cplflorabund~vegtype) #there is a column called "treatment", and
another called "block"
plot.mvabund(cplflorabund)

##Fitting predictive models
transect=as.factor(transect$transect)
flormat=as.matrix(florabund)
abund.nb <-manyglm(flormat~transect*vegtype, family="nagative.binomial") 

predict(abund.nb, type= "response") 

##Checking Model Assumptions
plot(abund.nb) 

meanvar.plot(flormat~transect, col=as.numeric (vegtype)) #direct plot of
mean-variace relationship

anova(abund.nb, p.uni="adjusted") 

It's after running the last code line  [>anova(abund.nb, p.uni="adjusted")],
when I get thiis error:

Error in XvarIn[nterms - i, varseq > i + minterm] <- 0 : 
  (subscript) logical subscript too long

Any idea what I'm doing wrong?  I've tried shortening the length of all
files, but didn't matter. 

Thanks so much for your time!!

Cheers,
Andrés 

errorrunningmvabund.zip
<http://r.789695.n4.nabble.com/file/n4668879/errorrunningmvabund.zip>  



--
View this message in context: http://r.789695.n4.nabble.com/error-running-mvabund-package-tp4668879.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list