Description Usage Arguments Details Value References Examples
View source: R/prepSimulations.R
Given the required parameters for defined spatial simulations, will prepare an object of class simulations.input for actual simulation.
1 2 | prepSimulations(tree, arena.length, mean.log.individuals, length.parameter,
sd.parameter, max.distance, proportion.killed, competition.iterations)
|
tree |
Phylo object |
arena.length |
A numeric, specifying the length of a single side of the arena |
mean.log.individuals |
Mean log of abundance vector from which species abundances will be drawn |
length.parameter |
Length of vector from which species' locations are drawn. Large values of this parameter dramatically decrease the speed of the function but result in nicer looking communities |
sd.parameter |
Standard deviation of vector from which species' locations are drawn |
max.distance |
The geographic distance within which neighboring individuals should be considered to influence the individual in question |
proportion.killed |
The percent of individuals in the total arena that should be considered (as a proportion, e.g. 0.5 = half) |
competition.iterations |
Number of generations over which to run competition simulations |
This function preps the input for any of the spatial simulations as defined in defineSimulations. If additional parameters are ever required for those simulations, they would have to be added as additional arguments here.
A prepared simulations.input object
Miller, E. T., D. R. Farine, and C. H. Trisos. 2016. Phylogenetic community structure metrics and null models: a review with new methods and software. Ecography DOI: 10.1111/ecog.02070
1 2 3 4 5 | tree <- geiger::sim.bdtree(b=0.1, d=0, stop="taxa", n=50)
prepped <- prepSimulations(tree, arena.length=300, mean.log.individuals=2,
length.parameter=5000, sd.parameter=50, max.distance=20, proportion.killed=0.2,
competition.iterations=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.