comm.simul {comsimitv} | R Documentation |
Framework for community assembly simulation
Description
Flexible framework of individual-based simulation of community assembly following framework proposed by Botta-Dukat & Czucz (2016), but allowing intraspecific trait variation (ITV)
Usage
comm.simul(
x = vector(),
S = 200,
n.traits = 3,
J = 300,
rand.seed = NULL,
sim.length = 1,
fSpecPool = "Gener.species.pool",
competition.kernel = "Gaussian.competition.kernel",
fSurvive = "Gaussian.tolerance",
fSeedProduction = "SeedProduction",
fDispersal = "MetaCom.Dispersal",
fITV = "randomITV",
verbose = FALSE,
...
)
Arguments
x |
Vector of environmental values in communities. If not given, 40 communities are created, with environmental variable equally spacing from 0.11 to 0.89 |
S |
Species pool size |
n.traits |
Number of traits |
J |
Number of individuals in each community |
rand.seed |
Random seed number. Setting the same value allows repeating the same simulation |
sim.length |
Length of simulation. |
fSpecPool |
Name of (the user defined) function that generates the
species pool. See |
competition.kernel |
Name of the (user defined) function for calculating
pairwise competition coefficients. See more details
in available functions and specification of your own
function in |
fSurvive |
Name of the (user defined) function for calculating survival
probability of seeds. See more details
in available functions and specification of your own
function in |
fSeedProduction |
Name of the user defined function for calculating
number of produced seeds See |
fDispersal |
Name of the user defined function for dispersal of
produced seeds among local communities.
See more details in available functions and specification
of your own function in |
fITV |
Name of the function that define seeds trait values, possibly
considering mother's trait and mothers environment.
If "noITV", there is no intraspecific trait variation.
See more details in available functions and specification
of your own function in |
verbose |
Runing may take long time. If |
... |
Additional parameters of functions called by the framework. |
Details
This function is a framework for simulation of assembly in a meta-community. The simulation consists of a community initialization followed by an iterative simulation of a "disturbance–regeneration" cycle. During initialization a species pool is created defining each species by its trait values. Each locality is characterized by an environmental variable. Initial composition of local communities is a random selection from the species pool: species identity is selected independently for each individal with probability of seedling survival (that depends on local environment and trait value).
The "disturbance-regeneration" cycle consists of the following steps:
disturbance event: some randomly selected individuals die in each community
survivors produce seeds. Seed production depends on fertility of the locality and competition among coexisting individuals
seeds are dispersed among localities
all seeds germinate and seedlings struggle for survival. The number of adults in local communities is fixed, thus number of seedlings that can survive and grow up equals to the number of individulas died in the disturbance event (in the recent version one individual dies, but planed development is introducing a disturbance severity/number of deaths parameter)
It is a flexible framework that calls funcions for:
generating species pool (
Gener.species.pool
)calculating pairwise competition coefficients (
competition.kernel
)calculating seedling's survival probabilities (
tolerance
)calculating number of produced seeds (
SeedProduction
)calculating trait values of offsprings (
fITV
)seed dispersal among localities (
fDispersal
)
Functions available in the package can be easily replaced by user-defined functions.
Value
A list with two elements:
$final.community
a dataframe containing data on individuals in the final meta-community.
Each individual represented by a row; columns are: sub-community,
species identity, trait values.
$parameters
list of simulation parameters (including parameters of functions called by the framework function)
References
Botta-Dukat Z, Czucz B (2016) Testing the ability of functional diversity indices to detect trait convergence and divergence using individual-based simulation. Methods in Ecology and Evolution 7(1): 114-126. doi: 10.1111/2041-210X.12450
Examples
w<-comm.simul(S=20, J=30)
str(w)
set.seed(1)
w<-comm.simul(S=20, J=30, fITV=NULL)$final.community
w[w[,2]==1,] # Each individuals belonging to Species1 has the same trait values