# 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
if (FALSE) {
beast.fbd.format(t, f, file="example.tre") # output in file
}
Run the code above in your browser using DataLab