untb | R Documentation |
Simulates ecological drift under the UNTB. Function untb()
carries out the simulation; function select()
carries out a single generational step.
untb(start, prob=0, D=1, gens=150, keep=FALSE, meta=NULL)
select(a, D=length(a), prob=0, meta=NULL)
select.mutate(a, D=length(a), prob.of.mutate=0)
select.immigrate(a, D=length(a), prob.of.immigrate=0, meta)
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 |
prob , prob.of.immigrate , prob.of.mutate |
Probability of “new” organism not being a descendent of an existing individual |
D |
Number of organisms that die in each timestep |
gens |
Number of generations to simulate |
keep |
In function |
meta |
In function In function |
Functions select.immigrate()
and select.mutate()
are not
really intended for the end user; they use computationally efficient
(and opaque) integer arithmetic.
Robin K. S. Hankin
S. P. Hubbell 2001. “The Unified Neutral Theory of Biodiversity”. Princeton University Press.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.