sim_next_gen: Simulate the next generation

Description Usage Arguments Value

View source: R/sim_next_gen.R

Description

Simulates the next generation by calling a mutator on each parent

Usage

1
sim_next_gen(genealogy, r0, mutator, gen_num = 1)

Arguments

genealogy

A genealogy data structure holding all the previous generations. TODO: link to general documentation. GH issue #6.

r0

The number of offspring each molecule produces. Currently restricted to being an integer, but this will become a more complex construct in future versions (GH issue #17).

mutator

A list with two elements fun and args specifying the function that mutates parents into their offspring and the list of arguments said function requires.

gen_num

The generation number. Defaults to 1.

Value

A genealogy data structure. TODO: link to general documentation on a genealogy. GH issue #6


philliplab/yasss documentation built on Sept. 7, 2020, 3:28 p.m.