Visualisation of the birth-death algorithm from treats

Step 5: Re-running Step 1. I.e. selecting lineage B among the living lineages (B, C, D, E).


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)