calibrate_14C_age: Calibrate Radiocarbon Dates with rcarbon::calibrate

View source: R/radiocarbon-functions.R

calibrate_14C_ageR Documentation

Calibrate Radiocarbon Dates with rcarbon::calibrate

Description

Calibrates a set of 14C ages using rcarbon::calibrate 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",
  return.type = "dat",
  offset = "offset",
  offset.se = "offset.se"
)

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: 'intcal20', see calibrate

return.type

Return the ammended dataframe or additionally the list of PDFs, Default: 'dat'

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.

Details

A wrapper for rcarbon::calibrate

Value

A dataframe or list

See Also

calibrate

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")
cal.lst
# 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/hamstr documentation built on June 12, 2025, 10:52 p.m.