# The point of pulling chronology tables is to re-build or examine the chronological
# information that was used to build the age-depth model for the core. You can do this by hand,
# but the `write_agefile` function works with `download` objects directly.
three_pines <- get_download(get_dataset(get_site("Three Pines Bog"), datasettype = "pollen"))
pines_chron <- get_chroncontrol(three_pines)
# Spline interpolation:
model <- smooth.spline(x = pines_chron[[1]]$chron.control$depth,
y = pines_chron[[1]]$chron.control$age)
new_ages <- predict(model, x = three_pines[[1]]$sample.meta$depth)
Run the code above in your browser using DataLab