# simulate tree
lambda = 0.1
mu = 0.05
tips = 10
t = TreeSim::sim.bd.taxa(n = tips, numbsim = 1, lambda = lambda, mu = mu)[[1]]
# Simulate fossils and extant taxa
rate = 0.1 # poisson sampling rate
f = FossilSim::sim.fossils.poisson(rate = rate, tree = t, root.edge = FALSE)
rho = 0.5
f2 = FossilSim::sim.extant.samples(fossils = f, tree = t, rho = rho)
morpho_data <- sim.morpho(k = c(2,3),
time.tree = t,
trait.num = 6,
ancestral = TRUE,
br.rates = 0.1,
partition = c(4,2),
ACRV = "gamma",
variable = TRUE,
ACRV.ncats = 4,
fossil = f2)
re <- get.reconstructed(morpho_data)
Run the code above in your browser using DataLab