beast.fbd.format: Transforms a tree and fossils into a sampled tree in...

Description Usage Arguments Value Examples

View source: R/conversions.R

Description

Transforms a tree and fossils into a sampled tree in beast-usable format and writes it in Newick format. Designed to work with FBD.

Usage

1
beast.fbd.format(tree, fossils, rho = 1, sampled_tips = NULL, ...)

Arguments

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.

...

Additional parameters will be passed to ape::write.tree

Value

Output of write.tree.

Examples

1
2
3
4
5
6
7
8
9
# 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
beast.fbd.format(t, f, file="example.tre") # output in file

rachelwarnock/fossilsim documentation built on Oct. 27, 2019, 9:26 a.m.