View source: R/feature_growth.R
feat_growth | R Documentation |
This feature changes the growth factor of a population at given point in time. This factor applies to the time interval further into the past from this point.
feat_growth(rate, population = "all", time = "0", locus_group = "all")
rate |
The growth rate. Can be a numeric or a |
population |
The population which growths/declines. Can be "all" for all populations, or the number of one population. |
time |
The time at which the growth rate is changed. Can also be
a |
locus_group |
The loci for which this features is used. Can either be
|
The population size changes by a factor exp(-α*t), where α is the growth parameter and t is the time since the growth has started. For positive alpha, the population will decline backwards in time or grow forwards in time. For a negative value of α it will decline (forward in time).
The feature, which can be added to a model created with
coal_model
using +
.
For instantaneous population size
changes: feat_size_change
For creating a model: coal_model
Other features:
feat_ignore_singletons()
,
feat_migration()
,
feat_mutation()
,
feat_outgroup()
,
feat_pop_merge()
,
feat_recombination()
,
feat_sample()
,
feat_selection()
,
feat_size_change()
,
feat_unphased()
# Simulate a haploid population that has been expanding for # the last 2*Ne generations model <- coal_model(10, 1) + feat_growth(5, time = 0) + feat_growth(0, time = 1) + feat_mutation(10) + sumstat_sfs() simulate(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.