calibrate_14C_age: Calibrate Radiocarbon Dates with Bchron::BchronCalibrate

View source: R/radiocarbon-functions.R

calibrate_14C_ageR Documentation

Calibrate Radiocarbon Dates with Bchron::BchronCalibrate

Description

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"
)

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'

Details

A wrapper for Bchron::Bchroncalibrate

Value

A dataframe or list

See Also

BchronCalibrate

Examples

# 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)

EarthSystemDiagnostics/baconr documentation built on Dec. 10, 2023, 4:35 a.m.