CalibrateAge: Calibrate 14C age with Bchron

View source: R/calibration-functions.R

CalibrateAgeR Documentation

Calibrate 14C age with Bchron

Description

Calibrate a set of 14C ages in a dataframe using the BChron package.

Usage

CalibrateAge(
  df,
  age.14C = "age.14C",
  age.14C.se = "age.14C.se",
  curve = "intcal20",
  return.type = "df",
  offset = NULL
)

Arguments

df

dataframe of two columns giving the 14C ages and their standard error.

age.14C

character; name of the column in df with the 14C ages; defaults to "age.14C".

age.14C.se

character; name of the column in df with 1 standard error 14C age uncertainty; defaults to "age.14C.se".

curve

character; name pf the calibration curve to use; defaults to "intcal20".

return.type

character; signal the amount of returned information: return only the ammended dataframe ("df") or additionally the list of PDFs ("lst"); defaults to ("df").

offset

character; name of an optional additional column in df supplying a variable offset applied to all 14C ages; the default NULL means to apply no offset.

Details

This function is a wrapper for BchronCalibrate.

Value

A dataframe or list.

Author(s)

Andrew Dolman

See Also

BchronCalibrate SummariseEmpiricalPDF

Examples

# With defaults
dat <- data.frame(age.14C = c(2000, 20000),
                  age.14C.se = c(100, 200))
CalibrateAge(dat)

# Change the calibration
CalibrateAge(dat, curve = "marine13")

# Return the PDFs
cal.lst <- CalibrateAge(dat, curve = "marine13", return = "lst")
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))
CalibrateAge(dat, age.14C = "radiocarbon.age", age.14C.se = "se")
## Not run: 
if(interactive()){
 #EXAMPLE1
 }

## End(Not run)

EarthSystemDiagnostics/prxytools documentation built on Jan. 15, 2024, 9:33 p.m.