simComm: simulate multiple communities with different...

Description Usage Arguments Examples

View source: R/Rarefaction_funs.R

Description

simulate multiple communities with different beta/abundance/etc. characteristics

Usage

1
2
3
4
5
simComm(n.indiv.site = rep(10, ncomm), n.site = rep(3, ncomm),
  spcat = rep(1, ncomm), ncomm = 2, p.mix = rep(0.5, ncomm),
  n.abund = rep(1, ncomm), totsp = rep(3, ncomm), rand = "poisson",
  commlabs = letters[1:ncomm], retval = c("combined", "list"),
  seed = NULL)

Arguments

n.indiv.site

individuals per site

n.site

number of sites

spcat

number of species per abundance category PER SITE (overdetermined)

ncomm

number of communities

p.mix

mixing parameter: probability of among-site mixing for each abundance category: 0=endemic, 1=homogeneous

n.abund

number of abundance categories

totsp

total species pool size (FIXME)

rand

randomization type: 'none' to keep numbers==expected numbers; 'multinom' for fixed total per site; 'poisson' for Poisson sampling, 'trpoisson' for truncated Poisson sampling

commlabs

labels for communities/treatments

retval

return communities as a single metacommunity matrix or as a list of community matrices?

seed

random-number seed

Examples

1
plot(simComm(totsp=c(30,30),p.mix=c(0.2,0.7)))

bbolker/betararef documentation built on Sept. 17, 2021, 8:49 a.m.