Description Usage Arguments Value Functions
This steps a population forwards by many generations,
according to the parameters in a demography
object,
returning the result at specified times in an array.
1 2 3 4 5 | simulate_pop(population, demography, times, N = population$N, tinit = 0,
summary.times = 1:max(times), summaries = NULL, stop.fun = NULL,
return.everything = FALSE, ...)
simulation(N, summaries, times, summary.times, t, ...)
|
population |
A |
demography |
A |
times |
A sorted integer vector of times to record the full state of the population at. |
N |
Overrides the matrix of genotype counts in |
tinit |
The current time at the beginning of the simulation (defaults to t=0). |
summary.times |
A sorted integer vector of times to record summaries of the population at. |
summaries |
A list of functions to apply to the matrix of genotype counts, population$N, at generations |
stop.fun |
A function applied to N that, if it returns TRUE, will stop the simulation. (remainder of output array will be entirely zeros) |
return.everything |
Whether to record 'everything' as returned by |
... |
Additional parameters that will be passed to |
A named list, with elements
N = an array with dimensions as population$N
x length(times)
.
summaries = A list of matrices, with dimensions (length of summary.times) x (length of output of summary function).
times = As in the input.
summary.times = As in the input.
t = The final generation.
and furthermore, if return.everything
is TRUE, then
gens = a list whose elements are as output by generation(...,return.everything=TRUE)
.
simulation
: Constructor for a simulation object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.