Description Usage Arguments Value Examples
Simulate HTS-SIP communities for 1 density gradient
1 2 | gradient_sim(locs, params, responseModel = "gaussian",
countModel = "poisson", ...)
|
locs |
Buoyant densities of each gradient fraction |
params |
A matrix of parameters for |
responseModel |
See |
countModel |
See |
... |
Other parameters passed to |
A data.frame of OTU counts.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # setting parameters
set.seed(2)
M = 10 # number of species (OTUs)
ming = 1.67 # gradient minimum...
maxg = 1.78 # ...and maximum
nfrac = 24 # number of gradient fractions
locs = seq(ming, maxg, length=nfrac) # gradient fraction BD values
tol = rep(0.005, M) # species tolerances
h = ceiling(rlnorm(M, meanlog=11)) # max abundances
opt = rnorm(M, mean=1.7, sd=0.005) # species optima
params = cbind(opt=opt, tol=tol, h=h) # put in a matrix
# simulate the OTU abundances
df_OTU = gradient_sim(locs, params)
head(df_OTU)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.