beast.fbd.format | R Documentation |
For each species, removes all the intermediate fossils and leave only the youngest and oldest. The oldest and youngest of each species will be labelled according to the 'tip_order' argument.
beast.fbd.format(
tree,
fossils,
rho = 1,
sampled_tips = NULL,
tip_order = "oldest_first",
...
)
tree |
Complete tree. |
fossils |
fossils dataframe. |
rho |
Sampling probability of extant tips. Default 1, will be disregarded if sampled_tips is not null. |
sampled_tips |
List of tip labels corresponding to sampled extant tips. |
tip_order |
Order of indexes to assign to the tips, either 'oldest_first' (by default, first = oldest and last = youngest) or 'youngest_first' (reversed). |
... |
Additional parameters will be passed to ape::write.tree |
Output of write.tree.
# simulate tree
t = ape::rtree(6)
# simulate fossils
f = sim.fossils.poisson(rate = 2, tree = t)
# output for BEAST
beast.fbd.format(t, f) # output on the console
## Not run:
beast.fbd.format(t, f, file="example.tre") # output in file
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.