View source: R/apply_speciation.R
apply_speciation | R Documentation |
For each species, check if there is any gap >= trait_dist_sp
in trait
values, and split the relevant species in two when one is found. The less
numerous half becomes the new species.
apply_speciation(comm, trait_dist_sp = default_trait_dist_sp())
comm |
a tibble with one row per individual in the community and three columns:
|
trait_dist_sp |
numeric, the minimal trait distance between two clusters of individuals triggering speciation. |
apply_speciation()
can currently only split one species into two. If
multiple gaps emerge in a species at a single time step, only the first one
will be treated. As long as branching does not happen at every generation,
this is unlikely to be an issue, because an unresolved gap will be caught on
the next time step. In phylogenetic terms, this results in polytomies being
resolved as soft polytomies.
Besides, simultaneous branching events in different species are handled
perfectly fine.
Théo Pannetier
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.