Toy model to simulate internal and/or external filtering
RandCom(Ncom = 10, Nsp = 20, Nind.com = 100, sdlog = 1.5,
min_value_traits = 80, max_value_traits = 200,
cv_intra_sp = 1.5, cv_intra_com = 1.5,
Int_Filter_Strength = 50, Ext_Filter_Strength = 50, Filter="None")
Number of communities (or sites).
Number of species at the regional scale.
Number of individuals by communities.
Parameter of the log normal distribution for species abundances distribution within communities.
Minimum mean value for traits distributions.
Maximum mean value for traits distributions.
Coefficient of variation for intra-specific distributions. The more the value is high the less there is internal filtering. Used only for the trait 1 (normally distributed).
Coefficient of variation for intra-community distributions. The more the value is high the less there is external filtering. Used only for the trait 1 (normally distributed)
Strength of internal filtering in percentage. Use in addition to cv_intra_sp by distributing mean species trait more or less evenly. In the most extreme case (if Int_Filter_Strength==100), species have equally distributed mean values along the trait gradient.
Strength of external filtering in percentage. Use in addition to cv_intra_com by distributing mean communities trait more or less evenly. In the most extreme case (if Ext_Filter_Strength==100), communities have equally distributed mean values along the trait gradient.
The type of filter to simulate. Either "None", "Internal", "External" or "Both"
Vector of simulated communities for each individual.
Vector of simulated species for each individual.
Vector of simulated value for the trait 1: normally distributed.
Vector of simulated value for the trait 2: normally distributed.
call of the function Tstats
In this version of the function, the trait 1 follows a normal distribution wheras the trait 2 follows a uniform distribution.
# NOT RUN {
res <- RandCom()
# }
Run the code above in your browser using DataLab