Uncalibrate a Radiocarbon date

unCalibrate(
  calAges,
  calCurve = "intcal20",
  type = c("samples", "ages"),
  pathToCalCurves = system.file("data", package = "Bchron"),
  ...
)

Arguments

calAges

Either a vector of calibrated ages (when type = 'ages'), or a vector of calibrated samples (type = 'samples')

calCurve

he calibration curve to use. Only a single calibration curve is currently supported

type

Either 'ages' which uncalibrates a calibrated age values without error (i.e. just a lookup on the calibration curve), or a 'samples' which estimates both an uncalibrated mean age and a standard deviation

pathToCalCurves

The path to the calibration curve directory. Defaults to the location of the standard calibration curves given in the package

...

Other arguments to the optim function used to match the probability distributions under type = 'samples'

Value

Either a vector of uncalibrated ages (type = 'ages') or a list containing the estimated mean age and standard deviation (type = 'samples')

Examples

# \donttest{
# Single version outputting just an uncalibrated age
unCalibrate(2350, type = "ages")
#> 
  |                                                                      
  |================================================================| 100%
#> [1] 2352

# Vector version giving a vector of uncalibrated ages
unCalibrate(
  calAge = c(2350, 4750, 11440),
  calCurve = "shcal20",
  type = "ages"
)
#> 
  |                                                                      
  |=====================                                           |  33%
  |                                                                      
  |===========================================                     |  67%
  |                                                                      
  |================================================================| 100%
#> [1]  2393  4212 10070

# A version where calibrated standard deviations are required too
calAge <- BchronCalibrate(
  ages = 11255,
  ageSds = 25,
  calCurves = "intcal20"
)
calSampleAges <- sampleAges(calAge)

# Uncalibrate the above
unCalibrate(calSampleAges,
  type = "samples"
)
#> 
  |                                                                      
  |================================================================| 100%
#> $mean
#> [1] 11240
#> 
#> $sd
#> [1] 26
#> 
# }