Visualisation of the birth-death algorithm from treats

Step 9: Repeating steps 1, 2, 3 and 4 again. Until a stop.rule condition is triggered (see step 11 - stop).


Previous step

Next step

Lineage selection in modifiers "selection" part of the modifier: by default, the selection is randomly choosing one lineage among the lineages currently not extinct. In R this is equivalent to:

sample(1, n)

or in the treats algorithm:

sample(1, lineage$n)