This is a high-level function that uses oxcal to simulate an age model, and stores this as an age-ensemble in a model in chronData. If needed input variables are not entered, and cannot be deduced, it will run in interactive mode. See Bronk Ramsey et al. 2008 doi:10.1016/j.quascirev.2007.01.019

runOxcal(
  L,
  chron.num = NA,
  meas.table.num = NA,
  oxcal.path = "~/OxCal/",
  model.num = NA,
  remove.rejected = TRUE,
  overwrite = TRUE,
  max.ens = 1000,
  static.reservoir.age = NA,
  static.reservoir.age.unc = NA,
  surface.age = NA,
  surface.age.unc = NA,
  surface.age.depth = 0,
  depth.interval = NA,
  events.per.unit.length = NA,
  events.per.unit.length.uncertainty = 0,
  outlier.prob = 0.05,
  cal.curve = "IntCal20",
  oxcal.code.export.path = NA,
  ...
)

Arguments

L

A LiPD object - an R serialization of a single LiPD file. It's a list, and is typically created by `readLipd()`

chron.num

Which chron number to get data from

meas.table.num

an integer that corresponds to paleo.num measurementTable has the variable you want?

oxcal.path

path to oxcal binaries

model.num

chron.numModel do you want to use?

remove.rejected

don't write out dates that are marked as rejected

overwrite

overwrite files and directories

max.ens

the maximum number of ensembles to load in (default = 1000)

static.reservoir.age

optionally assign a deltaR to all radiocarbon dates

static.reservoir.age.unc

optionally assign a deltaR uncertainty to all radiocarbon dates

surface.age

specify the age of the surface

surface.age.unc

surface age uncertainty

surface.age.depth

depth of the surface age

depth.interval

Depth interval to use to create depths.to.model (default = 10)

events.per.unit.length

How many events per unit length for the Poisson model? This controls the flexibility on the model, the lower the number the more flexibile.

events.per.unit.length.uncertainty

Uncertainty on events.per.unit.length in orders of magnitude. This makes for better models but *greatly* increases the run time. If NA or < 0 it runs without uncertainty (default = NA)

outlier.prob

What's the probability of a date being an outlier if not otherwise specified (default= 0.05)

cal.curve

What calibration curve to use? Current options are "intcal20" (default), "marine20", "shcal20", "intcal13", "marine13", or "shcal13"

oxcal.code.export.path

optionally output the oxcal code by specifying a path (default = NA)

...

Arguments passed on to createChronMeasInputDf

lab.id.var

Lab Id variable name

age.14c.var

Radiocarbon age variable name

age.14c.uncertainty.var

Radiocarbon age uncertainty variable name

age.var

Calibrated age variable name

age.uncertainty.var

Calibrated age uncertainty variable name

depth.var

Depth variable name

reservoir.age.14c.var

Reservoir age variable name

reservoir.age.14c.uncertainty.var

Reservoir age uncertainty variable name

rejected.ages.var

Rejected ages variable name

split.ages

if there's an age_type column, and only one age column, intelligently split between age and age14C (default = TRUE)

Value

L The single LiPD object that was entered, with methods, ensembleTable, summaryTable and distributionTable added to the chronData model.

Author

Nick McKay

Examples

if (FALSE) {
#Run in interactive mode:
L = runOxcal(L)

#Run in noninteractive mode, describing everything:
L = runOxcal(L,chron.num = 1, meas.table.num = 1, model.num = 3, bacon.dir = "~/Bacon/",site.name = "MSB2K", cc = 1)
}