update_population: Update population

View source: R/update_population.R

update_populationR Documentation

Update population

Description

Draw individuals to found a new generation. These are drawn from the seed rain from the previous generation or from the seed bank.

Usage

update_population(
  seed_rain,
  seed_bank,
  mean_dispersal_distance,
  outcrossing_rate,
  dormancy,
  generation,
  box_limit
)

Arguments

seed_rain

List giving (1) genotype labels and (2) coordinates of each individual in the population in the previous generation.

seed_bank

List giving (1) genotype labels and (2) coordinates of each individual in the seed bank.

mean_dispersal_distance

Float >0. Mean seed dispersal distance. The reciprocal of this is used as the rate parameter to draw from the exponential distribution.

outcrossing_rate

Float between 0 and 1. Probability that an individual is outcrossed.

dormancy

Float between 0 and 1. Probability that a seedling is drawn from the seed bank. Seedlings are drawn from the prior generation with probability 1-dormancy.

generation

Int indicating the generation in the simulation. This is used to label new genotypes generated by outcrossing.

box_limit

Float >1 giving half the circumference of the torus.

Value

List giving (1) genotype labels and (2) coordinates of each individual to found the next generation.

Author(s)

Tom Ellis


ellisztamas/simmiad documentation built on Dec. 12, 2023, 5:32 a.m.