Description Usage Arguments Details Value References Examples
View source: R/competitionArena.R
Given a simulations.input object, creates an initial random arena, then removes some closely related individuals in the arena, settles individuals based on abundances from a regional species pool, and repeats across the desired number of generations.
1 | competitionArena(simulations.input)
|
simulations.input |
A prepared simulations.input object from prepSimulations |
This function combines the killSome and settleSome functions into a loop that runs for the desired number of generations. If the number of individuals in the arena exceeds 50,000, then the killSomeBig function is invoked. This runs much slower than the default version of the function, but will not use all memory and crash at large numbers of individuals.
A list of 5 elements: the average relatedness in the geographic neighborhood of consideration (appended to any previous values that were fed into the function), the number of individuals killed, the original input regional abundance vector, the new spatial arena, and the dimensions of that arena. On the last iteration, it returns the arena BEFORE settling new individuals randomly.
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 6 7 | 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=2)
test <- competitionArena(prepped)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.