inst/doc/SAtree.R

## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(echo = TRUE)
library(FossilSim)

## -----------------------------------------------------------------------------
t = ape::rtree(6)
f = sim.fossils.poisson(rate = 2, tree = t)

SAt = SAtree.from.fossils(tree = t, fossils = f)
print(SAt$tree)
print(SAt$fossils)
print(SAt$tree$complete)

## -----------------------------------------------------------------------------
SAt_pruned = prune.fossils(tree = SAt$tree)
plot(SAt_pruned)

## -----------------------------------------------------------------------------
SAt_sampled = sampled.tree.from.combined(tree = SAt$tree)
plot(SAt_sampled)

Try the FossilSim package in your browser

Any scripts or data that you put into this service are public.

FossilSim documentation built on Oct. 5, 2023, 5:08 p.m.