This function simulates a community with a certain abundance distribution and with intraspecific aggregation, i.e. individuals of the same species are distributed in clusters.
sim_thomas_community(s_pool, n_sim, sad_type = "lnorm",
sad_coef = list(cv_abund = 1), fix_s_sim = FALSE, sigma = 0.02,
cluster_points = NA, mother_points = NA, xrange = c(0, 1),
yrange = c(0, 1))
Number of species in the pool (integer)
Number of individuals in the simulated community (integer)
Root name of the species abundance distribution model of the
species pool (character) - e.g., "lnorm" for the lognormal distribution
(rlnorm
); "geom" for the geometric distribution
(rgeom
), or "ls" for Fisher's log-series distribution
(rls
).
See the table in Details below, or rsad
for all SAD model options.
List with named arguments to be passed to the distribution
function defined by the argument sad_type
. An overview of parameter
names is given in the table below.
In mobsim
the log-normal and the Poisson log-normal distributions
can alternatively be parameterized by the coefficient of variation (cv)
of the relative abundances in the species pool. Accordingly, cv_abund
is the standard deviation of abundances divided by the mean abundance
(no. of individuals / no. of species). cv_abund
is thus negatively
correlated with the evenness of the species abundance distribution.
Please note that the parameters mu and sigma are not equal to the mean and standard deviation of the log-normal distribution.
Should the simulation constrain the number of species in the simulated local community? (logical)
Mean displacement (along each coordinate axes) of a point from its mother point (= cluster centre).
Mean number of points per cluster.
Number of mother points (= cluster centres).
Extent of the community in x-direction (numeric vector of length 2)
Extent of the community in y-direction (numeric vector of length 2)
A community object as defined by community
This function consecutively calls sim_sad
and
sim_thomas_coords
See the documentations of sim_sad
and
sim_thomas_coords
for details.
# NOT RUN {
com1 <- sim_thomas_community(s_pool = 20, n_sim = 500, sad_type = "lnorm",
sad_coef = list("meanlog" = 2, "sdlog" = 1),
sigma = 0.01)
plot(com1)
# }
Run the code above in your browser using DataLab