Simulate a metapopulation with genetic dynamics.
1 2 3 4 
disp.mat 
a square matrix of size 
data 
a 
sim.len 
numeric, the simulation length (number of time steps). 
n.offspring 
maximum number of offspring per female. This can be either
a numeric scalar or vector of length 
carr.cap 
numeric scalar or vector of length 
event.order 
a character vector giving the sequence of events in a single time step. Accepted values are: "m.disperse", "f.disperse", "mate" and "reproduce". The names may be abbreviated. Note that there may be multiple events of the same type. 
pop.mod 
function implementing the population model. See

output.interval 
interval at which the population state is returned (not yet inplemented). 
m.mult.mating 
logical, is multiple mating of males allowed? 
mutation 
function to carry out mutations in the 'genome' of one individual. It has to accept a numeric vector as the only argument, and return a numeric vector of the same length. 
p.mutation 
numeric scalar, the mutation probability 
... 
further arguments passed to 
In the data
, each two homologous alleles must occur in columns next to
each other, e.g. ‘allele1A’, ‘allele1B’, ‘allele2A’,
‘allele2B’, etc.
A data.frame
with the same column types as the input data provided
as data
argument, where rows represent individuals (or
genotypes/sex/location and their counts if column n
was present) at
time = sim.len
.
patch
numeric giving the patch number, referring to the row and column of
disp.mat
.
sex
factor with two levels, "F"
and "M"
;
n
optional, number of individuals of that kind;
...
remaining columns contain allele values.
Kamil Bartoń
1  # TODO

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.