Learn R Programming

coala (version 0.1.1)

feat_growth: Adds an exponential growth or decline of the size of one population to a model.

Description

This function changes the growth factor of a population at given point in time (time). This factor than applies to the time interval farther into the past from this point.

Usage

feat_growth(rate, population, time = "0")

Arguments

rate
A parameter stating the rate of the change.
population
The population which starts to grow or decline.
time
The time at which the population starts to grow or decline.

Value

  • The demographic model with a size change.

Details

The population size changes by factor exp(-alpha*t), where alpha is the growth parameter and t is the time since the growth has started. Hence, for positive alpha, the population will decline backwards in time or grow forwards in time. Similar, will decline in forwards time for a negative value of alpha.

If you want to add an instantaneous change of the population size, then use the feat_size_change function.

Examples

Run this code
model <- coal_model(c(20,37), 88) +
  feat_growth(par_range('alpha', 0.1, 2), population=2, time="0")

Run the code above in your browser using DataLab