Skip to contents

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

Usage

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
)

Arguments

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 BchronCalibrate

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

Value

A dataframe or list

Details

A wrapper for Bchron::BchronCalibrate

See also

Examples

# With defaults
dat <- data.frame(age.14C = c(2000, 20000),
                  age.14C.se = c(100, 200))
calibrate_14C_age(dat)
#>   age.14C age.14C.se offset offset.se age.14C.cal age.14C.cal.se
#> 1    2000        100      0         0        1939       136.2612
#> 2   20000        200      0         0       24047       242.5671

# Change the calibration
calibrate_14C_age(dat, cal_curve = "marine13")
#>   age.14C age.14C.se offset offset.se age.14C.cal age.14C.cal.se
#> 1    2000        100      0         0        1564       119.6210
#> 2   20000        200      0         0       23596       257.5961

# 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")
#>   radiocarbon.age  se offset offset.se age.14C.cal age.14C.cal.se
#> 1            2000 100      0         0        1939       136.2612
#> 2           20000 200      0         0       24047       242.5671
if (FALSE) { # \dontrun{
if(interactive()){
 #EXAMPLE1
 }
} # }