untb {untb}R Documentation

Ecological drift simulation under the Unified Neutral Theory of Biodiversity

Description

Simulates ecological drift under the UNTB. Function untb() carries out the simulation; function select() carries out a single generational step.

Usage

untb(start, prob.of.mutate=0, D=1, gens=150, keep=FALSE, meta=NULL)
select(a, D=length(a), prob.of.mutate=0, meta=NULL)

Arguments

a, start Starting ecosystem; coerced to class census. Usually, pass an object of class count; see examples. To start with a monoculture of size 10, use start=rep(1,10) and to use start=1:10.
prob.of.mutate Probability of mutation
D Number of organisms that die in each timestep
gens Number of generations to simulate
keep In function untb() Boolean with default FALSE meaning to return the system at the end of the simulation and TRUE meaning to return a matrix whose rows are the ecosystem at successive times.
meta Metacommunity, as represented by a vector of integers (representing species; thus being a census). Can be a “count” or “census” object, in which case it is coerced to a census and thence to an integer vector. Default of NULL means to use a “greedy” system in which every mutation gives rise to a new, previously unencountered species. This would correspond to an infinitely large, infinitely diverse, Hubbellian ecosystem (which is not too ridiculous an assumption for a small island near a large diverse mainland)

Author(s)

Robin K. S. Hankin

References

S. P. Hubbell. The Unified Neutral Theory of Biodiversity. Princeton University Press, 2001.

Examples


data(butterflies)
untb(start=butterflies, prob=0, gens=100)

a <- untb(start=1:10,prob=0.005, gens=1000,keep=TRUE)
plot(species.count(a),type="b")
matplot(species.table(a),type="l",lty=1)


[Package untb version 1.0-20 Index]