rphylo_H | R Documentation |
This function simulates a random phylogenetic tree. This tree can then be
used as a host tree on which parasites can evolve, using the
rcophylo_PonH
function.
rphylo_H(
tmax,
nHmax = Inf,
lambda = 1,
mu = 0.5,
K = Inf,
exportFormat = "phylo",
timestep = 0.001
)
tmax |
a numeric value giving the length of the simulation. |
nHmax |
a numeric value giving the number of host species at which the simulation is stopped. |
lambda |
a numeric value giving the host speciation rate. |
mu |
a numeric value giving the host extinction rate. |
K |
a numeric value giving the carrying capacity for the host species. |
exportFormat |
either "phylo" (exported in Ape phylo format, the default setting) or "raw" (just a list of branches as used within the function itself) |
timestep |
a numeric value giving the time step by which the simulation proceeds. Increase to make the simulation faster or decrease to make it more precise. |
By default, an object of class "phylo" is returned, as specified in
the R-package "ape". If the argument exportFormat
is set to "raw"
the function returns a dataframe containing information on all the branches
in the tree. (This dataframe are what the function uses internally.)
rphylo_H(tmax=5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.