Metapopulation
classPerforming simulations of an Metapopulation object. The returned object is the same Metapopulation object completed with the results and records if they have been activated.
# S4 method for Metapopulation
simulate(
object,
nsim = 1,
seed = NULL,
threshold = 500,
includefreqGeno = TRUE,
recording = FALSE,
recordGenGap = 1,
drift = TRUE,
includeParams = TRUE,
includeFitness = TRUE,
verbose = FALSE,
stopCondition = list(),
nameOutFunct = "outFunct"
)
An Metapopulation
object from which we can now extract the results
(or the records if recording = TRUE) with the getResults and getRecords
functions.
a Metapopulation
object
the number of simulation to perform
the RNG seed to be fixed (allows exact reproduction of results)
maximum duration of a simulation (in generations)
a logical indicating whether to include genotype frequencies in the results
a logical indicating whether to record all mutations, i.e. to record allelic and genotypic frequencies along the simulations
the number of generations between two records during simulation, if the record parameter is TRUE. Whatever the value of this parameter, both the first and the last generation will be included in the record
a logical indicating whether genetic drift should be considered (i.e. whether deterministic simulations are performed or not)
a logical indicating whether the parameters should be included in the result data.frame (can be useful when compiling multiple result tables)
a logical indicating whether the mean fitness should be included in the result data.frame (can be useful when compiling multiple result tables)
logical determining if the progress of the simulations should be displayed or not (useful in case of many simulations)
list of vectors that each describe the allele(s) that must be fixed to define a stop condition. Each of these vectors will therefore be associated with a stop condition
name of the custom output function. This function is called each generation in each population of a simulation and systematically returns a list with the first element being a logic that indicates whether something should be saved. If so, the second element of this list will be saved.If the customOutFunct parameter is null (default), there will be no custom output.
Ehouarn Le Faou