# \donttest{
# Generate model with 32 species, 30 species interactions and 2 environmental predictors
# for 500 samples with a frequency distribution following a Beta(1.5, 3)
model <- generateEICM(nspecies=32, nsamples=500, nenv=2, ninteractions=30,
shape1=1.5, shape2=3)
# make one realization
data <- predict(model, nrepetitions=1)
# plot frequency histogram: should follow a Beta distribution.
hist(apply(data, 2, sum) / nrow(data), breaks=seq(0, 1, by=0.1), xlim=c(0, 1),
main="Frequency distribution of one realization", xlab="Frequency in samples",
ylab="Number of species")
# }
Run the code above in your browser using DataLab