Learn R Programming

coala (version 0.2.0)

feat_pop_merge: Feature: Population Merge

Description

View backwards in time, this feature merges a population into another. Forwards in time, this corresponds to a speciation event.

Usage

feat_pop_merge(time, pop_source, pop_target)

Arguments

time
The time at which the merge occurs.
pop_source
The population from which all lines are moved.
pop_target
The population to which the lines are moved.

Details

Additionally, to the merge all migration rates from and the growth rate of the source population will be set to 0 at the time of the merge to mimic a speciation event forwards in time.

Examples

Run this code
model <- coal_model(c(25,25), 100) +
  feat_pop_merge(0.5, 2, 1) +
  feat_mutation(5)

Run the code above in your browser using DataLab