knitr::opts_chunk$set( collapse = TRUE, comment = "#>", cache = TRUE, autodep = TRUE, fig.width = 9, dev = "png", dev.args = list(type = "cairo-png"), dpi = 300 )
hamstrbacon can be installed directly from Github
if (!require("remotes")) { install.packages("remotes") } remotes::install_github("earthsystemdiagnostics/hamstrbacon")
Using the example core "MSB2K" from the rbacon package.
library(hamstrbacon)
hambac_1 <- hamstr_bacon(id = "tst", depth = MSB2K$depth, obs_age = MSB2K$age, obs_err = MSB2K$error, thick = 5, cc = 1, # pass seed to rbacon so that mcmc sample is the same # each time for the example seed = 20220103 )
plot(hambac_1)
summary(hambac_1)
predict(hambac_1)
plot(hambac_1, type = "acc")
Smooth the accumulation rates with 10 cm filter before calculating the statistics
plot(hambac_1, type = "acc", tau = 10)
spec_depths <- predict(hambac_1, depth = c(10:15)) spec_depths
Summary also works after interpolation
summary(spec_depths)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.