# define age-depth model from example data
adm = admtools::tp_to_adm(t = scenarioA$t_myr, h = scenarioA$h_m[,"2km"])
f = strat_filter(adm)
# collection probability of 0 at 0.5 Myr & 1 at 1.0 Myr
f(c(0.5, 1.0))
# define fossil occurrences
occ = p3(rate = 2, from = 0, to = 2, n = 100)
# filter those that are not coinciding with hiatuses
occ_filter = apply_taphonomy(occ, identity, f)
hist(occ_filter, breaks = seq(0, 2, by = 0.2))
Run the code above in your browser using DataLab