Learn R Programming

metricTester (version 1.3.6)

filteringArena: Simulate a community assembled according to habitat filtering

Description

Given a simulations.input object, will create an arena settled according to habitat filtering rules (and parameters defined by prepSimulations).

Usage

filteringArena(simulations.input)

Arguments

simulations.input

A prepared simulations.input object from prepSimulations

Value

A list of 3 elements: the original input regional abundance vector, the new spatial arena, and the dimensions of that arena.

Details

This is the habitat filtering simulation that was used in our paper (reference below). In short, species have phylogenetically conserved spatial preferences, and individuals of those species are settled near that preferred location with a controllable degree of variation. Species' spatial preferences are smoothed to a uniform distribution. Thus, individuals are fairly evenly distributed throughout the simulated arena.

References

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

Examples

Run this code
# NOT RUN {
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 <- filteringArena(prepped)
# }

Run the code above in your browser using DataLab