Metapopulation simulation
Description
Simulate a metapopulation with genetic dynamics.
Usage
1 2 3 4 
Arguments
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 
Details
In the data
, each two homologous alleles must occur in columns next to
each other, e.g. ‘allele1A’, ‘allele1B’, ‘allele2A’,
‘allele2B’, etc.
Value
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 ofdisp.mat
. 
sex
factor with two levels,"F"
and"M"
; 
n
optional, number of individuals of that kind; 
...
remaining columns contain allele values.
Author(s)
Kamil Bartoń
See Also
pop.model
Examples
1  # TODO
