I am trying to run a null model for some community data and am receiving the same error repeatedly and have been unable to figure it out. I have tried changing the format, doing a smaller subset and various other things but to no avail.
The data format recommended is like this:
community Ck Cj Cl
w0-200 1 1 1
w200-400 0 1 1
w400-600 0 1 0
w600-800 0 1 0
w800-1000 0 1 0
but consists of 31 rows and 42 columns. The code I'm using is
ses.mpd(my.sample, cophenetic(my.phylo), null.model =
"taxa.;ables", abundance.weighted = F, runs = 999,
iterations = 1000)
or
#1. randomize community data matrix
ses.mpd.nullmodel.values<-ses.mpd(my.sample, cophenetic(my.phylo), null.model = "independentswap", abundance.weighted = F, runs = 999, iterations = 1000)
write.xlsx(ses.mpd.nullmodel.values, "~ewmaeint.xlsx", row.names=TRUE)
The error message I get is
Error in numeric(N) : invalid 'length' argument
What does it mean? The traceback didn't really help me:
traceback()
3: numeric(N)
2: mpd(samp, dis, abundance.weighted = abundance.weighted)
1: ses.mpd(my.sample, cophenetic(my.phylo), null.model = "taxa.;ables",
abundance.weighted = F, runs = 999, iterations = 1000)