View source: R/radiocarbon-functions.R
calibrate_14C_age | R Documentation |
Calibrates a set of 14C ages using BchronCalibrate and optionally summarises the empirical PDFs of calendar age to mean and standard deviation and appends these to the input dataframe
calibrate_14C_age(
dat,
age.14C = "age.14C",
age.14C.se = "age.14C.se",
cal_curve = "intcal20",
offset = "offset",
offset.se = "offset.se",
return.type = "dat",
dfs = NULL
)
dat |
A dataframe containing the radiocarbon dates and uncertainties |
age.14C |
Name of column with 14C ages, Default: 'age.14C' |
age.14C.se |
Name of column with 1se 14C age uncertainty, Default: 'age.14C.se' |
cal_curve |
Calibration curve, Default: 'intcal13', see
|
offset |
Name of offset column, e.g. reservoir age. If column does not exist, no offset is applied. |
offset.se |
Name of offset uncertainty column, e.g. sigmaDelatR. If column does not exist, no offset uncertainty is applied. |
return.type |
Return the ammended dataframe or additionally the list of PDFs, Default: 'dat' |
dfs |
Degrees-of-freedom values for the t-distribution associated with the calibration calculation. A large value indicates Gaussian distributions assumed for the 14C ages |
A wrapper for Bchron::BchronCalibrate
A dataframe or list
BchronCalibrate
# With defaults
dat <- data.frame(age.14C = c(2000, 20000),
age.14C.se = c(100, 200))
calibrate_14C_age(dat)
# Change the calibration
calibrate_14C_age(dat, cal_curve = "marine13")
# Return the PDFs
cal.lst <- calibrate_14C_age(dat, cal_curve = "marine13", return = "list")
with(cal.lst[[2]][[1]][[1]], {plot(ageGrid, densities)})
# Use different column names
dat <- data.frame(radiocarbon.age = c(2000, 20000),
se = c(100, 200))
calibrate_14C_age(dat, age.14C = "radiocarbon.age", age.14C.se = "se")
## Not run:
if(interactive()){
#EXAMPLE1
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.